// ´Ù~ º¯¼öÀ̸§´ë·Î ¿ªÈ°... function splitDate(time) { // gna ,...gksqkddp gksms aptjem djqtskd... var year = month = day = hour = minute = second = ""; year = time.substring(0,4); month = time.substring(5,7); day = time.substring(8,10); hour = time.substring(11,13); minute = time.substring(14,16); return new Date(year, month-1, day, hour, minute); } function AutoPopup() { var srcTree = new ActiveXObject("msxml.DOMDocument"); srcTree.async = false; srcTree.resolveExternals = false; srcTree.validateOnParse = false; srcTree.load("/Popup.xml"); if ( ! srcTree.documentElement ) return; var root = srcTree.documentElement.selectNodes("//root").item(0); var PopupCount = root.childNodes.length; var CurrentPage = document.location.pathname; // tlqkqufwltdmfekgksp if ( CurrentPage == "/" ) CurrentPage = "/index.asp"; var PopupURL = PopupName = PopupFeatures = tmp = ""; for ( var i = 0; i < PopupCount; i ++ ) { if ( CurrentPage == root.childNodes(i).childNodes(3).text ) { if ( ! ( new Date() > splitDate(root.childNodes(i).childNodes(10).text) && new Date() < splitDate(root.childNodes(i).childNodes(11).text) ) ) continue; PopupName = root.childNodes(i).childNodes(1).text; PopupURL = root.childNodes(i).childNodes(2).text; tmp += "width=" + root.childNodes(i).childNodes(4).text + ","; tmp += "height=" + root.childNodes(i).childNodes(5).text + ","; tmp += "top=" + root.childNodes(i).childNodes(6).text + ","; tmp += "left=" + root.childNodes(i).childNodes(7).text + ","; tmp += "scrollbars="; if ( root.childNodes(i).childNodes(8).text == "True" ) tmp += "yes"; else tmp += "no"; tmp += ", " + root.childNodes(i).childNodes(9).text; // etc PopupFeatures = tmp; tmp = ""; // ¿À´Ã ÇÏ·ç ¤³¤³2Çϴ°Å...] //document.write (getCookie(root.childNodes(i).childNodes(0).text) ); if ( ! getCookie(root.childNodes(i).childNodes(0).text) ) { //var tmp = window.open(PopupURL, PopupName, PopupFeatures); //if (tmp) tmp.focus(); window.open(PopupURL, PopupName, PopupFeatures); } } } } 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 ""; } AutoPopup();