document.write("<script type='text/javascript' src='/common/script/scroll2.js'></script>"); // scroll.js
//---------------------------------------------------------------------------------- script

function notice_getCookie( name )
{
        var nameOfCookie = name + "=";
        var x = 0;
        while ( x <= document.cookie.length )
        {
                var y = (x+nameOfCookie.length);
                if ( document.cookie.substring( x, y ) == nameOfCookie ) {
                        if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
                                endOfCookie = document.cookie.length;
                        return unescape( document.cookie.substring( y, endOfCookie ) );
                }
                x = document.cookie.indexOf( " ", x ) + 1;
                if ( x == 0 )
                        break;
        }
        return "";
}

//EÄ«´Ù·Î±×¶ç¿ì±â
function Eshow(url,_width,_height) 
{ 
         if(window.clientInformation.userAgent.indexOf("SV1")>0){        //--WindowXP SP2°¡ ¼³Ä¡µÈ È¯°æ¿¡¼­ÀÇ ¼¼ÆÃÀÔ´Ï´Ù.
        newWin = window.open(url,"","toolbar=no location=no directories=no status=no menubar=no scrollbars=no resizable=no width=1024 height=800 top=0 left=0");
            newWin.moveTo(0,0);

            left1=(screen.availWidth-1024-5)/2; //--1024X768 ÇØ»óµµÀÇ ¸ð´ÏÅÍ¿¡¼­ ³ªÅ¸³ª´Â eBook Popup Ã¢ÀÇ °¡·Î Áß¾Ó À§Ä¡¸¦ ÁöÁ¤ÇÕ´Ï´Ù.
            top1=(screen.availHeight-800-10)/2; //--1024X768 ÇØ»óµµÀÇ ¸ð´ÏÅÍ¿¡¼­ ³ªÅ¸³ª´Â eBook Popup Ã¢ÀÇ ¼¼·Î Áß¾Ó À§Ä¡¸¦ ÁöÁ¤ÇÕ´Ï´Ù.
                                //À§ 1024, 768 ÀÇ Á¶Á¤À¸·Î Ã¢ÀÌ ³ªÅ¸³ª´Â À§Ä¡¸¦ Á¶Á¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.
            
                newWin.resizeTo(1024,800);
                newWin.moveTo(left1,top1);

    }else{                        //--Windows XP SP2 °¡ ¼³Ä¡µÈ È¯°æÀ» Á¦¿ÜÇÑ È¯°æ¿¡¼­ÀÇ ¼¼ÆÃÀÔ´Ï´Ù.
            if(screen.width==_width&&screen.height==_height) { 
                window.open(url,"","fullscreen"); 
              } else { 
            left1=(screen.availWidth-1024-5)/2; 
            top1=(screen.availHeight-800-10)/2;       
            window.open(url,"","toolbar=no location=no directories=no status=no menubar=no scrollbars=no resizable=no width=1024 height=800 top="+top1+" left="+left1); 
              }
        }
}

function MM_openBrWindow(theURL,winName,features)
{
  window.open(theURL,winName,features);
}


