function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}


// ID Ã£±â
function id(){
		var NewURL = '../member/idsearch.asp';
		window.open(NewURL,"idnew","toolbar=no,width=300,height=250,top=30,left=30,menubar=no,scrollbars=no,resizable=no");
}

// À¥¸¶½ºÅÍÇÑÅ× ¸ÞÀÏº¸³»±â ¸µÅ© »õ Ã¢
function paddress(K,A) {
	var NewURL = 'http://www.swmail.co.kr/home_mail.asp?receiver_email='+K+'&receiver='+A;
	window.open(NewURL,"new1","toolbar=no,width=410,height=400,top=0,left=0,menubar=no,scrollbars=yes,statusbar=no,resizable=no,locationdirectories=no");	
}

function newwin(URL,width,height) 
{
		var str,width,height;
		str="'toolbar=no,top=0,left=0,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,,location=no,directories=no,status=no,copyhistory=no,";
		str=str+"width="+width;
		str=str+",height="+height+"'";
		window.open(URL,"new",str);
}

function newwin1(URL,width,height) 
{
		var str,width,height;
		str="'toolbar=no,top=0,left=0,menubar=no,scrollbars=no,resizable=no,copyhistory=no,,location=no,directories=no,status=no,copyhistory=no,";
		str=str+"width="+width;
		str=str+",height="+height+"'";
		window.open(URL,"new1",str);
}

function login()
{
		if(document.login.id.value=="")
		{
				alert("È¸¿ø ¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
				document.login.id.focus();
				return;
		}

		if(document.login.pass.value=="")
		{
				alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
				document.login.pass.focus();
				return;
		}

		if(document.login.ssl_login.checked ) {
			//document.login.action = "./login2.asp";
			document.login.action = "https://login.sw.co.kr/login2.asp";
		} else {
			document.login.action = "./login2.asp";
		}

		document.login.submit();
}

function EnterCheck(i) 
{
		if(event.keyCode ==13 && i==1) 
		{ 
			 if(document.login.id.value=="")
				{
						alert("È¸¿ø ¾ÆÀÌµð¸¦ ÀÔ·Â¹Ù¶ø´Ï´Ù");
						document.login.id.focus();
						return;
				}
		document.login.pass.focus(); 
	    }
	    if(event.keyCode ==13 && i==2) 
	    { 
				

				if(document.login.pass.value=="")
				{
						alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
						document.login.pass.focus();
						return;
				}
				
				if(document.login.ssl_login.checked ) {
					//document.login.action = "./login2.asp";
					document.login.action = "https://login.sw.co.kr/login2.asp";
				} else {
					document.login.action = "./login2.asp";
				}

				document.login.submit();
	    } 
}


function logout()
{
	msg=confirm("·Î±×¾Æ¿ôÇÏ½Ã°Ú½À´Ï±î?");
	if(msg==true)
	{
		location.href="../login/logout.asp";
	}
	else
	{
		return;
	}
}

function logout2()
{
	msg=confirm("·Î±×¾Æ¿ôÇÏ½Ã°Ú½À´Ï±î?");
	if(msg==true)
	{
		location.href="../login/logout2.asp";
	}
	else
	{
		return;
	}
}


function toggle(e)
{
    
    var targetid, srcElement, targetElement;
    srcElement= window.event.srcElement;

    targetid= srcElement.id + "C";    
    targetElement = document.all(targetid);    
    
   if(targetElement.style.display=="none")
   {
      closeSub();         
      targetElement.style.display="";
   }
   else
   {
      if (targetElement == document.all.aspListd)
      {
         closeSub();
      }
      
      targetElement.style.display="none";   
   }
}


function closeSub()
{
 	   document.all.passWEC.style.display = "none";
	   document.all.passWDC.style.display = "none";
}     