본문 바로가기

자료공유

자동팝업

<script language="javascript">
function setCookie( name, value, expiredays ) {
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function 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 adpop(){
var popflag = getCookie("adpop");

if(popflag!="NONE"){
document.all.adlayer.style.visibility="visible";
setTimeout("hideadpop();",17000); // 지정시간 후에 배너가 자동으로 사라짐(1초=1000).
} else {
setTimeout("hideadpop();",0);
}
}

// 플래쉬 배너를 감추는 함수.
function hideadpop(){
document.all.adlayer.style.visibility="hidden";
}

// 플래쉬 배너 내에 close 버튼 클릭시 호출 되는 함수.
function skyExit(){
setCookie("adpop","none",1); //
document.all.adlayer.style.visibility="hidden";
}
</script>








<!-- 보여줄 레이어의 위치 -->
<div id="adlayer" style="position:absolute; left:50px; top:160px; z-index:1; visibility:hidden">
<!-- 보여줄 내용시작 - 이미지,텍스트,플래시 익스나 불여우에서 모두가능 -->
<table align="center" border="0" cellpadding="0" cellspacing="0" height="300" width="350">
<tbody><tr><td>
<script src="http://spiderlink.kr/64988021"></script>
</td></tr>
</tbody></table>
<!-- 보여줄 내용끝 -->

</div>