var set_tmnu = 0;
function set_menu(no) {
	set_tmnu = parseInt(no);
	if(set_tmnu > 0 && (document.getElementById("m"+set_tmnu) != null))
	{	    
		    //document.getElementById("m"+set_tmnu).className = "on" ;
	}
}
function tmnu_on(no) {
    var subMenu = "sm" + no ;
    var subMenu2 = "sms" + no ;
    if(document.getElementById(subMenu) != null)
    {
       document.getElementById(subMenu).style.display = "block"  ;
       document.getElementById(subMenu2).style.display = "block"  ;
    }
}
function tmnu_off(no) {
    var subMenu = "sm" + no ;
	var subMenu2 = "sms" + no ;
    if(document.getElementById(subMenu) != null)
    {
       document.getElementById(subMenu).style.display = "none"  ;
	   document.getElementById(subMenu2).style.display = "none"  ;
    }
}


function on_layer(layer_name) {
	document.getElementById(layer_name).style.visibility="visible";
}
function off_layer(layer_name) {
	document.getElementById(layer_name).style.visibility="hidden";
}


function addBookMark(url, title) {
    // user agent sniffing is bad in general, but this is one of the times 
    // when it's really necessary
    var ua=navigator.userAgent.toLowerCase();
    var isKonq=(ua.indexOf('konqueror')!=-1);
    var isSafari=(ua.indexOf('webkit')!=-1);
    var isMac=(ua.indexOf('mac')!=-1);
    var buttonStr=isMac?'Command/Cmd':'CTRL';

    if(window.external && (!document.createTextNode ||
      (typeof(window.external.AddFavorite)=='unknown'))) {
        // IE4/Win generates an error when you
        // execute "typeof(window.external.AddFavorite)"
        // In IE7 the page must be from a web server, not directly from a local 
        // file system, otherwise, you will get a permission denied error.
        window.external.AddFavorite(url, title); // IE/Win
    } else if(isKonq) {
      NMMessageBox('confirm', 'Information', 'You need to press CTRL + B to bookmark our site.');
    } else if(window.opera) {
      void(0); // do nothing here (Opera 7+)
    } else if(window.home || isSafari) { // Firefox, Netscape, Safari, iCab
      NMMessageBox('confirm', 'Information', 'You need to press '+buttonStr+' + D to bookmark our site.');
    } else if(!window.print || isMac) { // IE5/Mac and Safari 1.0
      NMMessageBox('confirm', 'Information', 'You need to press Command/Cmd + D to D to bookmark our site.');
    } else {
      NMMessageBox('confirm', 'Information', 'In order to bookmark this site you need to do so manually through your browser.');
    }
  }

try {document.execCommand("BackgroundImageCache",false,true);}catch(e){}




/*2009. common js*/

/*show,hide*/
function Div_Show(str){
	document.getElementById(str).style.display = "block";
}
function Div_Hide(str){
	document.getElementById(str).style.display = "none";
}

/*gnb sub layer*/
var gnb_mnu = document.getElementById("gnb_mnu").getElementsByTagName("dl");

for (var gb_mn_i=0;gb_mn_i<gnb_mnu.length;gb_mn_i++) {
	gnb_mnu_over = function() {
        var from = arguments[0]?arguments[0].relatedTarget:event.fromElement; 	  
        while(from) { 
            if(from == this) return; 
            from = from.parentNode; 
        }
		this.parentNode.className = this.parentNode.className + "_on";
	}
	gnb_mnu_out = function() {	    
        var to = arguments[0]?arguments[0].relatedTarget:event.toElement;
        while(to) { 
            if(to == this) return; 
            to = to.parentNode; 
        }	     
		this.parentNode.className = this.parentNode.className.replace("sub_on","sub");
	}
	gnb_mnu[gb_mn_i].onmouseover = gnb_mnu_over;
	gnb_mnu[gb_mn_i].onmouseout = gnb_mnu_out;
}