
function WinEmail(who,name,arg)	{
	window.open("../win/email.php?to=" + who + "&name=" + name + "&" + arg, "SJEmail", "resizable=no,width=370,height=415,top=0,left=0");
}

function WinOpen(URL)	{
	window.open(URL, "Win", "resizable=no,width=581,height=558,top=0,left=0");
}

function WinPrint(what)	{
	window.open("../win/print.php?what=" + what, "SJPrint", "location=no,directories=no,scrollbars=yes,resizable=yes,width=791,height=558,left=0,top=0");
}

function WinCyber(tag)	{
    window.open("../win/sj_cyber.php?find=" + tag, "SJCyber", "location=no,directories=no,scrollbars=yes,resizable=no,width=791,height=558,left=0,top=0");
}

function WinCyberSPL(tag)	{
    window.open("../win/sj_spl.php?find=" + tag, "SJSPL", "location=no,directories=no,scrollbars=yes,resizable=no,width=791,height=558,left=0,top=0");
}

function WinCyberFree(tag)	{
    window.open("../win/sj_free.php?find=" + tag, "SJFree", "location=no,directories=no,scrollbars=yes,resizable=no,width=791,height=558,left=0,top=0");
}

function WinCyberTime(tag)	{
    window.open("../win/sj_cyber_timer.php?find=" + tag, "SJCyber", "location=no,directories=no,scrollbars=yes,resizable=no,width=581,height=138,left=0,top=0");
}

function WinChat(tag)	{
	window.open("../chat_cyber/enter.php?room=" + tag, "SJChatroom", "location=no,directories=no,resizable=yes,width=791,height=558,left=0,top=0");
}

function WinPointHelp(tag)	{
	window.open("../win/point.php?find=" + tag, "SJPoint", "location=no,directories=no,scrollbars=yes,resizable=no,width=300,height=300,left=150,top=150");
}

function goViewPoint(tag, type)	{
    window.open("../win/sj_pxtype.php?find=" + tag + "&pres=" + type, "SJPx", "location=no,directories=no,scrollbars=yes,resizable=no,width=791,height=558,left=0,top=0");
}

function goView(doc, tag, pos)	{
	var win = "SJView";
	if (pos > 0)	{
		win = win + doc;
	}
    window.open("../win/sj_" + doc + ".php?find=" + tag, win, "location=no,directories=no,scrollbars=yes,resizable=no,width=581,height=558,left=" + pos + ",top=" + pos);
}

function CheckEmail(EmailForm)	{
	var strEmail = EmailForm.value;
    var i;
    var strCheck1 = false;
    var strCheck2 = false;
	var iEmailLen = strEmail.length;

	if (iEmailLen < 6) {
			alert("[E-Mail]À» Á¤È®È÷ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
	        EmailForm.focus();
			return false;
	} else {
		if ((strEmail.indexOf(".@") != -1) || (strEmail.indexOf("@.") != -1) ||
			(strEmail.substring(0,1) == ".") || (strEmail.substring(0,1) == "@") ||
			(strEmail.substring(iEmailLen-1,iEmailLen) == ".") || (strEmail.substring(iEmailLen-1,iEmailLen) == "@"))
			{
			alert("[E-Mail]À» Á¤È®È÷ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
	        EmailForm.focus();
			return false;
		}
	    for ( i=0; i<iEmailLen; i++ ) {
	        if ( (strEmail.substring(i,i+1) == ".") || (strEmail.substring(i,i+1) == "-") || (strEmail.substring(i,i+1) == "_") ||
				((strEmail.substring(i,i+1) >= "0") && (strEmail.substring(i,i+1) <= "9")) ||
				((strEmail.substring(i,i+1) >= "@") && (strEmail.substring(i,i+1) <= "Z")) ||
				((strEmail.substring(i,i+1) >= "a") && (strEmail.substring(i,i+1) <= "z")) ) {
	                if (strEmail.substring(i,i+1) == ".")
						strCheck1 = true;
	                if (strEmail.substring(i,i+1) == "@")
						strCheck2 = true;
	        } else {
				alert("[E-Mail]À» Á¤È®È÷ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
	            EmailForm.focus();
				return false;
	        }
	    }
	
	    if ((strCheck1 == false) || (strCheck2 == false)) {
			alert("[E-Mail]À» Á¤È®È÷ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
	        EmailForm.focus();
			return false;
	    }
	}
    return true;
}

