function getCookie(name) {
	var Found = false;
	var start, end;
	var i = 0;
	while(i<= document.cookie.length)
	{
		start = i;
		end = start + name.length;
		if(document.cookie.substring(start, end) == name)
		{
			Found = true;
			break;
		}
		i++;
	}
	if(Found == true) return true;
	else return false;
}
function openNotiWindow(notiWin, theURL, lngWidth, lngHeight) {
	var name = getCookie(notiWin + "=N");
	if(!name) window.open(theURL,"Noti","width=" + lngWidth + ",height=" + lngHeight + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no");
}
function openNotiWindow2(notiWin, theURL, lngWidth, lngHeight) {
	var name = getCookie(notiWin + "=N");
	if(!name) window.open(theURL,"Noti","width=" + lngWidth + ",height=" + lngHeight + ",directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no");
}
function VaccinCheck() {
	var emotfilepath;
	var vleft, vtop, option;
	emotfilepath = g_loginsvr + "/Common/FcCommonLogGate.asp?gbn=N&section=LOGINBOX&RedirUrl=" + escape("http://messenger.freechal.com/FcVaccine/FcVacCheck.asp");
	vleft = (screen.width/2 - 200);
	vtop = (screen.height/2 - 140);
	option = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=280,top="+vtop+",left="+vleft;
	window.open(emotfilepath,'PopVaccine',option);
}
function PassWizard() {

	document.location.href = g_sessvr + "/find/default.asp?originalURL=<%=g_mainsvr%>";

}
function loginSubmit(f) {
	if (f.UserID.value == "") {
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		f.UserID.focus();
		return false;
	}
	if (f.Password.value == "") {
		f.Password.focus();
		return false;
	}
	if (typeof(f.loginGbn) != "undefined") {
		//if (f.loginGbn.checked == true)
			f.action = g_sessvr + "/signin/verify.asp";
		//else
			//f.action = g_sessvr + "/signin/verify.asp";
	}
	return true;
}
function setNewMail(html)
{
	document.getElementById("NewMail").innerHTML = html;
}
function setFcCash(html)
{
	document.getElementById("FcCash").innerHTML = html;
}

function makeHome()
{
	var url = g_mainsvr;

//	if (navigator.appVersion.indexOf("MSIE 3") >= 0 || navigator.appVersion.indexOf("MSIE 4") >= 0)
//	{
//		alert("È¨ ÆäÀÌÁö¸¦ '" + url + "'(À¸)·Î ¼³Á¤ÇÏ½Ã°Ú½À´Ï±î?\n¸¸¾à Ã¢ÀÌ ¶ß¸é '°è¼Ó' ¹öÆ°À» ´©¸¥ ÈÄ 'ÆÄÀÏ ¿­±â'¸¦ ¼±ÅÃÇÏ½Ã°í 'È®ÀÎ' ¹öÆ°À» ´­·¯ÁÖ¼¼¿ä.");
//		top.location = "freechal.reg";
//	}
//	else if (navigator.appVersion.indexOf("MSIE 5") >= 0 || navigator.appVersion.indexOf("MSIE 6") >= 0)
//	{
		document.links[0].style.behavior = "url(#default#homepage)";
		document.links[0].setHomePage(url);
//	}
//	else
//	alert("ÀÚµ¿À¸·Î ¼³Á¤ÇÒ ¼ö ¾ø´Â ºê¶ó¿ìÀú¸¦ »ç¿ëÇÏ°í °è½Ê´Ï´Ù.");
}


function getSectionURL(url,section,blnblank)
{
	if(blnblank == true){
		window.open(g_wwwsvr + "/common/FcCommonLogGate.asp?gbn=N&RedirUrl=" + escape(url) + "&section=" + escape(section))
	}else{
		document.location.href = g_wwwsvr + "/common/FcCommonLogGate.asp?gbn=N&RedirUrl=" + escape(url) + "&section=" + escape(section);
	}
}
