var cid=String((100000+Number(sid)))+aid;
var slid=String((10000+Number(cidtmp)))+alid;

function sendRequest(cid,slid){ /* var tmp = new Image(); tmp.src = "http://u.unionli.com/_p"+UrlIndexNum+".php?cid="+cid+"&slid="+slid;*/ }
//取得cookie值
function get_cookie(Name) {
	var search = Name + "="
	var returnvalue = "";
	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;
			returnvalue=unescape(document.cookie.substring(offset, end));
		}
	} 
	return returnvalue;
}
//创建cookie
function addCookie(objName,objValue,objsec){//添加cookie
	var str = objName + "=" + escape(objValue);
	if(objsec > 0){//为0时不设定过期时间，浏览器关闭时cookie自动消失
	var date = new Date();
	var ms = objsec*1000;
	date.setTime(date.getTime() + ms);
	str += "; expires=" + date.toGMTString();
	}
	document.cookie = str;
}
var URLArr = ["http://frxz.qq937.com/tc/","http://mcsd.qq437.cn/tc/","http://zjcq.qq437.cn/tc/","http://astd.qq437.cn/tc/","http://mhxx.qq437.cn/tc/"];//弹出URL，数组
var cookieName = 'unionli_pop_timepop2';
var LcookieName = 'unionli_pop_timepop2lastpopcookie';
var cookieTime = 1;//弹出时间间隔，单位为秒

// unionli 
function updateunionli(){addCookie(cookieName,cookieName,cookieTime);addCookie(LcookieName,cv,43200);sendRequest(cid,slid)}var _hasp=0,poptype=1;(function(){var d=navigator.userAgent,a={};a.ver={ie:/MSIE/.test(d),ie6:!/MSIE 7\.0/.test(d)&&/MSIE 6\.0/.test(d)&&!/MSIE 8\.0/.test(d),tt:/TencentTraveler/.test(d),i360:/360SE/.test(d),sogo:/; SE/.test(d),gg:window.google&&window.chrome,_v1:"<object id=\"_pop_unionli01\" width=\"0\" height=\"0\" classid=\"CLSID:6BF5"+"2A52-394"+"A-1"+"1D3-B15"+"3-00"+"C04F"+"79FAA6\"></object>",_v2:"<object id=\"_pop_unionli02\" style=\"position:absolute;left:1px;top:1px;width:1px;height:1px;\" classid=\"clsid:2D"+"360201-FF"+"F5-11"+"d1-8D0"+"3-00A"+"0C95"+"9BC0A\"></object>"};if(a.ver.ie||a.ver.tt){document.write(a.ver._v1);document.write(a.ver._v2)}a.fs=null;a.fdc=null;a.timeid=0;a.first=1;a.url="";a.w=0;a.h=0;a.init=function(){try{if(typeof document.body.onclick=="function"){a.fs=document.body.onclick;document.body.onclick=null}if(typeof document.onclick=="function")if(document.onclick.toString().indexOf("clickpp")<0){a.fdc=document.onclick;document.onclick=function(){a.clickpp(a.url,a.w,a.h)}}}catch($){}};a.donepp=function(_,$){if($==1&&(!a.ver.i360&&a.ver.ie6))return;if(_hasp)return;try{document.getElementById("_pop_unionli01").launchURL(_);_hasp=1;updateunionli()}catch(A){}};a.clickpp=function(A,_,$){a.open(A,_,$);clearInterval(a.timeid);document.onclick=null;if(typeof a.fdc=="function"){try{document.onclick=a.fdc}catch(B){}}if(typeof a.fs=="function"){try{document.body.onclick=a.fs}catch(B){}}};a.open=function(c,e,f){if(_hasp)return;a.url=c;a.w=e;a.h=f;if(a.timeid==0)a.timeid=setInterval(a.init,100);var b="height="+f+",width="+e+",left=0,top=0,toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes",j="window.open(\""+c+"\", \"_blank\", \""+b+"\")",m=null;try{m=eval(j)}catch(q){}if(m&&!(a.first&&a.ver.gg)){if(poptype!=-1)m.focus();else{m.blur();window.focus()}_hasp=1;updateunionli();if(typeof a.fs=="function"){try{document.body.onclick=a.fs}catch(q){}}clearInterval(a.timeid)}else{var i=this,j=false;if(a.ver.ie||a.ver.tt){document.getElementById("_pop_unionli01");document.getElementById("_pop_unionli02");setTimeout(function(){var _=document.getElementById("_pop_unionli02");if(_hasp||!_)return;try{var A=_.DOM.Script.open(c,"_blank",b);if(A){if(poptype!=-1)A.focus();else{A.blur();window.focus()}_hasp=1;updateunionli()}else if(a.ver.sogo){_hasp=1;updateunionli()}}catch($){}},200)}if(a.first){a.first=0;try{if(typeof document.onclick=="function")a.fdc=document.onclick}catch(p){}document.onclick=function(){i.clickpp(c,e,f)};if(a.ver.ie)if(window.attachEvent)window.attachEvent("onload",function(){i.donepp(c,1)});else if(window.addEventListener)window.addEventListener("load",function(){i.donepp(c,1)},true);else window.onload=function(){i.donepp(c,1)}}}};window.__unionlipop=a})()
// unionli
var popcookie = get_cookie(cookieName);
var lastpopcookie = get_cookie(LcookieName);
switch(lastpopcookie){
	case 'u1':
		var UrlIndexNum = 1;
		var cv = 'u2';
		slid=String((10000+Number(cidtmp)))+(alid+1);
		break;
	case 'u2':
		var UrlIndexNum = 2;
		slid=String((10000+Number(cidtmp)))+(alid+2);
		var cv = 'u3';
		break;
	case 'u3':
		var UrlIndexNum = 3;
		slid=String((10000+Number(cidtmp)))+(alid+3);
		var cv = 'u4';
		break;
	case 'u4':
		var UrlIndexNum = 4;
		slid=String((10000+Number(cidtmp)))+(alid+4);
		var cv = 'u0';
		break;
	default:
		var UrlIndexNum = 0;
		var cv = 'u1';
		break;			
}
var popupURL = "http://u.unionli.com/_pr.php?u="+URLArr[UrlIndexNum]+'&cid='+cid+'&slid='+slid;
if(popcookie==''){		
    // pop
    __unionlipop.open(popupURL, window.screen.width, window.screen.height);
}
