/* Omniture Optimization Suite
 * Copyright (c) Omniture 2001-2008. All rights reserved. Patent Pending.
 * Privacy Policy at http://www.omniture.com/privacy/
 */
/************************** CONFIG SECTION **************************/
/* You may add or alter any code config here. */

// NWA customisation note - tc is an existing page variable, so use tc_config instead
// this is required in autoStart code also
tc_config = window.tc_config || {};
tc_config.site_id = tc_config.site_id || 464;
tc_config.log_path = tc_config.log_path || "/includes/touchclarity";
tc_config.server_hostname = tc_config.server_hostname || "tc.nwa.com";

/************************** PLUGINS SECTION *************************/

// #648 read cookie
(function () {
    var readCookie = function(name) {
        var nameEQ = name + "=";
        var ca = document.cookie.split(';');
        for (var i=0; i < ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0)==' ') c = c.substring(1,c.length);
            if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
        }
        return null;
    };
    var ad=readCookie("Advertise");
    tc_config.extra_info = tc_config.extra_info || "";
    if (ad != null) {
        ad = ad.split("&");
        for (var i=1; i<ad.length; i++) {
            tc_config.extra_info += "&a"+i+"="+(ad[i-1]||"false");
        }
    }
}) ();

// #826 Read SiteCatalyst variables
tc_config.extraInfoFromAnalytics = {};


