/* ------------------------------------------------------------
 * Name      : ±èÁöÇö
 * Created   : 2009/11/23 diosoft
 ------------------------------------------------------------ */

//»õÃ¢¶ç¿ì±â
function move_site(form) { 
        var myindex=form.cmbSearch.selectedIndex 
        if (form.cmbSearch.options[myindex].value == "") 
        { 
            alert("select"); 
        } 
        else 
        { 
            window.open(form.cmbSearch.options[myindex].value, "", "");  
        } 
}  


//µ¿¿µ»ó¶ç¿ì±â
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


//¿ÞÂÊ ³×ºñ
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_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_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_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 top2menuView(a) //2Â÷¸Þ´ºº¸±â
{
	if(this.id){
		eidStr = this.id;
		eidNum=eidStr.substring(eidStr.lastIndexOf("m",eidStr.length)+1,eidStr.length);
		a = parseInt(eidNum);
	}
	top2menuHideAll();
	top1Menu = document.getElementById("top1m"+a);
	top2Menu = document.getElementById("top2m"+a);
	if(a<10){ann='0'+a;} else {ann=''+a;}
	if (a=0) { //¸ÞÀÎÀº2Â÷¸Þ´ºÈ°¼ºÈ­¾ÈÇÔ
	} else {
		if (top1Menu) {
			top1Menu.getElementsByTagName("img")[0].src="/img/btn/top1m" + ann + "on.gif";
//			top1Menu.style.textDecoration="underline"; //ÅØ½ºÆ®ÀÏ¶§
//			top1Menu.style.fontWeight="bold"; //ÅØ½ºÆ®ÀÏ¶§
//			top1Menu.style.letterSpacing="-1px"; //ÅØ½ºÆ®ÀÏ¶§
			if (top2Menu) { top2Menu.style.display = 'inline'; }
		}
	}
}

function top2menuHide(a) //2Â÷¸Þ´º°¨Ãß±â
{
	if(this.id){
		eidStr = this.id;
		eidNum=eidStr.substring(eidStr.lastIndexOf("m",eidStr.length)+1,eidStr.length);
		a = parseInt(eidNum);
	}
	top2menuHideAll();
	top1Menu = document.getElementById("top1m"+a);
	top2Menu = document.getElementById("top2m"+a);
	top1MenuCurr = document.getElementById("top1m"+sMenuTopMain);
	top2MenuCurr = document.getElementById("top2m"+sMenuTopMain);
	if(a<10){ann='0'+a;} else {ann=''+a;}
	if (top1Menu) {
		top1Menu.getElementsByTagName("img")[0].src="/img/btn/top1m" + ann + ".gif";
//		top1Menu.style.textDecoration="none"; //ÅØ½ºÆ®ÀÏ¶§
//			top1Menu.style.fontWeight="normal"; //ÅØ½ºÆ®ÀÏ¶§
//			top1Menu.style.letterSpacing="0"; //ÅØ½ºÆ®ÀÏ¶§
		if (top2Menu) { top2Menu.style.display = 'none'; }
		if (top1MenuCurr) {
			top1MenuCurr.getElementsByTagName("img")[0].src = "/img/btn/top1m0"+sMenuTopMain+"on.gif";
//		top1MenuCurr.style.textDecoration="underline"; //ÅØ½ºÆ®ÀÏ¶§
//			top1MenuCurr.style.fontWeight="bold"; //ÅØ½ºÆ®ÀÏ¶§
//			top1MenuCurr.style.letterSpacing="-1px"; //ÅØ½ºÆ®ÀÏ¶§
			}
		if (top2MenuCurr) { top2MenuCurr.style.display = 'inline'; }
	}
}

function top2menuHideAll() //2Â÷¸Þ´º¸ðµÎ°¨Ãß±â
{
	top1menuEl = document.getElementById("top1menu").childNodes;
	for (i=1;i<=top1menuEl.length;i++)
	{
		top1Menu = document.getElementById("top1m"+i);
		top2Menu = document.getElementById("top2m"+i);
		if(i<10){inn='0'+i;} else {inn=''+i;}
		if (top1Menu) {
			top1Menu.getElementsByTagName("img")[0].src="/img/btn/top1m" + inn + ".gif";
//			top1Menu.style.textDecoration="none"; //ÅØ½ºÆ®ÀÏ¶§
//			top1Menu.style.fontWeight="normal"; //ÅØ½ºÆ®ÀÏ¶§
//			top1Menu.style.letterSpacing="0"; //ÅØ½ºÆ®ÀÏ¶§
			if (top2Menu) { top2Menu.style.display = 'none'; }
		}
	}
}

function initTopMenu() {
 	top1menuEl = document.getElementById("top1menu").childNodes;
//	alert(top1menuEl.length);
		for (i=1;i<=top1menuEl.length;i++)
	{
		top1Menu = document.getElementById("top1m"+i);
		top2Menu = document.getElementById("top2m"+i);

		if (top2Menu) {

			top2MenuCurrAct = document.getElementById("top2m"+sMenuTopMain+"m"+sMenuTopSub);
			left2MenuCurrAct = document.getElementById("sub2m"+sMenuTopSub);

			if (top1Menu) {
				top1Menu.onmouseover = top1Menu.onfocus = top2menuView;
				top1Menu.onmouseout = top2menuHide;
				if (top2Menu) {
					top2Menu.onmouseover = top2Menu.onfocus = top2menuView;
					top2Menu.onmouseout = top2menuHide;
				}
	 

				
				if (top2MenuCurrAct) {
					top2MenuCurrAct.getElementsByTagName("img")[0].src="/img/btn/top2m" + sMenuTopMain + "m"+ sMenuTopSub +"_on.gif";
					left2MenuCurrAct.getElementsByTagName("img")[0].src="/img/btn/navi_on_" + sMenuTopMain +""+ sMenuTopSub +".gif";
				}
	 
			}

		} else {

			top2MenuCurrAct = document.getElementById("top2m"+sMenuTopMain+"m"+sMenuTopSub);
			left2MenuCurrAct = document.getElementById("sub2m"+sMenuTopSub);

			if (top1Menu) {
				left2MenuCurrAct.getElementsByTagName("img")[0].src="/img/btn/navi_on_" + sMenuTopMain +""+ sMenuTopSub +".gif";
			}
	 
		}

		
	}
	//2Â÷¸Þ´º°¡ ÅØ½ºÆ®ÀÏ¶§¸¸ »ç¿ë
	//top2MenuCurrAct = document.getElementById("top2m"+sMenuTopMain+"m"+sMenuTopSub);
	//if (top2MenuCurrAct) { top2MenuCurrAct.getElementsByTagName("a")[0].style.color="#ffffff"; }
	//if (top2MenuCurrAct) { top2MenuCurrAct.getElementsByTagName("a")[0].style.fontWeight="bold"; }
	//if (top2MenuCurrAct) { top2MenuCurrAct.getElementsByTagName("a")[0].style.backgroundColor ="#999999";}
}

