(function(){
    var arr="",
    inIfr=false,
    doc=document,
    st=new Date();
    
	(function(){
		var url=makeUrl();
		doc.write( "<script language='javascript' src='" + url + "'></script>" );
	})();
		
	function makeUrl()
	{
        var gloNames,gloValues,paramNames,paramValues,scr=screen,nav=navigator;
        gloNames=["keystr","id"];
        gloValues=["null",0];
        for(var i=0;i<gloNames.length;i++){
        checkGlo("shuaiche_ad_"+gloNames[i],gloValues[i]);}
        
        ins("keystr",shuaiche_ad_keystr);
        ins("id",shuaiche_ad_id);				
        ins("dt",Math.round((new Date).getTime()/1000));
        return "http://service.shuaiche.com/ad/singletxt.aspx?"+arr.slice(1);
    }

	function checkGlo(name,value){if(undef(typeof window[name])){window[name]=value}}
    function undef(v){return v=="undefined"}
    function checkGlo(name,value){if(undef(typeof window[name])){window[name]=value}}
    function enc(v){return typeof encodeURIComponent=="function"?encodeURIComponent(v):escape(v)}
    function ins(n,v){arr=arr.concat("&"+n+"="+v)}
    function insE(n,v){ins(n,enc(v))}
    function nav(n){return navigator.userAgent.toLowerCase().indexOf(n)>=0}							
    function getLocation(){return(noFrame()||inIfr)?location.href:ref()}
    function ref(){return doc.referrer}
    function noFrame(){return self===top}
    function isCross(){try{top.location.toString()}catch(e){return true}return false}
    function getAt(){if(cpro_at!=""){var atArr=cpro_at.split("_"),at=0;for(var i=0;i<atArr.length;i++){switch(atArr[i]){case"text":at|=1;break;case"image":case"flash":at|=2;at|=4;break;case"video":at|=8;break}}return at}else{return cpro_at}}
    function checkIframe(){if(noFrame()){return 0}var win=window,body=doc.body,w=1,h=1,cif=1;var el=doc.documentElement;if(isCross()){cif+=2}if(win.innerHeight){w=win.innerWidth;h=win.innerHeight}else{if(el&&el.clientHeight){w=el.clientWidth;h=el.clientHeight}else{if(body){w=body.clientWidth;h=body.clientHeight}}}if(h<10||w<40){cif+=4}else{if(h<cpro_h||w<cpro_w){cif+=8}}if(h>=2*cpro_h||w>=2*cpro_w){inIfr=true}return cif}
})();