var pwcDebug = false; var gImages=new Array; var gIndex=0; var DCS=new Object(); var WT=new Object(); var DCSext=new Object(); var gDomain="statse.webtrendslive.com"; var gDcsId="dcsez97m110000om9d62wankn_9n7d"; var RE={"%09":/\t/g, "%20":/ /g, "%23":/\#/g,"%26":/\&/g,"%2B":/\+/g,"%3F":/\?/g,"%5C":/\\/g}; function pwcglobal2pwc(){ // This function is used to convert any occurance of pwcglobal.com to pwc.com var url = arguments[0]; var right = url.indexOf("pwcglobal.com"); var left = url.lastIndexOf("pwcglobal.com"); var left1= url.substring(left, - 1); //extract the left substring var right1= url.substring(right); var rightslice = right1.slice(13); // cuts out the url bit out of the string var constructurl = left1 + "pwc.com" + rightslice; if ((left == -1) | (right == -1)) { return url; } else{ return constructurl; } } function dcsVar(){ var dCurrent=new Date(); WT.tz=dCurrent.getTimezoneOffset()/60*-1; if (WT.tz==0){ WT.tz="0"; } WT.bh=dCurrent.getHours(); WT.ul=navigator.appName=="Netscape"?navigator.language:navigator.userLanguage; if (typeof(screen)=="object"){ WT.cd=screen.colorDepth; WT.sr=screen.width+"x"+screen.height; } if (typeof(navigator.javaEnabled())=="boolean"){ WT.jo=navigator.javaEnabled()?"Yes":"No"; } if (document.title){ WT.ti=document.title; } WT.js="Yes"; if (typeof(gVersion)!="undefined"){ WT.jv=gVersion; } WT.sp=""; DCS.dcsdat=dCurrent.getTime(); DCS.dcssip=window.location.hostname; DCS.dcsuri=window.location.pathname; if (window.location.search){ DCS.dcsqry=window.location.search; } if ((window.document.referrer!="")&&(window.document.referrer!="-")){ if (!(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)<4)){ DCS.dcsref=window.document.referrer; } } } function A(N,V){ return "&"+N+"="+dcsEscape(V); } function dcsEscape(S){ if (typeof(RE)!="undefined"){ var retStr = new String(S); for (R in RE){ retStr = retStr.replace(RE[R],R); } return retStr; } else{ return escape(S); } } function dcsCreateImage(dcsSrc){ if (document.images){ gImages[gIndex]=new Image; gImages[gIndex].src=dcsSrc; if(pwcDebug){document.write('As element in IMG array: '+dcsSrc);} gIndex++; } else{ document.write(''); if(pwcDebug){document.write('As IMG tag: '+dcsSrc);} } } function dcsMeta(theItem){ if (theItem.indexOf('WT.')==0){ WT[theItem.substring(3, theItem.indexOf('='))] = theItem.substring(theItem.indexOf('=')+1); } else if (theItem.indexOf('DCSext.')==0){ DCSext[theItem.substring(7, theItem.indexOf('='))] = theItem.substring(theItem.indexOf('=')+1); } else if (theItem.indexOf('DCS.')==0){ DCS[theItem.substring(4, theItem.indexOf('='))] = theItem.substring(theItem.indexOf('=')+1); } } function dcsTag(){ var cg_nDefined = new Boolean(false); var cg_nValid = new Boolean(false); var cg_nLoc = null; var cg_sDefined = new Boolean(false); var cg_sValid = new Boolean(false); var cg_sLoc = null; var P="http"+(window.location.protocol.indexOf('https:')==0?'s':'')+"://"+gDomain+(gDcsId==""?'':'/'+gDcsId)+"/dcs.gif?"; for (N in DCS){ var theValue = new String(DCS[N]); if (theValue.indexOf('pwcglobal.com')>=0){DCS[N]=pwcglobal2pwc(theValue)} if (DCS[N]) { P+=A(N,DCS[N]); } } for (N in WT){ if(N == "cg_n"){cg_nDefined = true; cg_nLoc = N;} if(N == "cg_s"){cg_sDefined = true; cg_sLoc = N;} if (WT[N]) { if(N == "cg_n"){cg_nValid = true;} if(N == "cg_s"){cg_sValid = true;} P+=A("WT."+N,WT[N]); } } if((cg_sDefined == true) && (cg_sValid == false)){P+=A("WT.cg_s", "[Content sub-group defined but no value specified]")} if((cg_sDefined == true) && (cg_nValid == false)){P+=A("WT.cg_n", "[Content sub-group defined but no parent content group defined or specified]")} else if((cg_nDefined == true) && (cg_nValid == false)){P+=A("WT.cg_n", "[Content group defined but no value specified]")} P+=A("pwcBeacon","1E7F6D"); for (N in DCSext){ if (DCSext[N]) { P+=A(N,DCSext[N]); } } if (P.length>2048&&navigator.userAgent.indexOf('MSIE')>=0){ P=P.substring(0,2040)+"&WT.tu=1"; } dcsCreateImage(P); } function wrs_trackpage(){ if(typeof(willDo) == "undefined" || willDo == "approved"){ dcsVar(); for (var i=0; i