 
var isDOM = (document.getElementById ? true : false);
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
function getRef(id) {
	if (isDOM) return document.getElementById(id);
	if (isIE4) return document.all[id];
	if (isNS4) return document.layers[id];
}
var isNS = navigator.appName == "Netscape";
function moveRightEdge() {
	var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;
	if (isNS4) {
		yMenuFrom   = img.top;
		yMenuTo     = windows.pageYOffset + 313;
	} else if (isDOM) {
		yMenuFrom   = parseInt (img.style.top, 10) ;
		 if (document.body.offsetHeight >700) {
		 yMenuTo     = (isNS ? window.pageYOffset : document.body.offsetHeight +(document.body.scrollTop ) - 320 ) ;
		 };
		 else {
		yMenuTo     = (isNS ? window.pageYOffset :  document.body.scrollTop + 290  ) ;}
	//alert (yMenuTo)
	}
	timeoutNextCheck = 500;
	if (yMenuFrom != yMenuTo) {
		yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20); //ÀÌ ¼öÄ¡¸¦ °íÄ¡¸é ½ºÅ©·Ñ¿¡ µû¶ó¿À´Â ¼Óµµ°¡ Á¶Àý
		if (yMenuTo < yMenuFrom)
			yOffset = -yOffset;
		if (isNS4)
			img.top += yOffset;
		else if (isDOM)
			img.style.top = parseInt (img.style.top, 10) + yOffset;
			timeoutNextCheck = 10;
	}
	setTimeout ("moveRightEdge()", timeoutNextCheck);
}

function moveRightEdge_1() {
	var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;
	if (isNS4) {
		yMenuFrom   = img.top;
		yMenuTo     = 290;
	} else if (isDOM) {
		yMenuFrom   = parseInt (img.style.top, 10) ;
		yMenuTo     = 290 ;
	//alert (yMenuTo)
	}
	timeoutNextCheck = 500;
	if (yMenuFrom != yMenuTo) {
		yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20); //ÀÌ ¼öÄ¡¸¦ °íÄ¡¸é ½ºÅ©·Ñ¿¡ µû¶ó¿À´Â ¼Óµµ°¡ Á¶Àý
		if (yMenuTo < yMenuFrom)
			yOffset = -yOffset;
		if (isNS4)
			img.top += yOffset;
		else if (isDOM)
			img.style.top = parseInt (img.style.top, 10) + yOffset;
			timeoutNextCheck = 10;
	}
	setTimeout ("moveRightEdge_1()", timeoutNextCheck);
}

function moveUp() {
	var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;
	if (isNS4) {
		yMenuFrom   = up.top;
		yMenuTo     = windows.pageYOffset + 313;
	} else if (isDOM) {
		yMenuFrom   = parseInt (up.style.top, 10) ;
		yMenuTo     = (isNS ? window.pageYOffset : document.body.scrollTop + 350 ) ;
	//alert (yMenuTo)
	}
	timeoutNextCheck = 500;
	if (yMenuFrom != yMenuTo) {
		yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20); //ÀÌ ¼öÄ¡¸¦ °íÄ¡¸é ½ºÅ©·Ñ¿¡ µû¶ó¿À´Â ¼Óµµ°¡ Á¶Àý
		if (yMenuTo < yMenuFrom)
			yOffset = -yOffset;
		if (isNS4)
			up.top += yOffset;
		else if (isDOM)
			up.style.top = parseInt (up.style.top, 10) + yOffset;
			timeoutNextCheck = 10;
	}
	setTimeout ("moveUp()", timeoutNextCheck);
}


function open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable) 
{ 
toolbar_str = toolbar ? 'yes' : 'no'; 
menubar_str = menubar ? 'yes' : 'no'; 
statusbar_str = statusbar ? 'yes' : 'no'; 
scrollbar_str = scrollbar ? 'yes' : 'no'; 
resizable_str = resizable ? 'yes' : 'no'; 
window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str); 
} 

// ÇÃ·¡½ÃÆÄÀÏ ·ÎµåÇÏ±â(Åõ¸íÇÃ·¡½Ã)
function swf_load(fileid, filename, widths, heights, fvs, wmd){

this.FlashVars = (fvs != undefined)? fvs :'';
this.Wmod = (wmd != undefined)? wmd :''; 


var strSwf = "";

strSwf += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
strSwf += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"';
strSwf += 'width="'+widths+'" height="'+heights+'" id="'+fileid+'" >';
strSwf += '<param name="movie" value="'+filename+'" />';
strSwf += '<param name="quality" value="high" />';
strSwf += (FlashVars != null) ? '<param name="FlashVars" value="'+FlashVars+'">' : '';
strSwf += (Wmod != null) ? '<param name="wmode" value="'+Wmod+'">' : ''; 
strSwf += '<embed';
strSwf += (FlashVars != null) ? ' FlashVars="'+FlashVars+'"' : ''; 
strSwf += (Wmod != null) ? ' wmode="'+Wmod+'"' : ''; 
strSwf += ' src="'+filename+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"';
strSwf += 'type="application/x-shockwave-flash" width="'+widths+'" height="'+heights+'"  name="'+fileid+'" ></embed>';
strSwf += '</object>';


document.write(strSwf);
}

// ÇÃ·¡½ÃÆÄÀÏ ·ÎµåÇÏ±â (Äü¸Þ´º)
function swf_quickmenu(){
document.write("\
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'\
	codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' \
	width='90' height='350' id='ANIMATE' onload='ToggleAnimate();'>\
    <param name='movie' value='../swf/quicklink_sub.swf'>\
    <param name='quality' value='high'>\
    <embed src='../swf/quicklink_sub.swf' width='90' height='350' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer'\
	type='application/x-shockwave-flash'></embed>\
  </object>\
");
}

// IE ÆÐÄ¡ ÇÔ¼ö
function JS_viewObj(objhtml) 
{ 
    document.write(objhtml); 
}
