function search_idpw(){

	window.open("/main/login/searchIDPW.jsp", "choosetext", "width=400,height=450,scrollbars=no,toolbars=no");

}

function formsubmit(){
	if(event.keyCode == 13)
		Login_OK();
}

function login_link(login_yn, url){
	if(login_yn=='true'){
		document.location.href=url;
	}else{
		alert('로그인 후, 사용 가능한 메뉴입니다.');
		document.loginform.u_id.focus();
	}
}

function login_link_check(login_yn){
	if(login_yn=='false'){
		alert('로그인 해주세요!');
		document.loginform.u_id.focus();
	}
}

var DHTML = (document.getElementById || document.all || document.layers);

function getObj(name) {
  if (document.getElementById)
  {
	this.obj = document.getElementById(name);
		if ( this.obj != null )
		{
	  this.style = document.getElementById(name).style;
		}
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
	this.obj = document.layers[name];
	this.style = document.layers[name];
  }
}

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_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 alignMenu() {
  HM_UserAgent = navigator.userAgent;
  HM_DOM = (document.getElementById) ? true : false;
  HM_NS4 = (document.layers) ? true : false;
  HM_IE = (document.all) ? true : false;
  HM_IE4 = HM_IE && !HM_DOM;
  HM_Mac = (navigator.appVersion.indexOf("Mac") != -1);
  HM_IE4M = HM_IE4 && HM_Mac;

}


function DivSetMenu2Visible(state) 
{ 
  if (!self.innerHeight) {
	var DivRef = document.getElementById("menu2");  
	var IfrRef = document.getElementById("DivShimMenu2");
	if (IfrRef != null)
	{	 
	  if(state) {  
		DivRef.style.visibility = "visible"; 
		IfrRef.style.width = DivRef.offsetWidth - 10; 
		IfrRef.style.height = '168px'; //DivRef.offsetHeight;  
		IfrRef.style.top = DivRef.style.top;  
		IfrRef.style.left = DivRef.style.left;  
		IfrRef.style.zIndex = DivRef.style.zIndex - 1;  
		IfrRef.style.display = "block"; 
	  }  
	  else {  
		DivRef.style.visibility = "hidden";  
		IfrRef.style.display = "none";  
	  }
	}
  }
} 


function changeCol(colora,x) {
	if (!DHTML) return;
	var x = new getObj(x);
		if ( x != null ) 
		{
		  if ( x.style != null )
		  {
		x.style.color = colora;
		  }
		}
}

function topMenu(new_totcount)    { 
	var menu;
	var total_num = 6;
	for (i=1; i<=total_num; i++)   {
	  menu=eval("document.all.topmenublock"+i+".style");
	  if (i==new_totcount) {
		if (menu.display=="none")
			menu.display="block";
	  }else { 
		 if (menu.display=="block")
			menu.display="none";
	  }
	} 
} 
