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

	function clrImg(obj){
			obj.style.backgroundImage="";
			obj.onkeydown=obj.onmousedown=null;
		
	}


//»õÃ¢¶ç¿ì±â
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];}
}

/* ÀÌ¹ÌÁöÆË¾÷ */
var imgObj = new Image();
function showImgWin(imgName) {
  imgObj.src = imgName;
  setTimeout("createImgWin(imgObj)", 100);
}
function createImgWin(imgObj) {
  if (! imgObj.complete) {
    setTimeout("createImgWin(imgObj)", 100);
    return;
  }
  heatingWin = window.open("", "heatingWin","width=" + imgObj.width + ",height=" + imgObj.height);
  heatingWin.document.write("<html><body style='margin:0'>");
  heatingWin.document.write("<a href='javascript:window.close()'><img src='" + imgObj.src + "'border=0></a>");
  heatingWin.document.write("</body><html>");
  heatingWin.document.title = imgObj.src; 
}


//Å¾¸Þ´º

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 (top1Menu) {
			top1Menu.onmouseover = top1Menu.onfocus = top2menuView;
			top1Menu.onmouseout = top2menuHide;
			if (top2Menu) {
				top2Menu.onmouseover = top2Menu.onfocus = top2menuView;
				top2Menu.onmouseout = top2menuHide;
			}
		}
	}
	//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"; }
}




//Äü¸Þ´º
/*
var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");

function CheckUIElements(){
var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;

if ( bNetscape4plus ) { 
  yMenuFrom = document["divMenu"].top;
  yMenuTo = top.pageYOffset + 100;
}
else if ( bExplorer4plus ) {
  yMenuFrom = parseInt (divMenu.style.top, 10);
  yMenuTo = document.body.scrollTop + 100;
}

timeoutNextCheck = 500;

if ( Math.abs (yButtonFrom - (yMenuTo + 77)) < 6 && yButtonTo < yButtonFrom ) {
  setTimeout ("CheckUIElements()", timeoutNextCheck);
  return;
}

if ( yButtonFrom != yButtonTo ) {
  yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
  if ( yButtonTo < yButtonFrom )
    yOffset = -yOffset;

  if ( bNetscape4plus )
    document["divLinkButton"].top += yOffset;
  else if ( bExplorer4plus )
    divLinkButton.style.top = parseInt (divLinkButton.style.top, 10) + yOffset;

  timeoutNextCheck = 10;
}
if ( yMenuFrom != yMenuTo ) {
  yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );

  if ( yMenuTo < yMenuFrom )
    yOffset = -yOffset;

  if ( bNetscape4plus )
    document["divMenu"].top += yOffset;
  else if ( bExplorer4plus )
    divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset;

  timeoutNextCheck = 10;
}

setTimeout ("CheckUIElements()", timeoutNextCheck);
}



function OnLoad(){
	var y;
	if ( top.frames.length )
	  if ( bNetscape4plus ) {
		document["divMenu"].top = top.pageYOffset + 50;
		document["divMenu"].visibility = "visible";
	  }
	  else if ( bExplorer4plus ) {
		divMenu.style.top = document.body.scrollTop + 50;
		divMenu.style.visibility = "visible";
	  }
	  CheckUIElements();
	  return true;
}
OnLoad();
*/

 

