function NoticeEvent()
{
	
	//theLayer.style.display="block";
	//document.all["theLayer"].style.top = document.all["divbaner"].offsetTop;
	//document.all["theLayer"].style.left = document.all["divbaner"].offsetLeft-30;
	//Main Layer
	if(notice_getCookie("popup") != "done")
	{
		//theLayer.style.display="block";	
		//document.all["theLayer"].style.top = document.all.divbaner.offsetTop;
		//document.all["theLayer"].style.left = document.all.divbaner.offsetLeft;
		//document.all["theLayer"].style.top = document.all["divbaner"].offsetTop;
		//document.all["theLayer"].style.left = document.all["divbaner"].offsetLeft;
	}
	
	// 정기점검 스크립트 호출
	ImgLocation();
	var objCookie = new _Cookie();
	var todaydate = new Date();

	objCookie.Read();
	
	var strValue=objCookie.FindName("ToAndToNotice");

	objCookie.Close();
	delete objCookie;
	var strdate = todaydate.getYear() + "/" + (todaydate.getMonth()+1) + "/" + todaydate.getDate();	

	if (strValue!=strdate)
	{

		//window.open("/Korea/popupwin/popup/20091001_notice.htm","ToAndToNotice","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=570");

		//window.open("/Korea/popupwin/popup/poplnishopEvet.htm","ToAndToNotice","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=450,height=630");

	}


NoticeEvent2();
}

function NoticeEvent2()
{
	var objCookie = new _Cookie();
	var todaydate = new Date();

	objCookie.Read();
	
	var strValue=objCookie.FindName("ToAndToNotice20081023");

	objCookie.Close();
	delete objCookie;
	var strdate = todaydate.getYear() + "/" + (todaydate.getMonth()+1) + "/" + todaydate.getDate();	
/*
	if (strValue!=strdate)
	{
		divlayer.style.display="block";
		divbaner.style.display="none";
		divRss.style.display="none";
	}
	else
	{
		divlayer.style.display="none";
		divbaner.style.display="block";
		divRss.style.display="block";
	}
	*/
	divlayer.style.display="none";
	divbaner.style.display="block";
	divRss.style.display="block";
}

function NoticeEvent3()
{
	var objCookie = new _Cookie();
	var todaydate = new Date();

	objCookie.Read();
	
	var strValue=objCookie.FindName("ToAndToNotice1");

	objCookie.Close();
	delete objCookie;
	var strdate = todaydate.getYear() + "/" + (todaydate.getMonth()+1) + "/" + todaydate.getDate();	

	if (strValue!=strdate)
	{
		scrH=screen.availHeight;
		scrW=screen.availWidth;
		var aaa="";
		/*if(scrW >1024)
		{
			 aaa= "height=780,width=550,top=0,left=0,menubar=no,scrollbars=no";
		}	
		else
		{
			aaa = "height=780,width=567,top=0,left=0,menubar=no,scrollbars=yes";
		}
*/
		window.open("/Korea/popupwin/popup/newtoandto_20080911.htm","ToAndToNotice1","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=350,height=480");
	}
}


function MoOpen()
{
	alert("서비스 준비 중 입니다.");
	return;
	//moForm = window.open("/korea/service/mo/sms.aspx", "Mo", "width=500,height=615,toolbar=no,scrollbars=auto,resizable=no,status=no");
	//moForm.focus();

}

function SiteTran(nValue)
{
	TranWin = window.open("/Korea/Service/WebTranslation/WebTran/SiteTran.aspx?u="+nValue+"&p=toandto_news", "ToAndToDom", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=1000,height=700");
	TranWin.focus();
}

function SiteTranEK(nValue)
{
	TranWin = window.open("/Korea/Service/WebTranslation/WebTran/siteTran.aspx?T=etran&slang=EN-US&tlang=KO-KR&U="+nValue, "ToAndToDom", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=1000,height=700");
	TranWin.focus();
}

function HeadGrammarViewOpen()
{
	var slc=1033, tlc=1042;
	var strSentence="";
	var strURL = "/Korea/Service/Grammar/Popup/GrammarView.aspx?SLC=1033&TLC=1042&Sentence=I love ToAndTo.";
	var moForm = window.open(strURL, "GrammarView", "width=800,height=600,toolbar=no,scrollbars=auto,resizable=no,status=no");
	moForm.focus();
}

function JaKoDictOpen(url)
{
	SWin = window.open("/korea/service/dict/popup/find.aspx?dic=ja2ko&word=%E7%BF%BB%E8%A8%B3", "LniSearch", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=500,height=620");
	SWin.focus();
}

function KoJaDictOpen(url)
{
	SWin = window.open("/korea/service/dict/popup/find.aspx?dic=ko2ja&word=%EB%B2%88%EC%97%AD", "LniSearch", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=500,height=620");
	SWin.focus();
}

function KoCnDictOpen(url)
{
	SWin = window.open("/korea/service/dict/popup/find.aspx?dic=ko2ch&word=%eb%b2%88%ec%97%ad", "LniSearch", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=500,height=620");
	SWin.focus();
}


function notice_setCookie( name, value, expiredays )
{
	if(document.all.popupCookie.checked == true){
		var todayDate = new Date();
        todayDate.setDate( todayDate.getDate() + expiredays );
        document.cookie = name + '=' + escape( value ) + '; path=/; expires=' + todayDate.toGMTString() + ';'
    hideMe();
 		return;
	}else{
		hideMe();
	}
}
function notice_getCookie( name )
{
  var nameOfCookie = name + "=";
  var x = 0;
  while ( x <= document.cookie.length )
  {
   var y = (x+nameOfCookie.length);
   if ( document.cookie.substring( x, y ) == nameOfCookie ) {
    if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
      endOfCookie = document.cookie.length;
    return unescape( document.cookie.substring( y, endOfCookie ) );
   }
   x = document.cookie.indexOf( " ", x ) + 1;
   if ( x == 0 ) break;
  }
  return "";
}

function hideMe()
{
	document.all["theLayer"].style.display="none";
}