//---------------------------------------------------------------------------------- basic script
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_controlShockwave(objStr,x,cmdName,frameNum) { //v3.0
  var obj=MM_findObj(objStr);
  if (obj) eval('obj.'+cmdName+'('+((cmdName=='GotoFrame')?frameNum:'')+')');
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

//---------------------------------------------------------------------------------- Active
function setEmbed(){ 
	
  var obj = new String; 
  var parameter = new String; 
  var embed = new String; 
  var html = new String; 
  var allParameter = new String; 
  var clsid = new String; 
  var codebase = new String; 
  var sameDomain = new String; 
  var embedType = new String; 
  var pluginspace = new String; 
  var src = new String; 
  var transparent = new String; 
  var bgcolor = new String; 
  var width = new String; 
  var height = new String; 
  var height2 = new String; 
  var Id = new String; 
  var align = new String; 

  this.init = function( getType, s, f_trans, f_color, f_width, f_height, f_height2, f_Id, f_align, oId ) { 
      if ( getType == "flash" ) 
      { 
      		clsid="d27cdb6e-ae6d-11cf-96b8-444553540000";
      		codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0";
			sameDomain="sameDomain";
      		embedType="application/x-shockwave-flash";
		pluginspage="http://www.macromedia.com/go/getflashplayer";
      } 
      else if ( getType == "movie" ) 
      { 
      		clsid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"	;
      		codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" ;
      		embedType="application/x-mplayer2";
		pluginspage="http://www.microsoft.com/windows/mediaplayer/download/default.asp"
      } 
      /* type Ãß°¡ 
      else if ( ) 
      { 
      } 
      */
            
      parameter += "<param name='allowScriptAccess' value='sameDomain'>\n"; 
      parameter += "<param name='SeamlessTabbing' value='false'>\n"; 
      parameter += "<param name='movie' value='"+ s +"'>\n"; 
      parameter += "<param name='wmode' value='"+ f_trans +"'>\n"; 
      parameter += "<param name='align' value='center'>\n"; 
      parameter += "<param name='scale' value='noscale'>\n"; 
      parameter += "<param name='quality' value='high'>\n"; 
      parameter += "<param name='menu' value='false'>\n"; 
	  parameter += "<param name='SeamlessTabbing' value='false'>\n";
            
      src = s;
	  transparent = f_trans;
	  bgcolor = f_color;
      width = f_width; 
      height = f_height; 
      height2 = f_height2; 
      Id = f_Id;
	  align = f_align;
      objId = oId;
  } 
  
  this.parameter = function( parm , value ) {      
      parameter += "<param name='"+parm +"' value='"+ value + "'>\n";        
      allParameter += " "+parm + "='"+ value+"'"; 
  }  
  

  this.show = function() { 
      if ( clsid ) 
      { 
        obj = "<object id=" + objId + " classid=\"clsid:"+ clsid +"\" codebase=\""+ codebase +"\" width='"+ width +"' height='"+ height +"' value='" + objId + "' id='"+ Id +"' align='"+ align +"'>\n"; 
      } 
      	embed = "<embed id='" + objId + "' src='" + src + "' wmode='"+ transparent +"' bgcolor='"+ bgcolor +"' width='"+ width + "' height='"+ height2 +"' name='"+ Id +"' align='"+ align +"' allowScriptAccess='"+ sameDomain + "' type='"+ embedType + "' pluginspage='"+ pluginspage + "' "+ allParameter +"'> </embed>"; 

      if ( obj ) 
      { 
        embed += "</object>"; 
      } 
      html = obj + parameter + embed; 
      document.write( html );  

	if ( objId)
      	{	
      			var Objv = document.getElementById(objId);
      			if (Objv.value==objId) {
      				eval("document." + objId + ".focus();");
      			}
    	}
  } 
}



//function funcPlay(playId){
//	if( document.getElementById(playId).PlayState != 2 ){
//		document.getElementById(playId).Play();
//	}
//}

//function funcPause(playId){
//	if( document.getElementById(playId).PlayState == 2 ){
//		document.getElementById(playId).Pause();
//	}
//}

//function funcStop(playId){
//	document.getElementById(playId).Stop();
//}

// --------------------------------------------------------------------------------------- //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function flashmovie(location2,f_width2,f_height3){
	document.write("<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 width="+f_width2+" height="+f_height3+">");
	document.write("<param name=movie value="+location2+" />");
	document.write("<param name=quality value=high />");
	document.write("<param name=SCALE value=noborder />");
	document.write("<param name=wmode value=transparent />");
	document.write("<param name=menu value=false />");
	document.write("<embed src="+location2+" quality=high pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash width="+f_width2+" height="+f_height3+"></embed></object>");
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function swf_obj02(src,w,h,swfid){
	swf_html = '';
	swf_html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+w+'" height="'+h+'" id="'+swfid+'" align="middle">';
	swf_html += '<param name="allowScriptAccess" value="always">';
	swf_html += '<param name="movie" value="'+src+'">';
	swf_html += '<param name="quality" value="high">';
	swf_html += '<param name="scale" value="noborder">'
	swf_html += '<param name="wmode" value="transparent">';
	swf_html += '<param name="bgcolor" value="#FFFFFF">';
	swf_html += '<param name="menu" value="false">';
	swf_html += '<embed src="'+src+'" quality="high" bgcolor="#FFFFFF" width="'+w+'" height="'+h+'" name="'+swfid+'" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">';
	swf_html += '</object>';
	document.write(swf_html);
}

//¼¿·ºÆ®¹Ú½º
function openAnotherWin(url){
	if ( url != "" )
	AnotherWin = window.open(url,"AnotherWin","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");
	else return;
}

// ÀÌ¹ÌÁö ¿À¹ö(ÅÇ¹öÆ°)
function imgOver(id) {
	var id = document.getElementById(id);
	id.src = id.src.replace(".jpg", "ov.jpg");
}
function imgOut(id) {
	var id = document.getElementById(id);
	id.src = id.src.replace("ov.jpg", ".jpg");
}
function imgClick(id) {
	var id = document.getElementById(id);
	id.src = id.src.replace(".jpg", "ov.jpg");
}

// Iframe Auto Height
function calcheight(LayerNM) {
	window.setTimeout(function () {
		LayerNM = document.getElementById(LayerNM);
			LayerNM.style.height = "auto";
			contentHeight = LayerNM.contentWindow.document.documentElement.scrollHeight;
			LayerNM.style.height = (contentHeight + 4) + "px";
	}, 250);
}

/*
// ÅÜ¸Þ´º º¸ÀÌ±â 
// tabShow(º¸¿©ÁÙÅÜ¹øÈ£,ÅÜ°³¼ö)
function tabShowDiv(tabno,max){
	for (i=1;i<=max;i++){
		document.getElementById('tab'+i).className='hide';
		if (i==tabno) { document.getElementById('tab'+i).className='show'; } 
	}
}

function TabShow(tabid,tabno,max){
	for (i=1;i<=max;i++){
		document.getElementById(tabid+i).className='hide';
		if (i==tabno) { document.getElementById(tabid+i).className='show'; } 
	}
}

function tabShowCss(tabid,tabno,max,css){
	for (i=1;i<=max;i++){
		document.getElementById(tabid+i).className=css + ' hide';
		if (i==tabno) { document.getElementById(tabid+i).className=css + ' show'; } 
	}

}

function tabImgShow(tabid,tabno){
	document.getElementById(tabid).src='/kor/images/'+tabno+'.gif';
}

function tabShow(tabID,tabNo){
	document.getElementById(tabID).src='/kor/images/support/faq_tab'+tabNo+'.gif';
}

// Toggle Menu (·¹ÀÌ¾îÈ®Àå, Ãà¼Ò)
function Show(faqID,faqNo,maxNo){
	if(document.getElementById(faqID+faqNo).className=='faq-a'){
		var maxNo;
		for(i=1;i<=maxNo;i++){
			document.getElementById(faqID+i).className='faq-a';
			document.getElementById('arrow'+i).src='/kor/images/support/faq_b_down.gif';
		}
		document.getElementById(faqID+faqNo).className='faq-a-block';
		document.getElementById('arrow'+faqNo).src='/kor/images/support/faq_b_up.gif';
	}else{
		document.getElementById(faqID+faqNo).className='faq-a';
			document.getElementById('arrow'+faqNo).src='/kor/images/support/faq_b_down.gif';
	}
}

function ShowCss(faqID,faqNo,maxNo,css){
	if(document.getElementById(faqID+faqNo).className==css){
		var maxNo;
		for(i=1;i<=maxNo;i++){
			document.getElementById(faqID+i).className=css;
			document.getElementById('arrow'+i).src='/kor/images/support/faq_b_down.gif';
		}
		document.getElementById(faqID+faqNo).className=css+'-block';
		document.getElementById('arrow'+faqNo).src='/kor/images/support/faq_b_up.gif';
	}else{
		document.getElementById(faqID+faqNo).className=css;
			document.getElementById('arrow'+faqNo).src='/kor/images/support/faq_b_down.gif';
	}
}
*/
//Main Navigation
function initNavigation(seq,sec) {

	nav = document.getElementById("mainmenu");
	nav.menu = new Array();
	nav.current = null;
	nav.menuseq = 0;
	navLen = nav.childNodes.length;

	allA = nav.getElementsByTagName("li")
	for(k = 0; k < allA.length; k++) {
		allA.item(k).onmouseover = allA.item(k).onfocus = function () {
			nav.isOver = true;
		}
		allA.item(k).onmouseout = allA.item(k).onblur = function () {
			nav.isOver = false;
/*
			setTimeout(function () {
				if (nav.isOver == false) {
					if (nav.menu[seq])
						nav.menu[seq].onmouseover();
					else if(nav.current) {
						menuImg = nav.current.childNodes.item(0);
						menuImg.src = menuImg.src.replace("on0", "off0");
						if (nav.current.submenu)
							nav.current.submenu.style.display = "none";
						nav.current = null;
					}
				}
			}, 500);
*/
		}
	}

	for (i = 0; i < navLen; i++) {
		navItem = nav.childNodes.item(i);

		if (navItem.tagName != "LI")
			continue;

		navAnchor = navItem.getElementsByTagName("a").item(0);
		navAnchor.submenu = navItem.getElementsByTagName("ul").item(0);

/*
		if(seq == (i+1)){

			for(j = 0; j< navAnchor.submenu.childNodes.length;j++){
				navAnchor.submenu.sub = navAnchor.submenu.childNodes.item(j);
				var secname = "menu"+seq+"-"+sec;
				//alert(secname + " ===== " + navAnchor.submenu.sub.id);
				if(secname == navAnchor.submenu.sub.id) navAnchor.submenu.sub.className = "on";

			}
		}
*/

		navAnchor.onmouseover = navAnchor.onfocus = function () {

			if (nav.current) {
				menuImg = nav.current.childNodes.item(0);
				menuImg.src = menuImg.src.replace("_on.gif", ".gif");

				if (nav.current.submenu)
					nav.current.submenu.style.display = "none";
				nav.current = null;
			}

			if (nav.current != this) {
				menuImg = this.childNodes.item(0);
				menuImg.src = menuImg.src.replace(".gif", "_on.gif");

				if (this.submenu)
					this.submenu.style.display = "block";
				nav.current = this;
			}

			nav.isOver = true;
		}
		nav.menuseq++;
		nav.menu[nav.menuseq] = navAnchor;
	}
	if (nav.menu[seq])
		nav.menu[seq].onmouseover();
}





//Quick menu
function getPosition() {
	var start, end, scale, term;
	start = parseInt (document.getElementById('quickservice_layer').style.top, 0);
	end = document.documentElement.scrollTop + 260; //263
	term = 5;
	if ( start != end ) {
	scale = Math.ceil( Math.abs( end - start ) / 20 );
		if ( end < start )	scale = -scale;
		document.getElementById('quickservice_layer').style.top = parseInt (document.getElementById('quickservice_layer').style.top, 0)+ scale + "px";
		term = 1;
	}
	setTimeout ("getPosition()", term);
}
function moveBanner() {
	document.getElementById('quickservice_layer').style.top = document.documentElement.scrollTop + 260 + "px";  //263
	getPosition();
	return true;
};



//submenu
var rollFlag=0;
function txt_roll(str) {
	sub_num = str.substring(str.length - 2);
	sub_str = str.substring(0, str.length -2);
	if (document.all[str].style.display=="") {
		document.all[str].style.display="none";
		rollFlag=0;
		return;
	} else 	{
		if(rollFlag != 0) {
			document.all[sub_str+rollFlag].style.display="none";
			document.all[str].style.display="";
		}
		document.all[str].style.display="";
		rollFlag=sub_num;
	}
}

//==============================================================================================================//

