function webTraffic(eid,sLang,evalue1,evalue2,evalue3,evalue4) { if(evalue1 == undefined){evalue1="";} if(evalue2 == undefined){evalue2="";} if(evalue3 == undefined){evalue3="";} if(evalue4 == undefined){evalue4="";} var strUrl="http://www.yp.com.hk/iypCommonAPI/statistics/statistics.ashx?"; strUrl+="eid="+eid; strUrl+="&evalue1="+encodeURIComponent(evalue1); strUrl+="&evalue2="+encodeURIComponent(evalue2); strUrl+="&evalue3="+encodeURIComponent(evalue3); strUrl+="&evalue4="+encodeURIComponent(evalue4); strUrl+="&sLang="+sLang; strUrl+="&title="+encodeURIComponent(document.title); strUrl+="&host="+encodeURIComponent(location.host); strUrl+="&url="+encodeURIComponent(location.pathname); strUrl+="&referral_url="+encodeURIComponent(document.referrer); strUrl+="&resolution="+encodeURIComponent(screen.width+"x"+screen.height); var element = document.createElement("script"); element.src = strUrl; element.type = "text/javascript"; document.getElementsByTagName("head")[0].appendChild(element); }