<!--

//#############################################################################
    
		var workingChk="N";
		
//#############################################################################

function getServerCookie( cookieName ){
    var search = cookieName + "=";
    var cookie = document.cookie;
    if( cookie.length > 0 ){
         startIndex = cookie.indexOf( cookieName );
         if( startIndex != -1 ){
             startIndex += cookieName.length;
             endIndex = cookie.indexOf( ";", startIndex );
             if( endIndex == -1) endIndex = cookie.length;
             return unescape( cookie.substring( startIndex + 1, endIndex ) );
         }else{
             return false;
         }
    }else{
         return false;
    }
 }
 
 
function setCookieDiv( name, value, expiredays ) {
  	var todayDate = new Date();
  	todayDate.setDate( todayDate.getDate() + expiredays );
  	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function makeCookie() { 
  	var urlTxt=location.href;
    urlTxt=urlTxt.replace("http://","")
    urlTxt=urlTxt.replace("www.","")		
		var ppos = urlTxt.indexOf(".")
    urlTxt = urlTxt.substring(0,ppos)
		setCookieDiv( "serverNotice", urlTxt , 1)
}    

 
 
 function closeDiv( ){
   var tdiv=document.getElementById("serverDIV");
	 var chkbx=document.getElementById("check_close");
	 if(tdiv){
	     if(chkbx.checked==true){
			     makeCookie();
			 }
	     tdiv.style.display="none";
	 }
 }

//function openNoticeLayer(){



		
		 
		if(workingChk=="Y"){
        var urlTxt=location.href;
        urlTxt=urlTxt.replace("http://","")
        urlTxt=urlTxt.replace("www.","")		
				var ppos = urlTxt.indexOf(".")
        urlTxt = urlTxt.substring(0,ppos)
			  var chkCookie=getServerCookie("serverNotice");
				if(chkCookie!=urlTxt){
				    var newObj=document.createElement("div");
						newObj.id="serverDIV";
						newObj.style.position="absolute";
						newObj.style.left="20px";
						newObj.style.top="20px";
						newObj.style.border="1px";
						newObj.style.borderStyle="solid";
						
				    newObj.innerHTML="<table border='0' cellspacing='0' cellpadding='0' >"+
														 "  <tr>"+
  													 "  <td><img src='http://www.meci.co.kr/notice/images/serverworking.gif' width='450' height='730' border='0' usemap='#Map'></td>"+
 														 " </tr>"+
														 "	 <tr>"+
														 "    <td height='30' align='center' bgcolor='#DFDFDF'>"+
														 "		  <table width='96%' border='0' cellspacing='0' cellpadding='0'>"+
														 "      <tr>"+
														 "        <td class='style1' style='padding-right:10'>I do not want to see this window anymore."+
														 "          <input type='checkbox' name='check_close' id='check_close' value='checkbox'></td>"+
														 "        <td align='right'><img src='http://www.meci.co.kr/notice/images/close_btn2.gif' width='52' height='19' border='0' onClick='javascript:closeDiv();' style='cursor:pointer;'></td>"+
														 "      </tr>"+
														 "      </table>"+
														 "		</td>"+
														 "  </tr>"+
														 "</table>"
														 

						document.body.appendChild(newObj)
				}
 	  }
//}

//-->
