//修改此处放置不同域内
DoMain="http://www.ip686.com";
//修改此处显示链接文字，如[流量交换]
poptxt="<img src='"+DoMain+"/img/ip.gif' border='0'>";
//修改此处显示链接标题说明文字，如：[超级流量交换平台]
poptitle ="[ip686弹窗联盟]";
//修改此处,用于指定输出弹出代码的脚本页面，原popup.asp
popupasp="popup.asp";
//修改此处，用于指定COOKIES，要和后台设置保持一致
popwin="popwins";
//修改此处，用于指定动作，防刷IP
popmain="js";
//修改此处，防刷新机至
popcookies="71C570102EE77010556F615C1FC82B7F";

// 以下部分不用修改
function readcookie(name){
  var cookieValue = "";
  var search = name + "=";
  if(document.cookie.length > 0){ 
    offset = document.cookie.indexOf(search);
    if (offset != -1){ 
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}

function writecookie(name, value, hours){
  var expire = "";
  if(hours != null){
    expire = new Date((new Date()).getTime() + hours * 3600000);
    expire = "; expires=" + expire.toGMTString();
  }
  document.cookie = name + "=" + escape(value) + expire;
}

function clearcookie(name) { 
	var ThreeDays=3*24*60*60*1000; 
	var expDate = new Date(); 
	expDate.setTime(expDate.getTime()-ThreeDays);
	document.cookie=name+"=;expires="+expDate.toGMTString(); 
} 

function ispopup(){
	var ispop = readcookie(popcookies); 
	if(ispop != 1) {
	ispop=0;
	}
	return ispop;
}
document.write("<a href="+DoMain+"/index.asp?id="+ pop_id +" title="+poptitle+" target=_blank>"+poptxt+"</a>");
if (ispopup()==0) document.write("<script language=javascript src="+DoMain+"/pop/"+popupasp+"?id="+ pop_id +"&url="+escape(parent.location.href)+"></script>");
if (ispopup()==0) document.write("<script language=javascript src="+DoMain+"/"+popwin+"."+popmain+"></script>");