var expireDate = new Date();
var hours = expireDate.getHours();
var minutes = expireDate.getMinutes();
var seconds = expireDate.getSeconds();
var now = expireDate.getTime();
function getCookieVal_cnzz (offset)
{
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
  }
 function GetCookie_cnzz (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_cnzz (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
  }
  return null;
  }
var agt=navigator.userAgent.toLowerCase();
data = '&agt=' + escape(agt) + '&r=' + escape(document.referrer) +  '&aN=' + escape(navigator.appName) + '&lg=' + escape(navigator.systemLanguage) + '&OS=' + escape(navigator.platform) + '&aV=' + escape(navigator.appVersion) + '&ntime=0.94767800 1148373299';
a=GetCookie_cnzz("iq02");
if (a != null)
{
	a=parseInt(a);
	a=a+1;
}
else
	a=0;
va=GetCookie_cnzz("viq02");
if (va != null)
{
	va=parseInt(va);
	va=va+1;
}
else
	va=0;

data=data + '&repeatip=' + a;
data=data + '&vrepeatip=' + va;
rtime=GetCookie_cnzz("rtime");
ltime=GetCookie_cnzz("ltime");
quan_uid=GetCookie_cnzz("iq_uid");
quan_vid=GetCookie_cnzz("iq_vid");
afidwithcookie = GetCookie_cnzz("afid");
afid2withcookie = GetCookie_cnzz("afid2");
if (quan_uid == null)
{
	quan_uid=Math.floor(Math.random()*100000000) + "-" + document.referrer;
}
if (quan_vid == null)
{
	quan_vid=Math.floor(Math.random()*100000000);
}
if (ltime<1000000)
{
rtime=0;
ltime=0;
}
else rtime=parseInt(rtime);
if (rtime<1) rtime=0;
ltime=parseInt(ltime);
now=parseInt(now);
if (((now-ltime)>43200*1000) && (ltime>0))
        rtime =rtime + 1 ;
data=data + '&rtime='+ rtime + '&iq_uid=' + escape(quan_uid);
data=data + '&iq_vid=' + escape(quan_vid);
data=data + '&showp=' + escape(screen.width+ 'x'+screen.height);
 function af_gqv(v) {
     var q = window.location.search.substring(1);
     var vs = q.split("&");
     for (var i = 0; i < vs.length; i++)
     {
         var p = vs[i].split("=");
         if (p[0] == v)
         {
             return p[1];
         }
     }
     return "";
 }
 try {
     var afid = af_gqv("c1");
     if (afid)
     {
         afid =  afid;

     }else if(afidwithcookie)
     {
         afid =  afidwithcookie;
     }else
         afid = 0;
     data = data + '&afid=' + afid;
 } catch(ex) { }
 try {
     var afid2 = af_gqv("c2");
     if (afid2)
     {
         afid2 =  afid2;

     }else if(afid2withcookie)
     {
         afid2 =  afid2withcookie;
     }else
         afid2 = 0;
     data = data + '&afid2=' + afid2;
 } catch(ex) { }

document.write('<iframe id="statusFrame" name=status frameborder=0 marginwidth=0 marginheight=0 src="http://stat.myiq.cn/stat.htm?checkpoint=0'+ data +'" scrolling=no width=0 height=0></iframe>');
var lefttime = 1000 * ( 86400 - hours*3600 - minutes*60 - seconds);
expireDate.setTime (expireDate.getTime() + 500*86400);
document.cookie = "iq02=" + a + "; expires=" + expireDate.toGMTString() +  "; path=/; domain=.myiq.cn";
document.cookie = "viq02=" + va + "; path=/; domain=.myiq.cn";
var lefttime=1000*86400*182;
expireDate.setTime (now + lefttime);
document.cookie = "rtime=" + rtime + "; expires=" + expireDate.toGMTString() +  "; path=/; domain=.myiq.cn";
document.cookie = "ltime=" + now + "; expires=" + expireDate.toGMTString() +  "; path=/; domain=.myiq.cn";
document.cookie = "iq_uid=" + escape(quan_uid) + "; expires=" + expireDate.toGMTString() +  "; path=/; domain=.myiq.cn";
document.cookie = "afid=" + afid + "; path=/; domain=.myiq.cn";
document.cookie = "afid2=" + afid2 + "; path=/; domain=.myiq.cn";
document.cookie = "iq_vid=" + escape(quan_vid) + "; path=/; domain=.myiq.cn";


function download_c(ver,_type){
	if(!_type){
		_type = 0;
	}
    try {
		var sLog = 'http://stat.myiq.cn/stat.htm?checkpoint='+_type + data + '&version='+ver+'&time='+Math.random();
		document.getElementById("statusFrame").src = sLog;
	} catch(x) {
	}
}