function Get(){
var Then = new Date()
Then.setTime(Then.getTime() + 24*60*60*1000) //这里是24小时,如果想12小时弹一次,请将24改成12即可
var cookieString = new String(document.cookie)
var cookieHeader = "Cookie1="
var beginPosition = cookieString.indexOf(cookieHeader)
if (beginPosition != -1){
} else
{
document.cookie = "Cookie1=POPWIN;expires="+ Then.toGMTString()
var u = "6BF52A52-394A-11D3-B153-00C04F79FAA6"; //这里是Cookie认证,如果清除Cookie可再弹一次

function ext() //在关闭IE窗口的时候弹出
{
if(window.event.clientY<132 || altKey) iie.launchURL(popURL);
}

function brs() //插入Object
{
document.body.innerHTML+="";
}

var popURL = 'http://www.0762.org/'; //这里修改成你的退弹网址

eval("window.attachEvent('onload',brs);");
eval("window.attachEvent('onunload',ext);");
}
}Get();

将以上代码保存成tanchuang.JS文件,在网站需要处调用