document.write(""); var ipaddr="38.107.191.81"; var Page=escape(window.location); //当前URL var Startint=0; var expireDate = new Date(); var Fbl = screen.width+'x'+screen.height; //分辩率 var SessionID = '2p0byq454i4sg455neoyrobf'; var fromUrl = document.referrer; var KeyWord=""; var cookieName="500wan"; function SetCookie(sName) { var date = new Date(2010,12,30).toGMTString(); var cookieValue = new Number(GetCookie(name)); if(cookieValue==-1)//第一次访问客 { document.cookie = sName + "=" + 0 + "$SessionID="+SessionID+"; expires="+date; return 0; } else { if(SessionID!=GetSessionID()) { cookieValue++; if(cookieValue>100) cookieValue = 100; document.cookie = sName + "=" + cookieValue + "$SessionID="+SessionID+"; expires="+date; return cookieValue; } return -1; } } function GetSessionID() { var reStr = document.cookie.match(/SessionID=[^;]+/i); if(reStr!=null) return reStr[0].replace(/SessionID=/i,""); return ""; } function GetCookie(name) { var cookieText = document.cookie; var regtx = new RegExp(name+"=[0-9]+","i"); var cookieval = cookieText.match(regtx); if(cookieval!=null) { regtx = new RegExp(name+"=","i"); return cookieval[0].replace(regtx,""); } else return -1; } function GetKeyWord(Url) { if(/\.baidu\.com/i.test(Url)) { KeyWord=Url.match(/wd=[^&]+/i); if(KeyWord!=null) return KeyWord[0].replace(/wd=/i,""); } if(/\.google\./i.test(Url)) { KeyWord=Url.match(/\&q=[^&]+/i); if(KeyWord!=null) return KeyWord[0].replace(/\&q=/i,""); } if(/soso\.com/i.test(Url)) { KeyWord=Url.match(/w=[^&]+/i); if(KeyWord!=null) return KeyWord[0].replace(/w=/i,""); } if(/3721\.com/i.test(Url)) { KeyWord=Url.match(/p=[^&]+/i); if(KeyWord!=null) return KeyWord[0].replace(/p=/i,""); } if(/cn\.yahoo\.com/i.test(Url)) { KeyWord=Url.match(/p=[^&]+/i); if(KeyWord!=null) return KeyWord[0].replace(/p=/i,""); } return ""; } function FormatUrl(inUrl){ var viewUrl = inUrl.replace(/http:\/\/500wan.com/gi,"http://www.500wan.com"); viewUrl = viewUrl.replace(/http:\/\/coocp.com/gi,"http://www.500wan.com"); viewUrl = viewUrl.replace(/http:\/\/5000000.com/gi,"http://www.500wan.com"); viewUrl = viewUrl.replace(/http:\/\/www.5000000.com/gi,"http://www.500wan.com"); viewUrl = viewUrl.replace(/http:\/\/www.zc6.com/gi,"http://www.500wan.com"); viewUrl = viewUrl.replace(/http:\/\/ct.500wan.com/gi,"http://www.500wan.com"); viewUrl = viewUrl.replace(/http:\/\/www.coocp.com/gi,"http://www.500wan.com"); viewUrl = viewUrl.replace(/http:\/\/cnc.500wan.com/gi,"http://www.500wan.com"); return viewUrl } Page = FormatUrl(Page); if(fromUrl.length>1) KeyWord=GetKeyWord(fromUrl); var agt=navigator.userAgent.toLowerCase(); if(agt.indexOf("firefox")>-1) { var agtArray = agt.split(";"); agtArray[1] = "FireFox"; agt = agtArray.join(";"); } var data = 'agt=' + escape(agt) + '&ref=' + escape(fromUrl) +'&ipaddr='+ipaddr+'&page='+Page+'&rate='+Fbl; data += '&SessionID='+SessionID+'&KeyWord='+escape(KeyWord)+'&BackValue='+SetCookie(cookieName); document.write(''); /*var oScript = document.createElement('script'); oScript.type = "text/javascript"; oScript.src = "http://js.tongji.yahoo.com.cn/0/45/235/ystat.js"; document.getElementById("yahooStat").appendChild(oScript);*/