/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
window.undefined=window.undefined;var omtr=window.omtr||{};omtr.extend=function(_1,_2,_3){var _4=_1.split("."),_5=window;if(typeof _3!="boolean"){_3=false;}for(var i=0;i<_4.length;i++){_5[_4[i]]=_5[_4[i]]||{};_5=_5[_4[i]];}for(var _7 in _2){if(_3||typeof _5[_7]=="undefined"){_5[_7]=_2[_7];}}return _5;};omtr.extend("omtr.tc.plugin.backwards_compatibility",{init:function(_8){var _9=window;_9.tc_log=omtr.tc.log;_9.tc_redirect=omtr.tc.redirect;_9.tc_open_window=omtr.tc.open_window;_9.tc_optimise=omtr.tc.optimize;var i,_b,_c="undefined",_d=["active","site_id","timeout","page_alias","extra_info","referrer","products","containers","log_path"];for(i=0;i<_d.length;i++){_b=_d[i];if(typeof _9["tc_"+_b]!==_c){_8[_b]=_9["tc_"+_b];}}if(typeof _9.tc_server_url!==_c){_8.server_hostname=_9.tc_server_url;}}});omtr.extend("omtr.tc.plugin.tc_page_alias_from_params",{init:function(_e){if(_e.page_alias){return;}if(typeof _e.pageAliasFromParams=="string"){_e.pageAliasFromParams=[_e.pageAliasFromParams];}if(!_e.pageAliasFromParams){return;}var _f=new omtr.tc.plugin.tc_page_alias_from_params.Query(),_10=_e.pageAliasFromParams,_11="",i;for(i=0;i<_10.length;i++){if(_f.params&&typeof _f.params[_10[i]]!="undefined"){_11+="/"+_10[i]+"/"+_f.params[_10[i]];}}if(_11!==""){_11=_11.substring(1)+"?"+_f.queryString;_e.page_alias=_11;}},Query:function(_13){var q="",_15;if(typeof _13=="boolean"||typeof _13=="number"||typeof _13=="undefined"){q=_13?document.referrer.replace(/^[^\?]+\??/,""):document.location.search.replace(/^\?/,"");}else{if(typeof _13=="string"){q=_13;}}q=q.replace(/#[^#]*$/,"");this.queryString=q;this.params={};_15=this.queryString.split(/[&;]/);for(var i=0;i<_15.length;i++){var _17=_15[i].split("=");if(!_17.length==2){continue;}if(!(_17[0]||_17[1])){continue;}var key=unescape(_17[0]);var val=unescape(_17[1]);val=val.replace(/\+/g," ");this.params[key]=val;}}});omtr.extend("omtr.tc.plugin.tc_extra_info_from_analytics",{init:function(_1a){if(!_1a.extraInfoFromAnalytics){return _1a;}var _1b="",_1c=_1a.extraInfoFromAnalytics;_1a.extra_info=_1a.extra_info||"";_1c.source=_1c.source||omtr.data;_1c.propList=_1c.propList||window.undefined;if(typeof _1c.encode!="boolean"){_1c.encode=true;}if(typeof omtr.data==("object")&&typeof omtr.data.serialize==("function")){_1b=omtr.data.serialize(_1c.propList,_1c.encode);_1a.extra_info+=_1b;return _1a;}var _1d,_1e=_1c.source,_1f=(typeof encodeURIComponent!="undefined"?encodeURIComponent:escape);for(_1d in _1e){if((typeof (_1e[_1d])!=("function"))&&(typeof (_1e[_1d])!=("array"))&&(typeof (_1e[_1d])!=("object"))&&(typeof (_1e[_1d])!=("undefined"))&&((_1e[_1d])!=(""))&&((_1e[_1d])!=(null))){_1b+="&"+_1f(_1d.toString())+"="+_1f(_1e[_1d]);}}_1a.extra_info+=_1b;return _1a;}});omtr.extend("omtr.tc.plugin.sitecatalyst_reporting",{observers:[],ready:false,serveData:null,init:function(_20){this.doStandardReport=omtr.tc.report;omtr.tc.report=this.sendReport;},add:function(ele){this.observers.push(ele);if(omtr.tc.plugin.sitecatalyst_reporting.ready){if(typeof (ele)=="function"){ele.apply(this,[omtr.tc.serveData]);}}else{}},notify:function(_22){for(var i=0;i<this.observers.length;i++){var _24=this.observers[i];if(typeof (_24)=="function"){_24.apply(this,[_22]);}}},sendReport:function(_25){if(typeof _25=="object"){omtr.tc.plugin.sitecatalyst_reporting.serveData=_25;}else{_25=omtr.tc.plugin.sitecatalyst_reporting.serveData;}var _26=omtr.tc.plugin.sitecatalyst_reporting.doStandardReport();if((_26===0)||(typeof _26==="undefined"&&!_25)){return;}else{if(_26===2){omtr.tc.serveData={visitor:"Page Default"};}else{if(_26===3){omtr.tc.serveData={visitor:"Page Error"};}else{if(_25!==null&&typeof _25=="object"){omtr.tc.serveData={visitor:_25.visitor};}else{omtr.tc.serveData={visitor:"No Data From Server"};}}}}omtr.tc.plugin.sitecatalyst_reporting.ready=true;omtr.tc.plugin.sitecatalyst_reporting.notify(omtr.tc.serveData);}});omtr.extend("omtr.tc",{Version:"5.3",Vendor:"Omniture",Product:"TouchClarity"});(function(){var _27=function(){var _28="undefined";var api=this;var _2a=window.location;var _2b={timeout:5,site_id:425,server_hostname:"tagging-qa.touchclarity.com",active:true,base_url:_2a.href,products:"",referrer:(function(){if(typeof document.referrer==_28){return _28;}if(document.referrer===null){return "null";}if(document.referrer===""){return "empty";}return document.referrer;})(),log_path:"/touchclarity",containers:new function(){var _2c=function(id,_2e){this.id=id;this.rendered=false;this.displayed=false;this.defaulted=false;this.error=false;this.content="";this.default_content=_2e;this.timeout_id=null;this.coids=[];};var ccs={};this.add=function(_30){var cc=new _2c(_30,"");ccs[_30]=cc;return cc;};this.get=function(_32){var cc=ccs[_32];if(!cc){cc=this.add(_32);cc.error=true;}return cc;};this.getAll=function(){var _34=[];for(var id in ccs){if(ccs[id].constructor==_2c){_34.push(ccs[id]);}}return _34;};this.getIDs=function(){var ids=[];for(var id in ccs){if(ccs[id].constructor==_2c){ids.push(id);}}return ids;};}()};var _38=new function(){var _39=encodeURIComponent||escape;this.getLogURL=function(_3a,_3b,_3c,_3d,_3e){var _3f=function(url){if(typeof url==_28||url===""||url===null){return _2b.base_url;}url=""+url;if(url.substring(0,4)!="http"&&url.substring(0,1)!="/"){url=_2a.pathname.substring(0,_2a.pathname.lastIndexOf("/")+1)+url;}if(url.substring(0,1)=="/"){url=api.logger.http+_2a.host+url;}return url;};var _41=function(_42){_42=(typeof _42!=_28?_42:_2b.base_url);if(_42.indexOf("?")>0){_42=_42.substring(0,_42.indexOf("?"));}var al=(_42!=api.logger.http+_2a.host+_2a.pathname);return al;};if(typeof _3a==_28){_3a="i";}_3b=_3f(_3b);var url=api.logger.http+_2b.server_hostname+"/"+_3a+"?siteID="+_2b.site_id;var _45=new Date().getTime();url+="&ts="+(typeof _3d!=_28?_3d:_45);var _46=_2b.containers.getIDs();if(_46.length>0){for(var cc=0;cc<_46.length;cc++){url+="&ccID="+_39(_46[cc]);}}if(_3a=="c"){url+="&log=no";}var al=_41(_3b);if(al){url+="&alias=true";}if(_3c&&_3c.length){url+="&prod="+_39(_3c);}if(typeof _3e!=_28){url+=_3e;}_3b=_39(_3b);while(_3b.length>1999-url.length){_3b=_3b.substring(0,_3b.lastIndexOf(_39("&")));}url+="&location="+_3b;var dg={};dg.tagv=_39(omtr.tc.Version);dg.tz=0-(new Date().getTimezoneOffset());dg.r=_39(_2b.referrer);dg.title=""+_39(document.title);if(al){dg.aliased=_39(_2a.href);}if(screen){dg.cd=screen.colorDepth;dg.ah=screen.availHeight;dg.aw=screen.availWidth;dg.sh=screen.height;dg.sw=screen.width;dg.pd=screen.pixelDepth;}for(var key in dg){if((typeof (dg[key])!=("function"))&&(typeof (dg[key])!=("array"))&&(typeof (dg[key])!=("object"))){var _4b="&"+key+"="+dg[key];if(url.length+_4b.length<2000){url+=_4b;}else{break;}}}return url;};}();this.logger=new function(){var _4c=this;this.loaded=true;this.http="http"+(_2a.href.substring(0,6)=="https:"?"s":"")+"://";var _4d=false;var _4e=false;var _4f=[];var _50=function(_51,url,_53,_54,_55){if(typeof url==_28||url===""){return false;}if(_2b.active){var _56=new Image();_56.src=_38.getLogURL("i",_53,_55,new Date().getTime());_4f.push(_56);}if(typeof _54==_28){return window.open(url,_51);}else{return window.open(url,_51,_54);}};var _57=function(_58,_59,_5a){if(!_2b.active){return null;}var _5b=new Image();_5b.src=_38.getLogURL("i",_58,_59,new Date().getTime(),_5a);_4f.push(_5b);return _5b;};var _5c=function(_5d,url,_5f,_60,_61,_62){var _63=null;if(typeof url==_28||url===""){return;}if(typeof _62==_28||_62===""){_62="window.location.href='"+url+"'";}if(typeof _5f==_28){_5f=url;}if(typeof _5d==_28||_5d===""||_5d=="_self"||_5d=="_parent"||_5d=="_top"){if(_2b.active){_63=new Image();_63.timeout_id=setTimeout(_62,(_2b.timeout*1000));_63.onload=function(){eval(_62);clearTimeout(_63.timeout_id);};_63.onerror=function(){eval(_62);clearTimeout(_63.timeout_id);};_63.src=_38.getLogURL("i",_5f,_61,new Date().getTime());_4f.push(_63);}else{eval(_62);}}else{if(typeof _5d=="object"&&_5d.document){if(_2b.active){_63=new Image();_63.src=_38.getLogURL("i",_5f,_61);_4f.push(_63);}_5d.location.href=url;}else{_50(_5d,url,_5f,_60,_61);}}};var _64=function(_65){if(_65.containers){return null;}else{var _66=null;if(_2b.active&&!_4e){_66=_57();_66.onload=function(){_4d=true;};}_4e=true;return _66;}};this.init=function(_67){if(_4e){return;}if(typeof _67!="object"){if(typeof window.tc=="object"){_67=window.tc;}else{_67={};}}if(_67.active===false||_67.active==="false"||_67.active===0){_2b.active=false;}if(_67.site_id){_2b.site_id=_67.site_id;}if(_67.server_hostname){_2b.server_hostname=_67.server_hostname;}if(_67.page_alias){_2b.base_url=_67.page_alias;}if(_67.extra_info){_2b.base_url+=(_2b.base_url.indexOf("?")>0?"&":"?")+_67.extra_info;}if(_67.timeout){_2b.timeout=_67.timeout;}if(_67.products){_2b.products=_67.products;}if(_67.referrer){_2b.referrer=_67.referrer;}_64(_67);};api.log=_57;api.redirect=_5c;}();this.targeter=new function(){this.loaded=true;this.content_url="";var _68=false;var _69=false;var _6a=function(){return (!document.getElementById&&!document.all);};var _6b=function(){if(_69===true){return 0;}var cc,_6d=_2b.containers.getAll(),_6e="",_6f=0,_70=0,_71=0;for(var i=0;i<_6d.length;i++){cc=_6d[i];if(cc.error){_6e+="&error="+cc.id;_6f++;}}if(_6f>0){api.log(null,null,_6e);_69=true;return 3;}for(var i=0;i<_6d.length;i++){cc=_6d[i];if(!cc.displayed&&!cc.defaulted){return 0;}if(cc.defaulted){_6e+="&default="+cc.id;_70++;}else{for(var co=0;co<cc.coids.length;co++){_6e+="&displayed="+cc.coids[co];_71++;}}}api.log(null,null,_6e);_69=true;var _74=1;if(_70>0&&_71==0){_74=2;}if(_70>0&&_71>0){_74=3;}return _74;};api.report=_6b;var _75=function(cc){return (function(){if(!cc.displayed){cc.defaulted=true;document.getElementById("tc_content_"+cc.id).innerHTML=cc.default_content;}omtr.tc.report();});};var _77=function(id,_79){var _7a=function(_7b){document.write("<span id='tc_content_"+id+"'>"+_7b+"</span>");};if(_6a()){_7a(_79);return;}var cc=_2b.containers.get(id);cc.default_content=_79;if(_2b.active===false){_7a(_79);}else{if(cc.error===true){_7a(_79);}else{if(cc.content!==""){if(cc.content=="__default__"){_7a(cc.default_content);}else{_7a(cc.content);}cc.displayed=true;}else{_7a("");cc.rendered=true;if(cc.default_content){var _7d=_75(cc);cc.timeout_id=setTimeout(_7d,_2b.timeout*1000);}}}}omtr.tc.report();};var _7e=function(_7f,_80,_81){var cc=_2b.containers.get(_7f);if(cc.defaulted){return;}cc.coids.push(_80);if(cc.rendered){if(_81=="__default__"){_81=cc.default_content;}document.getElementById("tc_content_"+_7f).innerHTML+=_81;cc.displayed=true;}else{cc.content+=_81;}};this.init=function(_83){if(_68){return;}if(typeof _83.containers=="string"){_2b.containers.add(_83.containers);}else{if(_83.containers&&_83.containers.length){for(var i=0;i<_83.containers.length;i++){_2b.containers.add(_83.containers[i]);}}else{return;}}if(_83.log_path){_2b.log_path=_83.log_path;}if(_2b.active&&!_6a()){var _85=_83.test?_83.test:_38.getLogURL("c");this.content_url="<scr"+"ipt src='"+_85+"'></scr"+"ipt>";document.writeln("<iframe id='tc_iframe' src='"+_2b.log_path+"/tc_targeting.html' width=0 height=0 style='display:none'></iframe>");}_68=true;};api.optimize=_77;api.set_content=_7e;}();var _86=function(_87){if(omtr.tc.plugin){for(var _88 in omtr.tc.plugin){if(omtr.tc.plugin[_88].init){omtr.tc.plugin[_88].init(_87);}}}};var _89=false;this.init=function(_8a){if(_89){return;}if(typeof _8a!="object"){if(typeof window.tc=="object"){_8a=window.tc;}else{_8a={};}}_86(_8a);this.logger.init(_8a);this.targeter.init(_8a);_89=true;};};omtr.extend("omtr.tc",new _27());if(window.tc_config&&window.tc_config.autoStart){omtr.tc.init(tc_config);}})();omtr.extend("omtr.tc.plugin.tc_extra_info_from_analytics",{init:function(_8b){if(!_8b.extraInfoFromAnalytics){return _8b;}var _8c="",_8d=_8b.extraInfoFromAnalytics;_8b.extra_info=_8b.extra_info||"";_8d.source=_8d.source||omtr.data;_8d.propList=_8d.propList||window.undefined;if(typeof _8d.encode!="boolean"){_8d.encode=true;}if(typeof omtr.data==("object")&&typeof omtr.data.serialize==("function")){_8c=omtr.data.serialize(_8d.propList,_8d.encode);_8b.extra_info+=_8c;return _8b;}var _8e,_8f=_8d.source,_90=(typeof encodeURIComponent!="undefined"?encodeURIComponent:escape);for(_8e in _8f){if((typeof (_8f[_8e])!=("function"))&&(typeof (_8f[_8e])!=("array"))&&(typeof (_8f[_8e])!=("object"))&&(typeof (_8f[_8e])!=("undefined"))&&((_8f[_8e])!=(""))&&((_8f[_8e])!=(null))){_8c+="&"+_90(_8e.toString())+"="+_90(_8f[_8e]);}}_8b.extra_info+=_8c;return _8b;}});
