var op1=0,op2=0,op3=0,op4=0,op5=0,op6=0,op7=0,op8=0,op9=0,op10=0; function lostblur(){ clearTimeout(time1); } window.onblur=lostblur; window.onfocus=openwindow_t; var newWindow = null function windowOpener(loadpos) { if (! newWindow || newWindow.closed) { newWindow = window.open(loadpos,"cj","width=300,height=342,left=80,top=80"); }else { newWindow.focus(); } } function openwindow_t(){ time1=setTimeout("openwindow_t()",5000,"javascript"); var date1=new Date(); var exd=new Date(); exd.setTime(exd.getTime()+(300*1000)); if(date1.getFullYear()==2005&&date1.getMonth()==2&&(date1.getDate()>=14&&date1.getDate()<=18||date1.getDate>=21&&date1.getDate()<=24)) { if(date1.getHours()==10&&(date1.getMinutes()>=7&&date1.getMinutes()<=10)&&GetCookie("opencj1")!="1"&&op1==0){ windowOpener('/zhuanti/zjmd_mz050311_11.asp'); SetCookie("opencj1","1",exd); op1=1; } if(date1.getHours()==11&&(date1.getMinutes()>=7&&date1.getMinutes()<=10)&&GetCookie("opencj2")!="1"&&op2==0){ windowOpener('/zhuanti/zjmd_mz050311_12.asp'); SetCookie("opencj2","1",exd); op2=1; } if(date1.getHours()==12&&(date1.getMinutes()>=7&&date1.getMinutes()<=10)&&GetCookie("opencj3")!="1"&&op3==0){ windowOpener('/zhuanti/zjmd_mz050311_13.asp'); SetCookie("opencj3","1",exd); op3=1; } if(date1.getHours()==13&&(date1.getMinutes()>=7&&date1.getMinutes()<=10)&&GetCookie("opencj4")!="1"&&op4==0){ windowOpener('/zhuanti/zjmd_mz050311_14.asp'); SetCookie("opencj4","1",exd); op4=1; } if(date1.getHours()==14&&(date1.getMinutes()>=7&&date1.getMinutes()<=10)&&GetCookie("opencj5")!="1"&&op5==0){ windowOpener('/zhuanti/zjmd_mz050311_15.asp'); SetCookie("opencj5","1",exd); op5=1; } if(date1.getHours()==15&&(date1.getMinutes()>=7&&date1.getMinutes()<=10)&&GetCookie("opencj6")!="1"&&op6==0){ windowOpener('/zhuanti/dd_qyl050310_16.asp'); SetCookie("opencj6","1",exd); op6=1; } if(date1.getHours()==16&&(date1.getMinutes()>=7&&date1.getMinutes()<=10)&&GetCookie("opencj7")!="1"&&op7==0){ windowOpener('/zhuanti/dd_qyl050310_17.asp'); SetCookie("opencj7","1",exd); op7=1; } if(date1.getHours()==17&&(date1.getMinutes()>=7&&date1.getMinutes()<=10)&&GetCookie("opencj8")!="1"&&op8==0){ windowOpener('/zhuanti/dd_qyl050310_18.asp'); SetCookie("opencj8","1",exd); op8=1; } if(date1.getHours()==18&&(date1.getMinutes()>=7&&date1.getMinutes()<=10)&&GetCookie("opencj9")!="1"&&op9==0){ windowOpener('/zhuanti/dd_qyl050310_19.asp'); SetCookie("opencj9","1",exd); op9=1; } if(date1.getHours()==19&&(date1.getMinutes()>=7&&date1.getMinutes()<=10)&&GetCookie("opencj10")!="1"&&op10==0){ windowOpener('/zhuanti/dd_qyl050310_20.asp'); SetCookie("opencj10","1",exd); op10=1; } } } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name, value,expires) { document.cookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString() + "; path=/"; } function DeleteCookie (name) { var exp = new Date(); exp.setTime (exp.getTime() - 1); var cval = GetCookie (name); document.cookie = name + "=" + cval + "; //expires=" + exp.toGMTString(); } function getCookieVal(offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); }