var omni_account = ''; function Omniture(){ this.account = "lifewaydev"; this.pageName = ""; this.server = ""; this.channel = ""; this.pageType = ""; //404 errorPage only this.prop1 = ""; this.prop2 = ""; this.prop3 = ""; this.prop4 = ""; this.prop5 = ""; this.prop6 = ""; this.prop7 = ""; this.prop8 = ""; /* Conversion Variables */ this.campaign=""; this.state=""; this.zip=""; this.events=""; this.products=""; this.purchaseID = ""; this.eVar2 = ""; this.eVar3 = ""; this.eVar4 = ""; this.eVar5 = ""; this.eVar6 = ""; this.eVar7 = ""; this.eVar8 = ""; this.eVar9 = ""; this.eVar10 = ""; this.debugLevel = "0"; this.setVar = function (){ var args = arguments; var v = new variable(args[0],args[1]); this[v.key] = v.value; if (this.debugLevel == "1" || this.debugLevel == "3") alert('key = ' + v.key + '\nvalue = ' + this[v.key]); }; this.appendVar = function (){ var args = arguments; var v; if (args.length >= 3){ v = new variable(args[0],args[1],args[2]); }else{ v = new variable(args[0],args[1]); } if (this[v.key] == ""){ if (this.debugLevel == "1" || this.debugLevel == "2") alert('value is empty'); this[v.key] = v.value; if (this.debugLevel == "1" || this.debugLevel == "3") alert('key = ' + v.key + '\nvalue = ' + this[v.key]); }else{ if (this.debugLevel == "1" || this.debugLevel == "2") alert('value is NOT empty'); this[v.key] += v.delimeter + v.value; if (this.debugLevel == "1" || this.debugLevel == "3") alert('key = ' + v.key + '\nvalue = ' + this[v.key]); } }; this.getVar = function (key){ return this[key]; }; this.clear = function (key){ if (key.match(/(setVar)|(getVar)|(clear)|(clearAll)|(appendVar)/) == null){this[key] = "";} }; this.clearAll = function (){ for (x in this){this.clear(x);} }; } function variable(){ this.clean = function (value){ //alert("value: "+value); //Replace special characters with their respective English equivalent value = value.replace(/(\xc3\x80)|(À)/gi, "a"); value = value.replace(/(\xc3\x81)|(Á)/gi, "a"); value = value.replace(/(\xc3\x82)|(Â)/gi, "a"); value = value.replace(/(\xc3\x83)|(Ã)/gi, "a"); value = value.replace(/(\xc3\x84)|(Ä)/gi, "a"); value = value.replace(/(\xc3\x85)|(Å)/gi, "a"); value = value.replace(/(\xc3\x86)|(Æ)/gi, "ae"); value = value.replace(/(\xc3\x87)|(Ç)/gi, "c"); value = value.replace(/(\xc3\x88)|(È)/gi, "e"); value = value.replace(/(\xc3\x89)|(É)/gi, "e"); value = value.replace(/(\xc3\x8a)|(Ê)/gi, "e"); value = value.replace(/(\xc3\x8b)|(Ë)/gi, "e"); value = value.replace(/(\xc3\x8c)|(Ì)/gi, "i"); value = value.replace(/(\xc3\x8d)|(Í)/gi, "i"); value = value.replace(/(\xc3\x8e)|(Î)/gi, "i"); value = value.replace(/(\xc3\x8f)|(Ï)/gi, "i"); value = value.replace(/(\xc3\x91)|(Ñ)/gi, "n"); value = value.replace(/(\xc3\x92)|(Ò)/gi, "o"); value = value.replace(/(\xc3\x93)|(Ó)/gi, "o"); value = value.replace(/(\xc3\x94)|(Ô)/gi, "o"); value = value.replace(/(\xc3\x95)|(Õ)/gi, "o"); value = value.replace(/(\xc3\x96)|(Ö)/gi, "o"); value = value.replace(/(\xc3\x98)|(Ø)/gi, "o"); value = value.replace(/(\xc3\x99)|(Ù)/gi, "u"); value = value.replace(/(\xc3\x9a)|(Ú)/gi, "u"); value = value.replace(/(\xc3\x9b)|(Û)/gi, "u"); value = value.replace(/(\xc3\x9c)|(Ü)/gi, "u"); value = value.replace(/(\xc3\x9d)|(Ý)/gi, "y"); value = value.replace(/(\xc3\xa0)|(à)/gi, "a"); value = value.replace(/(\xc3\xa1)|(á)/gi, "a"); value = value.replace(/(\xc3\xa2)|(â)/gi, "a"); value = value.replace(/(\xc3\xa3)|(ã)/gi, "a"); value = value.replace(/(\xc3\xa4)|(ä)/gi, "a"); value = value.replace(/(\xc3\xa5)|(å)/gi, "a"); value = value.replace(/(\xc3\xa6)|(æ)/gi, "ae"); value = value.replace(/(\xc3\xa7)|(ç)/gi, "c"); value = value.replace(/(\xc3\xa8)|(è)/gi, "e"); value = value.replace(/(\xc3\xa9)|(é)/gi, "e"); value = value.replace(/(\xc3\xaa)|(ê)/gi, "e"); value = value.replace(/(\xc3\xab)|(ë)/gi, "e"); value = value.replace(/(\xc3\xac)|(ì)/gi, "i"); value = value.replace(/(\xc3\xad)|(í)/gi, "i"); value = value.replace(/(\xc3\xae)|(î)/gi, "i"); value = value.replace(/(\xc3\xaf)|(ï)/gi, "i"); value = value.replace(/(\xc3\xb1)|(ñ)/gi, "n"); value = value.replace(/(\xc3\xb2)|(ò)/gi, "o"); value = value.replace(/(\xc3\xb3)|(ó)/gi, "o"); value = value.replace(/(\xc3\xb4)|(ô)/gi, "o"); value = value.replace(/(\xc3\xb5)|(õ)/gi, "o"); value = value.replace(/(\xc3\xb6)|(ö)/gi, "o"); value = value.replace(/(\xc3\xb8)|(ø)/gi, "o"); value = value.replace(/(\xc3\xb9)|(ù)/gi, "u"); value = value.replace(/(\xc3\xba)|(ú)/gi, "u"); value = value.replace(/(\xc3\xbb)|(û)/gi, "u"); value = value.replace(/(\xc3\xbc)|(ü)/gi, "u"); value = value.replace(/(\xc3\xbd)|(ý)/gi, "y"); value = value.replace(/(\xc3\xbf)|(ÿ)/gi, "y"); //Remove any character not in the standard ASCII printable character set, minus quotes. value = value.replace(/[^ !#$%&\(\)\*\+,-\.\/:;<=>\?@\[\\\]^\{\|\}~\w]/gi, ""); return value.toLowerCase(); }; this.args = arguments; this.key = this.args[0]; this.value = this.clean(this.args[1]); this.delimeter = ","; if (this.args.length >= 3) this.delimeter = this.args[2]; } var objOmni = new Omniture(); if (omni_account.length > 0){ switch (omni_account.toLowerCase()){ case "vbsdev": case "vbsprod": case "onlinebibledev": case "onlinebibleprod": case "threadsdev": case "threadsprod": case "communitiesdev": case "communitiesprod": case "lifewayworshipdev": case "lifewayworshipprod": case "bhpublishingdev": case "bhpublishingprod": case "lifewaystoresdev": case "lifewaystoresprod": case "lifewayprod": case "lifewaydev": objOmni.setVar("account","lifewaydev"); break; default: objOmni.setVar("account","lifewaydev"); break; } }