	function setCookie( name, value, expirehours ) { 
    var todayDate = new Date(); 
        todayDate.setHours( todayDate.getHours() + expirehours ); 
        document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
    } 

function closeWin() { 
    if ( document.notice_form.chkbox.checked ){ 
        setCookie( "Gnb_cookie", "done" , 6 ); 
    } 
    document.getElementById('TopBanner').style.display = "none";
}

document.write(" \
<style type=text/css> \
#TopBanner { margin:0 auto; text-align:center; width:970px; display:block; } \
#Gnb_banner { width:970px; text-align:center; margin:0 auto; position:relative; padding:15px 0px 0px 0px;  } \
#Gnb_close { position: absolute; z-index: 9999; right:50px; top:83px; margin:0px 0px 0px 0px; padding:0px 0px 0px 0px;} \
</style> \
");

document.write ("<div id='TopBanner'>"); 

document.write ("<div id='Gnb_banner'> \
<!--IFRAME WIDTH=728 height=90 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 SRC=http://cad.chosun.com/RealMedia/ads/adstream_sx.ads/careview.chosun.com/news@Top></IFRAME--> \<div id='Gnb_close' class='basic_11'><form name='notice_form'><a href='javascript:closeWin();'> \
<img src='http://image.chosun.com/cs/200710/images/close.gif' align=absmiddle><\/a><input type='checkbox' name='chkbox' value='checkbox' onclick='javascript:closeWin();' checked style='visibility:hidden'><\/form><\/div> \
<\/div>"); 
document.write ("<\/div>"); 


cookiedata = document.cookie;    
if ( cookiedata.indexOf("Gnb_cookie=done") < 0 ){      
    document.getElementById('TopBanner').style.display = "block";
    } 
    else {
        document.getElementById('TopBanner').style.display = "none"; 
}

function refleshAD()
{
	if(document.getElementById('TopBanner').style.display == "block") {
		if((ad_obj = document.getElementById('CAD_CHOSUN')) != null) {
			ad_obj.src = "http://cad.chosun.com/RealMedia/ads/adstream_sx.ads/careview.chosun.com/news@Top";
			
			window.setTimeout("refleshAD()", 30000);
		}
	}
}

window.setTimeout("refleshAD()", 30000);

