팝업 구현

##### 본문  PAGE 에 추가  ################

<script language=”JavaScript”>
//<!–
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 “”;
}
if ( notice_getCookie( “group_popup1” ) != “done” )
{
//noticeWindow = window.open(‘Pop.html’,’notice’,’left=0, top=0, width=480,height=620′);
noticeWindow = window.open(‘/Popup/popup.html’,”,’width=508,height=610, left=100, top=100′); // 팝업윈도우의 경로와 크기를 설정 하세요
noticeWindow.opener = self;
}
// –>
</script>

 

 

#####POPUP PAGE################
<HTML>
<HEAD>
<TITLE>요청사항</TITLE>
<link href=”style.css” rel=”stylesheet”>
</HEAD>
<script language=”javascript”>
<!–
function event_setCookie( name, value, expiredays )
{
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + “=” + escape( value ) + “; path=/; expires=” + todayDate.toGMTString() + “;”
}
function event_closeWin(){
event_setCookie( “group_popup1”, “done” , 1); // 1=하룻동안 공지창 열지 않음
self.close();
}
function goPage(){
opener.location.href=”/new_webmail/html/message-mail.html”;
self.close();
}
//–>
</script>
<BODY topmargin=”0″ leftmargin=”0″>
<table width=”500″ cellpadding=”0″ cellspacing=”0″ border=”0″>
<tr>
<td><img src=”01_1.gif” border=”0″ usemap=”#Map”></td>
</tr>

<tr>
<td height=”32″ align=”right” bgcolor=”f66e07″><table width=”200″ border=”0″ cellspacing=”0″ cellpadding=”0″>
<tr>
<td height=”20″ bgcolor=”f66e07″ align=”right”>
<a href=”javascript:event_closeWin()”><b><font color=”FFFFFF”>오늘 하루 동안 창을 열지 않음</font></b></a>
&nbsp;&nbsp;
</td>
</tr>
</table></td>
</tr>
</table>

<map name=”Map”>
<area shape=”rect” coords=”125,487,365,561″ href=”javascript:goPage()”>
</map>
</BODY>
</HTML>