//遇到cookietf=1的话留在本站,否则跳转移动站
if(getCookie('tf')!=1){
//判断是以下设备后跳转到m站
if(.match(/(iPhone|iPod|Android)/i)){
f="//m."
}
}else{
//M站设置了一年,这里fixed
setCookie('tf',1,'','/',0);
}
//start防劫持
//设置cookie
functionsetCookie(name,value,domain,path,expires){
if(expires){
expires=neDate(+neDate()+expires);
}
vartempcookie=name+'='+escape(value)+
((expires)?';expires='+():'')+
((path)?';path='+path:'')+
((domain)?';domain='+domain:'');
//Ensurethecookie'ssizeisunderthelimitation
if(=3){
reportUrl2&&reportUrl2!=''&&createSender(reportUrl2);
}else{
reportUrl&&reportUrl!=''&&createSender(reportUrl);
countHijack++;
setCookie(cookieName,countHijack,cookieDomain,'',30*24*60*60*1000);
=;
}
}
//每次成功进入页面则计数清0
setCookie(cookieName,0,cookieDomain,'',30*24*60*60*1000);
})();
//end防