/* FILE ARCHIVED ON 3:26:05 Jan 31, 2009 AND RETRIEVED FROM THE AN OPENWAYBACK INSTANCE ON 18:44:15 Jul 28, 2024. JAVASCRIPT APPENDED BY OPENWAYBACK, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ // -- START WebTrends -- // DATE MODIFICATION Author //====================================================================================================== // 11/12/2008: // 1) added fetch for the zip in "attPersistantLocalization" ms // 2) added dcsParseCookie() functionality ms // 3) added dcsChkIP() to convert the IP check to a case statement ms // 4) restructured to place functions at top of script ms // 09/25/2008 Per F.H., check for existence of DCSext since it could be already defined in csct.js ms/fh // 08/21/2008: // 1) Hitbox process (i.e. hbx.pn ) ms // 2) rename ip for 'att.com' too 'www.att.com' ms // 07/30/2008: // 1) support for bmediasource cookie ms // 2) new WireLINE special title code ms // 07/14/2008 set this global variable to bypass the same script running on bottom of page to avoid dupe hits initiated from the VS script. ms // 02/29/08 dummy out WT.vt_sid so to override SDCv8.0 to rid the spaces that are added from multiple IPs ms // 12/2007 Re-allow WT.ti (ie page title) name/value pair to come thru to the SDC log. Space not an issue anymore. ms // 10/05/2007 support for "source" to feed edm ms // 09/12/2007 support for same named meta tags (collect and concatenate them) ms // 08/29/2007 chk for bypass flag existence that could be passed from a special cloned 'top' script ms // 05/2007 change from wls.cingular.com to wls.wireless.att.com to reflect new SDC domain ms // 05/25/2007: // 1) allow for "bref" when building campaign id ms // 2) REenabled "q_returnUrl" for edatamart to use ms // 04/2007 // 1) add the path to the session cookie ms // 2) REenabled "browserid" for edatamart to use ms // 03/2007: // 1) stop toJSONString from writing to SDC logs (i.e. arrays WT[N] & DCS[N]) ms // to conserve space. // 2) added function dcsSetCookie(). ms // 3) added function dcsChkForSource(). ms // 4) commented "WT.sp" to keep from writing to SDC logs to conserve space. ms // 10/30/2006: ms // 1)For those parms being built in "dcsqry", check to see if we want to strip it from SDC log entry. // 2)Remove WT.ti (i.e. page title) name/value pair from the SDC log. It's taking up log space. // 3)Created/added function "dcsTrackObject" to help track forms & gifs. // 06/2006 added cookie/parm "inUser" for filtering out dev/tester work. ms // 02/2006 added dcsMultiTrack() function to support tracking event commands, gifs, pdfs etc. ms // 04/2006 added dcsQP() function ms // 04/2006 rename ip for 'cingular.com' too 'www.cingular.com' ms //alert("in dcstagHP"); //=============================================================================================== // functions //=============================================================================================== // ==================================================================================================== // M.S.: 11/12/2008 added dcsParseCookie() functionality // Looks for a named variable in a named cookie and returns it's value: // ==================================================================================================== function dcsParseCookie(NAME,VALUE){ if (cookievalue.indexOf(VALUE+"=") != -1) { beginCookieNamePOS=cookievalue.indexOf(VALUE+"="); endCookieNamePOS=beginCookieNamePOS+3; // MS: 11/12/2008 look for the ending of the value: if (pipePOS=cookievalue.indexOf("|",beginCookieNamePOS) != -1) { pipePOS=cookievalue.indexOf("|",beginCookieNamePOS); zipCookieValue=cookievalue.substring(endCookieNamePOS+1,pipePOS); } else { zipCookieValue=cookievalue.substring(endCookieNamePOS+1); } cookievalue=zipCookieValue; return cookievalue; } } //end function // =============== end function dcsParseCookie ========================================= // ==================================== Convert these possible cookies to parms: ============================================ // MS: Look for a cookie and, if found, create the SDC parm for it: function dcs_cookie(NAME){ var cookies = document.cookie; var pos = cookies.indexOf(NAME + "="); if (pos != -1){ var start = pos + NAME.length + 1; var end = cookies.indexOf(";", start); if (end == -1) end = cookies.length; // MS 11/12/2008 make cookievalue global: cookievalue = cookies.substring(start,end); //var cookievalue = cookies.substring(start,end); cookievalue = unescape(cookievalue); // BEGIN M.S.: 11/12/2008 added dcsParseCookie() functionality if (NAME=="attPersistantLocalization") { VALUE="zip"; //define the value being looked for var returnedValue = dcsParseCookie(NAME,VALUE); // in a named cookie get the value assigned to the named variable if (typeof(returnedValue) != "undefined") { cookievalue=returnedValue; // rewrite the value assigned to the cookie wtName="wtZipCode"; NAME=wtName; //recreate the name of the parm to create DCSext[NAME] = cookievalue; } } else // END M.S.: 11/12/2008 added dcsParseCookie() functionality { DCSext[NAME] = cookievalue; } // MS 03/2007 added to return the cookievalue: return cookievalue; } } // =============== end function dcs_cookie ========================================= // // Code section to convert parameters to WebTrends Parameter // function dcsQP(N){ if (typeof(N)=="undefined"){ return ""; } var qry=location.search.substring(1); var pairs=qry.split("&"); for (var i=0;i3){ if ((navigator.appName=="Microsoft Internet Explorer")&&document.body){ WT.bs=document.body.offsetWidth+"x"+document.body.offsetHeight; } else if (navigator.appName=="Netscape"){ WT.bs=window.innerWidth+"x"+window.innerHeight; } } WT.fi="No"; if (window.ActiveXObject){ if ((typeof(gFV)!="undefined")&&(gFV.length>0)){ WT.fi="Yes"; WT.fv=gFV; } } else if (navigator.plugins&&navigator.plugins.length){ for (var i=0;i0){ for (var i=0;i0)){ window.location=gHref; gHref=""; } } function dcsMeta(){ var elems; if (document.documentElement){ elems=document.getElementsByTagName("meta"); } else if (document.all){ elems=document.all.tags("meta"); } if (typeof(elems)!="undefined"){ /* begin ms 09/12/2007 support for same named meta tags: */ var k = 0; // index used in adding to the arrays "holdMetaNames" and "holdMetaContent" /* end ms 09/12/2007 support for same named meta tags: */ for (var i=1;i<=elems.length;i++){ var meta=elems.item(i-1); if (meta.name) { if (meta.name.indexOf('WT.')==0){ WT[meta.name.substring(3)]=meta.content; } else if (meta.name.indexOf('DCSext.')==0) { /* begin ms 09/12/2007 support for same named meta tags: */ // check to see if this meta name is in the hold table: var inTableYN=""; for (var m=0;m < holdMetaNames.length;m++){ if (holdMetaNames[m]== meta.name){ holdMetaContent[m]= holdMetaContent[m]+"|"+meta.content; inTableYN="Y"; break; } } if (inTableYN == "Y") { // do nothing, already appended above } else { // not in table yet so add it: holdMetaNames[k]=meta.name; holdMetaContent[k]=meta.content; k++; } /* end ms 09/12/2007 support for same named meta tags: */ // ms original code commented out: //DCSext[meta.name.substring(7)]=meta.content; } else if (meta.name.indexOf('DCS.')==0){ DCS[meta.name.substring(4)]=meta.content; } } //end if } //end for /* begin ms 09/12/2007 support for same named meta tags: */ // ms build all the "DCSext" meta tags: for (var j=0;j'); var saFlowType2Val = dcs_cookie("saFlowType2"); // check for the existence of the second cookie if (saFlowType2Val == null) { // do nothing (saFlowType2 NOT found) } else { // saFlowType2 found, write the parm for it to SDC for the present page: document.write(''); } } } else { // there is a "source" or "bref" parm on the URL: if (src.substr(0,1) == "E" || src.substr(0,1) == "I" || bref.substr(0,1) == "E" || bref.substr(0,1) == "I") // NOTE: only "E"xternal or "I"nternal campaign codes { if (src !="") { WT.mc_id = src; } else { WT.mc_id = bref; } var cv = WT.mc_id; //set campaign val variable //================================================================== // now check to see if this was the second most recent campaign: var saFlowType1Val = dcs_cookie("saFlowType1"); // get the cookie if (saFlowType1Val == null) { // No previous saFlowType1 found, it's the first campaign: dcsSetCookie("saFlowType1",cv,"","","","/","",""); document.write(''); } else { // previous saFlowType1 found, flip-flop them & write them both out to SDC: // make the "most recent campaign value" to be the first campaign: dcsSetCookie("saFlowType1",cv,"","","","/","",""); document.write(''); // make the previous campaign to be the second campaign: dcsSetCookie("saFlowType2",saFlowType1Val,"","","","/","",""); document.write(''); } //================================================================== } // end if } // end else } // end function // =============== end function dcsChkForSource() ========================================= function dcsMultiTrack(){ for (var i=0;i 0) { // not first value, so stick ampersand in front: newdcsqry = newdcsqry+"&"+value; newParmKnt = newParmKnt + 1; } else { // first value so, stick question mark in front: newdcsqry = newdcsqry+"?"+value; newParmKnt = newParmKnt + 1; } } //endif } //endfor return newdcsqry; } //end function dcsStripParms function dcsTag(){ var P="http"+(window.location.protocol.indexOf('https:')==0?'s':'')+"://"+gDomain+(gDcsId==""?'':'/'+gDcsId)+"/dcs.gif?"; for (N in DCS){ if (DCS[N]) { // MS 03/2007 stop toJSONString from writing to SDC logs to conserve space: if (N != "toJSONString") { P+=dcsA(N,DCS[N]); } } } for (N in WT){ if (WT[N]) { //========================================================================================================== // MS 07/30/2008 new WireLINE special title code, look for the WireLINE special title statement (i.e. _pn) and override the html title with it. if (N == "ti"){ // MS 08/21/2008 Hitbox process (i.e. hbx.pn ): if (typeof(hbx) != "undefined") { for (M in hbx) { // hbx is a possible object defined in the WireLINE hbx.js script which holds their special title statement if ([M=="pn"]) { DCSext.wtPN = hbx.pn; // add another parm with the special value defined by WireLINE } } //end for } // MS 07/30/2008 '13 State'/VS process (i.e. v ): if (typeof(v) != "undefined") { for (M in v) { // v is a possible array defined in another WireLINE script which holds their special title statement if ([M=="_pn"]) { //WT.ti = v[M]; // override the normal title value with the WireLINE defined value DCSext.wtPN = v["_pn"]; // add another parm with the special value defined by WireLINE } } //end for } } //========================================================================================================== //========================================================================================================== // MS 12/2007 Re-allow WT.ti (ie page title) name/value pair to come thru to the SDC log. Space not an issue anymore. // MS 03/2007 stop toJSONString from writing to SDC logs to conserve space // ms 10/30/2006 remove WT.ti (ie page title) name/value pair from the SDC log. It's taking up log space. if (N == "toJSONString"){ continue; } //========================================================================================================== P+=dcsA("WT."+N,WT[N]); } } for (N in DCSext){ if (DCSext[N]) { // MS 03/2007 stop toJSONString from writing to SDC logs to conserve space: if (N != "toJSONString") { P+=dcsA(N,DCSext[N]); } } } if (P.length>2048&&navigator.userAgent.indexOf('MSIE')>=0){ P=P.substring(0,2040)+"&WT.tu=1"; } dcsCreateImage(P); } //end function dcsTag 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); } } //end function dcsEscape function dcsCreateImage(dcsSrc){ var wtImTag = ''; $('wTMetaImg').update(wtImTag); } //end function dcsCreateImage // 11/12/2008 added dcsChkIP() to convert the test to a case statement: function dcsChkIP() { switch (DCS.dcssip) { case 'cingular.com': DCS.dcssip = 'www.cingular.com'; break; case 'wireless.att.com': DCS.dcssip = 'www.wireless.att.com'; break; case 'att.com': DCS.dcssip = 'www.att.com'; break; } } // end function dcsChkIP // =============== end function dcsChkIP ========================================= //INITIALIZE GLOBAL VARS: var DCS=new Object(); var WT=new Object(); // M.S.: 09/25/2008 Per F.H., check for pre-existence of "DCSext" since it could be already defined in csct.js: if (typeof(DCSext)=="undefined") { var DCSext=new Object(); } // ms 05/2007 change from wls.cingular.com to wls.wireless.att.com to reflect new SDC domain: var gDomain="wls.wireless.att.com"; var gImages=new Array; var gIndex=0; var gQP=new Array(); var gDcsId="dcsw1sx8x45vbwmw7v63tbf8m_1h2f"; /* begin ms 09/12/2007 support for same named meta tags: */ var holdMetaNames=new Array(); var holdMetaContent=new Array(); /* end ms 09/12/2007 support for same named meta tags: */ //============================================================================================================ function dcsMain() { // M.S.: 04/2006 REenabled browserid for edatamart to use // M.S.: 10/2006 REMOVE the process that converts cookie "browserid" & avoid it being written the SDC log dcs_cookie("browserid"); // M.S.: 10/2006 REMOVE the process that converts cookie "DSESSIONID" & avoid it being written the SDC log //dcs_cookie("DSESSIONID"); // ================================================================================================================== // M.S.: 06/2006 added cookie/parm process for filtering out 'dev' work. This cookie is set in the dev landing page & // will be converted to a parm here. We will filter out, in WT, based on this parm (ie intUser=Y). // ================================================================================================================== dcs_cookie("intUser"); //MS: 07/30/2008 support for bmediasource cookie: dcs_cookie("bmediasource"); // BEGIN M.S.: 11/12/2008 added fetch for the zip in "attPersistantLocalization": dcs_cookie("attPersistantLocalization"); if ((typeof(gConvert)!="undefined")&&gConvert&&(document.cookie.indexOf(gFpc+"=")==-1)) { document.write(""); } //MS 03/2007 Check for "source=" parm: dcsChkForSource(); dcsVar(); dcsMeta(); dcsFunc("dcsAdv"); //MS 11/12/2008 added dcsChkIP() to convert the test to a case statement: dcsChkIP(); dcsTag(); //ms 07/14/2008 set this global variable to bypass the same script running on bottom of page to avoid dupe hits initiated from the VS script. bypassFlag="Y"; } //end dcsMain() // -- END WebTrends --