// ***************************
// *** Redirect Config 
// ***************************

// set account info
var wsstag_prodAcct = "DM541027P8ZV;DM541028L2ZA";
var wsstag_testAcct = "DM54051673CC;DM540516BKMS";

// set product name for rollup and test accounts
var wsstag_productName = _wsstag_clean("Redirect");

// set page id
var wsstag_page = _wsstag_clean(document.title);

// **************************************
// *** DO NOT MAKE CHANGES BELOW HERE *** 
// **************************************
function _wsstag_clean(input) {
   // replace any html / ascii codes (&xx;)(&#xxx) with spaces
   var re = new RegExp('\&#?\\w+;?', 'g');
   var input = input.replace(re, ' ') ;

   // ensure characters in ascii decimal values of 32 - 126
   // include 32 for spaces
   // maps to hex values of x20 - x7E
   var re = new RegExp ('[^\\x20-\\x7E]', 'g') ;
   var input = input.replace(re, '') ;

   // remove illegal characters
   // ' " & ! # $ % ^ * : | / \ < > ~ ;
   var re = new RegExp ('[\'\"\&!#\$%^\*:|\/\\<>~;]', 'g') ;
   var input = input.replace(re, '') ;

   // replace spaces with the pluses
   // replace spaces in succession with one plus
   var re = new RegExp (' +', 'g') ;
   var input = input.replace(re, '+') ;
   
   return input;
}

var _hbEC=0,_hbE=new Array;
function _hbEvent(a,b){
   b=_hbE[_hbEC++]=new Object();
   b._N=a;b._C=0;return b;
}
var hbx=_hbEvent("pv");

hbx.vpc="HBX0100u";
hbx.gn="ehg-mastercard.hitbox.com";

// set environment specific data
if (wsstag_envResult == wsstag_prodEnv) {
   // page name
   hbx.pn = wsstag_page;
   // content category
   hbx.mlc="/Redirect/;/US/Redirect/";
   // prod data
   hbx.acct=wsstag_prodAcct;
} else {
   // page name
   hbx.pn = wsstag_productName + "-" + wsstag_page;
   // content category
   hbx.mlc= "/" + wsstag_productName + "/Redirect/;/US/Redirect/";
   
   // test data
   hbx.acct=wsstag_testAcct;
   
}

// the defaults across the application
hbx.pndef = "title";
hbx.ctdef = "full";
hbx.lt = "auto";  // link tracking setting
hbx.cmp = ""; // placeholder 
hbx.cmpn = "ppass_cid"; // campaing id - in query
hbx.hra = ""; // placeholder 
hbx.hqsp = "ppass_att"; // campaign response attribute - query
hbx.gp = "";  // placeholder
hbx.gpn = "ppass_gp";  // campagin goal - in query
hbx.hcn = ""; // conversion attribute
hbx.hcv = ""; // conversion value

