//ÆË¾÷
function getCookie(strName){
	var strArg = new String(strName + "=");	
	var nArgLen, nCookieLen, nEnd;
	var i = 0, j;

	nArgLen    = strArg.length;
	nCookieLen = document.cookie.length;

	if(nCookieLen > 0) {
		while(i < nCookieLen) {
			j = i + nArgLen;
			if(document.cookie.substring(i, j) == strArg) {
				nEnd = document.cookie.indexOf (";", j);
				if(nEnd == -1) nEnd = document.cookie.length;
				return unescape(document.cookie.substring(j, nEnd));
			}
			i = document.cookie.indexOf(" ", i) + 1;
			if (i == 0) break;
		}
	}
	return("");
}

function setCookie(name,value) {
	var todayDate = new Date();
	todayDate.setTime(todayDate.getTime() + (1000 * 3600) * 24 * 1); 	//1ÀÏ
	document.cookie = name+"="+escape(value)+"; path=/;expires="+todayDate.toGMTString()+";";
}	

function closeWin(pop_seq) {
	var temp = pop_seq;
	setCookie(pop_seq, "checked");
	eval(temp).style.visibility = "hidden";
}
	
function divClose(pop_seq) {
	var temp = pop_seq;
	eval(temp).style.visibility = "hidden";
}	

function openDiv(no_seq, pop_left, pop_top, pop_width, pop_height, img_name, link_url, target) {

		var bottom_width;
		bottom_width = parseInt(pop_width) + 2;
		document.write("<div id='"+no_seq+"' style='position:absolute; left:"+pop_left+"; top:"+pop_top+"; width:"+pop_width+"; height:"+pop_height+"; z-index:0; visibility:visible;'>   "+
                             "    <div align='center'>  "+
                             "        <form name='ÆûÀÌ¸§'> "+
                             "            <table bgcolor='black' width='"+pop_width+"' border='0' align='center' cellpadding='1' cellspacing='0'> "+
                             "                <tr>  "+
                             "                    <td><a href='"+link_url+"' target='"+target+"'><img src='/popup/images/"+img_name+"' width='"+pop_width+"' height='"+pop_height+"' border='0'></a></td> "+
                             "                </tr> "+
                             "            </table> "+
                             "            <table width='"+bottom_width+"'  border='0' cellpadding='1' cellspacing='0' bgcolor='#000000'> "+
                             "                <tr>  "+
                             "                    <td width='80%' align='left' height='25'><INPUT type='checkbox' name='check' onclick=\"closeWin('"+no_seq+"');\"><font color='#FFFFFF'>¿À´ÃÇÏ·ç ´Ý±â</font></td> "+
                             "                    <td width='15%' >&nbsp;</td> "+
                             "                    <td width='5%'><a href='javascript:divClose("+no_seq+");'><img src='/images/main/btn_close.gif' width='11' height='11' border='0'></a></td> "+
                             "                </tr> "+
                             "            </table> "+
                             "        </form> "+
                             "    </div> "+
                             "</div>   ");
}


//if(getCookie("pop090930" ) != "checked"){
//	openDiv("pop090930", "0", "0", "280", "350", "20090930_allthat.jpg", "javascript:divClose(pop090930);", "");
//}

//if(getCookie("pop091016" ) != "checked"){
//	openDiv("pop091016", "0", "0", "298", "317", "20091016.jpg", "javascript:divClose(pop090930);", "");
//}


//if(getCookie("pop091106" ) != "checked"){
//	openDiv("pop091106", "0", "0", "500", "700", "20091106.jpg", "/hboard/hboard.php?bname=T_event&work=read&seq=7&page=1&key=&field=&snum=6", "");
//}


//if(getCookie("pop091217" ) != "checked"){
//	openDiv("pop091217", "0", "0", "400", "500", "20091217.jpg", "/Event/Specical_now_pre.php", "");
//}

//if(getCookie("pop20100114" ) != "checked"){
//	openDiv("pop20100114", "0", "0", "500", "670", "20100603.jpg", "/hboard/hboard.php?bname=T_event2", "");
//}

//if(getCookie("pop20100112" ) != "checked"){
//	openDiv("pop20100112", "0", "0", "400", "500", "20100210.jpg", "/Event/Specical_now_pre.php", "");
//}

//if(getCookie("pop20100323" ) != "checked"){
//	openDiv("pop20100323", "0", "0", "400", "500", "20100323.jpg", "/Event/Specical_now_pre.php", "");
//}

//if(getCookie("pop20100501" ) != "checked"){
//	openDiv("pop20100501", "0", "0", "300", "300", "20100430.jpg", "http://www.interfootball.co.kr", "_blank");
//}

//ÇÑ°¡À§
//if(getCookie("pop20110912" ) != "checked"){
//	openDiv("pop20110912", "0", "0", "350", "425", "20110905.jpg", "javascript:divClose(pop20110912);", "");
//}

//2011 ±ÙÇÏ½Å³â
//if(getCookie("pop101230" ) != "checked"){
//	openDiv("pop101230", "100", "50", "300", "370", "20101229_alltha.jpg", "javascript:divClose(pop101230);", "");
//}

//if(getCookie("pop20100927" ) != "checked"){
	//openDiv("pop20100927", "0", "0", "500", "670", "20100927.jpg", "/hboard/hboard.php?bname=T_event2", "");
//}

//½Ã½ºÅÛÁ¡°Ë
//if(getCookie("pop101220" ) != "checked"){
//	openDiv("pop101220", "50", "50", "280", "350", "20101216.jpg", "javascript:divClose(pop101220);", "");
//}

//¸Þ½Ã Ä£ÇÊ»çÀÎ Ãà±¸È­
//if(getCookie("pop20101102" ) != "checked"){
//	openDiv("pop20101102", "0", "0", "400", "723", "120101102.jpg", "/Event/Specical_now.php", "");
//}

//¾Æµð´Ù½ºÀÌº¥Æ®
//if(getCookie("pop20110727" ) != "checked"){
//	openDiv("pop20110727", "0", "0", "500", "614", "20111118.jpg", "/hboard/hboard.php?bname=T_user", "");
//}

//2012½Å³âÆË¾÷
//if(getCookie("pop20111230" ) != "checked"){
//	openDiv("pop20111230", "0", "0", "320", "370", "20111230.jpg", "javascript:divClose(pop20111230);", "");
//}
