/* Touch Clarity 
 * Copyright (c) Touch Clarity Ltd 2001-2007. All rights reserved. Patent Pending.
 * Privacy Policy at http://www.touchclarity.com/privacy/
 */

window.undefined=window.undefined;window.TOUCHCLARITY=window.TOUCHCLARITY||{Version:"4.2.2#369#393",Vendor:"Touch Clarity",Filename:"tc_targeting.js"};TOUCHCLARITY.Targeter=TOUCHCLARITY.Targeter||{loaded:true,init:function(){TOUCHCLARITY.Logger.tc_loader();this.tc_opt_loader();},tc_unsupported:function(){TOUCHCLARITY.Util.BrowserDetect.init();if((TOUCHCLARITY.Util.BrowserDetect.browser=="Netscape"||TOUCHCLARITY.Util.BrowserDetect.browser=="Explorer")&&(TOUCHCLARITY.Util.BrowserDetect.version<5)){return true;}else{return false;}},tc_optimise:function(id,_2){if(TOUCHCLARITY.Targeter.tc_unsupported()){document.write(_2);return;}
if(tc_ccs[id]==null){tc_ccs[id]=new TOUCHCLARITY.Targeter.tc_cc(_2);}else{tc_ccs[id].default_content=_2;}
if(tc_ccs[id].content!==""){if(tc_ccs[id].content!="__default__"){document.write(tc_ccs[id].content);tc_reporter+=tc_ccs[id].reporter;tc_ccs[id].displayed=true;}else{document.write(tc_ccs[id].default_content);}}else{if(tc_frame){document.write("<div id='tc_content_"+id+"'></div>");tc_ccs[id].rendered=true;if(typeof _2!="undefined"){var mt=(document.all?"document.all":"document.getElementById");tc_ccs[id].timeout_id=setTimeout("if(!tc_ccs['"+id+"'].displayed){tc_ccs['"+id+"'].defaulted=true;"+mt+"('tc_content_"+id+"').innerHTML=tc_ccs['"+id+"'].default_content;}TOUCHCLARITY.Targeter.tc_report();",tc_timeout);}}else{document.write(_2);}}
TOUCHCLARITY.Targeter.tc_report();},tc_set_content:function(_4,_5,_6){if(tc_ccs[_4]==null){tc_ccs[_4]=new TOUCHCLARITY.Targeter.tc_cc("");}
if(tc_ccs[_4].defaulted){return;}
if(tc_ccs[_4].rendered){if(_6=="__default__"){_6=tc_ccs[_4].default_content;}
if(document.getElementById){document.getElementById("tc_content_"+_4).innerHTML+=_6;}else{if(document.all){document.all("tc_content_"+_4).innerHTML+=_6;}}
tc_reporter+="&displayed="+_5;tc_ccs[_4].displayed=true;}else{tc_ccs[_4].content+=_6;tc_ccs[_4].reporter+="&displayed="+_5;}},tc_cc:function(_7){this.rendered=false;this.displayed=false;this.defaulted=false;this.content="";this.default_content=_7;this.timeout_id=null;this.reporter="";},tc_report:function(){if(tc_reported){return;}
var _8="";for(var cc=0;cc<tc_containers.length;cc++){var id=tc_containers[cc];if((tc_ccs[id]===null)||(!tc_ccs[id].displayed&&!tc_ccs[id].defaulted)){return;}
if(tc_ccs[id].defaulted){_8+="&default="+id;}}
TOUCHCLARITY.Logger.tc_log(tc_url,tc_products,tc_reporter+_8);tc_reported=true;},tc_opt_loader:function(){tc_ud="undefined";if(typeof tc_logging_active!="undefined"&&tc_logging_active&&TOUCHCLARITY.Logger.tc_configured()&&(typeof tc_done==tc_ud||tc_done===false)){tc_tag_version="4.2.2#369#393";tc_log_call="<scr"+"ipt src='"+(typeof tc_test!=tc_ud?tc_test:TOUCHCLARITY.Logger.tc_get_log_URL("c",tc_url,tc_products,tc_time))+"'></scr"+"ipt>";if(!TOUCHCLARITY.Targeter.tc_unsupported()&&typeof tc_log_call!="undefined"&&tc_frame){document.writeln("<iframe name='tc_iframe' src='"+tc_log_path+"/"+tc_log_page+"' width=0 height=0 style='position:absolute;left:-100px'></iframe>");}
tc_done=true;}}};var tc_reporter="";var tc_reported=false;var tc_optimise=TOUCHCLARITY.Targeter.tc_optimise;var tc_set_content=TOUCHCLARITY.Targeter.tc_set_content;var tc_report=TOUCHCLARITY.Targeter.tc_report;TOUCHCLARITY.Util=TOUCHCLARITY.Util||{};TOUCHCLARITY.Util.BrowserDetect=TOUCHCLARITY.Util.BrowserDetect||{init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";},searchString:function(_b){for(var i=0;i<_b.length;i++){var _d=_b[i].string;var _e=_b[i].prop;this.versionSearchString=_b[i].versionSearch||_b[i].identity;if(_d){if(_d.indexOf(_b[i].subString)!=-1){return _b[i].identity;}}else{if(_e){return _b[i].identity;}}}},searchVersion:function(_f){var _10=_f.indexOf(this.versionSearchString);if(_10==-1){return;}
return parseFloat(_f.substring(_10+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};window.undefined=window.undefined;window.TOUCHCLARITY=window.TOUCHCLARITY||{Version:"4.2.2#369#393",Vendor:"Touch Clarity",Filename:"tc_logging.js"};TOUCHCLARITY.Logger=TOUCHCLARITY.Logger||{loaded:true,init:function(){this.tc_loader();},tc_configured:function(){tc_tag_version="4.2";tc_dtimeout=5000;tc_d_loc=window.location;tc_sent=0;if(typeof tc_server_url==tc_ud||typeof tc_site_id==tc_ud){return false;}
if(typeof tc_log_page==tc_ud||tc_log_page==""){tc_log_page="logging.html";}
tc_layer=(document.layers?1:0);tc_frame=(document.getElementById||document.all?1:0);tc_timeout=(typeof tc_timeout==tc_ud?tc_dtimeout:tc_timeout*1000);tc_encfn=(typeof encodeURIComponent!=tc_ud?encodeURIComponent:escape);tc_http="http"+(tc_d_loc.href.substring(0,6)=="https:"?"s":"")+"://";tc_server_url=tc_http+tc_server_url;tc_url=((typeof tc_page_alias!=tc_ud)?tc_page_alias:tc_d_loc.href);if(typeof tc_extra_info!=tc_ud){tc_url+=(tc_url.indexOf("?")>0?"&":"?")+tc_extra_info;}
tc_extra_info="";tc_products=(typeof tc_products==tc_ud?"":tc_products);tc_ccs=new Array();tc_referrer=(typeof tc_referrer!=tc_ud&&tc_referrer!=""&&tc_referrer!=null?tc_referrer:(typeof document.referrer==tc_ud?tc_ud:(document.referrer==null?"null":(document.referrer==""?"empty":document.referrer))));tc_time=new Date().getTime();return true;},tc_log:function(_11,_12,_13){if(!tc_logging_active){return;}
_11=TOUCHCLARITY.Logger.tc_fixURL(_11);tc_image=new Image();tc_image.src=TOUCHCLARITY.Logger.tc_get_log_URL("i",_11,tc_products,new Date().getTime(),_13);},tc_redirect:function(_14,url,_16,_17,_18,_19){if(typeof url==tc_ud||url==""){return;}
if(typeof _19==tc_ud||_19==""){_19="tc_d_loc.href='"+url+"'";}
url=TOUCHCLARITY.Logger.tc_fixURL(url);if(typeof _16==tc_ud){_16=url;}
_16=TOUCHCLARITY.Logger.tc_fixURL(_16);if(typeof _14==tc_ud||_14==""||_14=="_self"){if(tc_logging_active){tc_timer=new Image();tc_timer.onload=function(){eval(_19);clearTimeout(tc_timeout_id);};tc_timer.onerror=function(){eval(_19);clearTimeout(tc_timeout_id);};tc_timer.src=TOUCHCLARITY.Logger.tc_get_log_URL("i",_16,_18,new Date().getTime());tc_timeout_id=setTimeout(_19,tc_timeout);}else{eval(_19);}}else{if(typeof _14=="object"&&_14.document){if(tc_logging_active){tc_timer=new Image();tc_timer.src=TOUCHCLARITY.Logger.tc_get_log_URL("i",_16,_18);}
_14.location.href=url;}else{TOUCHCLARITY.Logger.tc_open_window(_14,url,_16,_17,_18);}}},tc_open_window:function(_1a,url,_1c,_1d,_1e){if(typeof url==tc_ud||url==""){return false;}
if(tc_logging_active){tc_timer=new Image();tc_timer.src=TOUCHCLARITY.Logger.tc_get_log_URL("i",_1c,_1e,new Date().getTime());}
if(typeof _1d==tc_ud){return window.open(url,_1a);}else{return window.open(url,_1a,_1d);}},tc_get_log_URL:function(_1f,_20,_21,_22,_23){if(typeof _1f==tc_ud){_1f="i";}
var url=tc_server_url+"/"+_1f+"?siteID="+tc_site_id;if(_1f!="d"){url+="&ts="+(typeof _22!=tc_ud?_22:tc_time);var al=TOUCHCLARITY.Logger.tc_isAlias(_20);if(typeof tc_containers!=tc_ud){for(var cc=0;cc<tc_containers.length;cc++){url+="&ccID="+tc_containers[cc];}}
if(_1f=="c"){url+="&log=no";}
if(al){url+="&alias=true";}
if((typeof _21!=tc_ud)&&_21.length){url+="&prod="+tc_encfn(_21);}
if(typeof _23!=tc_ud){url+=_23;}
if(_20==tc_ud){_20=tc_d_loc;}
_20=tc_encfn(_20);while(_20.length>1999-url.length){_20=_20.substring(0,_20.lastIndexOf(tc_encfn("&")));}
url+="&location="+_20;var dg=new Object();dg.tagv=tc_tag_version;dg.tz=0-(new Date().getTimezoneOffset());dg.r=tc_encfn(tc_referrer);dg.title=""+tc_encfn(document.title);if(al){dg.aliased=tc_encfn(tc_d_loc.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 _29="&"+key+"="+dg[key];if(url.length+_29.length<2000){url+=_29;}else{break;}}}}else{url+="&dlts="+tc_time+"&dl="+(new Date().getTime()-tc_time);}
return url;},tc_fixURL:function(url){if(url==""){return tc_d_loc.href;}
if((url.substring(0,4)!="http")&&(url.substring(0,1)!="/")){url=tc_d_loc.pathname.substring(0,tc_d_loc.pathname.lastIndexOf("/")+1)+url;}
if(url.substring(0,1)=="/"){url=tc_http+tc_d_loc.host+url;}
return url;},tc_isAlias:function(_2b){_2b=(typeof _2b!=tc_ud?_2b:(typeof tc_page_alias==tc_ud?"":tc_page_alias));_2b=TOUCHCLARITY.Logger.tc_fixURL(_2b);if(_2b.indexOf("?")>0){_2b=_2b.substring(0,_2b.indexOf("?"));}
return(_2b!=tc_http+tc_d_loc.host+tc_d_loc.pathname);},tc_loader:function(){var _2c=new Image();tc_ud="undefined";if((typeof tc_containers!="undefined")&&(tc_containers.length>0)){return;}else{if((typeof tc_logging_active!="undefined"&&tc_logging_active)&&TOUCHCLARITY.Logger.tc_configured()&&(typeof tc_done==tc_ud||tc_done===false)){url=TOUCHCLARITY.Logger.tc_fixURL(tc_url);_2c.onload=function(){tc_sent=true;};_2c.src=TOUCHCLARITY.Logger.tc_get_log_URL("i",url,tc_products,tc_time);}
tc_done=true;return _2c;}},tc_optimise:function(id,_2e){return false;}};var tc_log=TOUCHCLARITY.Logger.tc_log;var tc_redirect=TOUCHCLARITY.Logger.tc_redirect;var tc_open_window=TOUCHCLARITY.Logger.tc_open_window;var tc_optimise=window.tc_optimise||TOUCHCLARITY.Logger.tc_optimise;TOUCHCLARITY.Util=TOUCHCLARITY.Util||{};TOUCHCLARITY.Util.Query=TOUCHCLARITY.Util.Query||function(_2f){var q;if(typeof _2f=="boolean"||typeof _2f=="number"||typeof _2f=="undefined"){q=_2f?document.referrer.replace(/^[^\?]+\??/,""):document.location.search.replace(/^\?/,"");}else{if(typeof _2f=="string"){q=_2f;}else{return false;}}
q=q.replace(/#[^#]*$/,"");if(q){this.queryString=q;this.params=this.parseQuery();}};TOUCHCLARITY.Util.Query.prototype.parseQuery=function(){var _31={};if(!this.queryString){return _31;}
var _32=this.queryString.split(/[&;]/);for(var i=0;i<_32.length;++i){var _34=_32[i].split("=");if(!_34.length==2){continue;}
if(!(_34[0]||_34[1])){continue;}
var key=unescape(_34[0]);var val=unescape(_34[1]);val=val.replace(/\+/g," ");_31[key]=val;}
return _31;};TOUCHCLARITY.Util=TOUCHCLARITY.Util||{};TOUCHCLARITY.Util.ObjectPropertiesToParams=TOUCHCLARITY.Util.ObjectPropertiesToParams||function(_37){if(typeof _37!=("undefined")&&typeof _37==("object")){tc_encfn=(typeof encodeURIComponent!="undefined"?encodeURIComponent:escape);var _38="";for(var _39 in _37){if((typeof(_37[_39])!=("function"))&&(typeof(_37[_39])!=("array"))&&(typeof(_37[_39])!=("object"))){_38+="&"+tc_encfn(_39.toString())+"="+tc_encfn(_37[_39]);}}
_38=_38.substring(1);return _38;}};if(typeof WT!="undefined"&&typeof DCS!="undefined"){tc_extra_info=window.tc_extra_info||"";tc_extra_info+=TOUCHCLARITY.Util.ObjectPropertiesToParams(WT);tc_extra_info+=TOUCHCLARITY.Util.ObjectPropertiesToParams(DCS);}
TOUCHCLARITY.Plugin=TOUCHCLARITY.Plugin||{};TOUCHCLARITY.Plugin.tc_page_alias_from_params=TOUCHCLARITY.Plugin.tc_page_alias_from_params||function(_3a){var _3b=new TOUCHCLARITY.Util.Query();var _3c="";for(var i=0;i<_3a.length;++i){if(_3b["params"]&&typeof _3b["params"][_3a[i]]!="undefined"){_3c+="/"+_3a[i]+"/"+_3b["params"][_3a[i]];}}
if(_3c!==""){_3c=_3c.substring(1);_3c=_3c+"?"+_3b["queryString"];return _3c;}else{return window.undefined;}};TOUCHCLARITY.Plugin=TOUCHCLARITY.Plugin||{};TOUCHCLARITY.Plugin.tc_page_alias_from_params=TOUCHCLARITY.Plugin.tc_page_alias_from_params||function(_3e){var _3f=new TOUCHCLARITY.Util.Query();var _40="";for(var i=0;i<_3e.length;++i){if(_3f["params"]&&typeof _3f["params"][_3e[i]]!="undefined"){_40+="/"+_3e[i]+"/"+_3f["params"][_3e[i]];}}
if(_40!==""){_40=_40.substring(1);_40=_40+"?"+_3f["queryString"];return _40;}else{return window.undefined;}};TOUCHCLARITY.Plugin=TOUCHCLARITY.Plugin||{};TOUCHCLARITY.Plugin.tc_swf_content=TOUCHCLARITY.Plugin.tc_swf_content||function(_42,_43){if(!_42||!(typeof _42=="object")){return _43;}
if(typeof deconcept!="object"||typeof deconcept.SWFObject!="function"){return _43;}
_42.id=_42.id||"tc-flash-content";_42.version=_42.version||"6.0.65";_42.backgroundColor=_42.backgroundColor||"#FFFFFF";if(!_42.swf||!_42.width||!_42.height){return _43;}
var _44=new deconcept.SWFObject(_42.swf,_42["id"],_42.width,_42.height,_42.version,_42.backgroundColor,false,_42["quality"],false,_42["detectKey"],_42["detection"]);if(_42.vars&&typeof _42.vars=="object"){for(var i=0;i<_42.length;++i){if(typeof _42[i]=="string"){a[i]=_42[i].split("=");_44.addVariable(a[i][0],a[i][1]);}}}
if(_44.installedVer.versionIsValid(_44.getAttribute("version"))){return _44.getSWFHTML();}else{return _43;}
_44=window["undefined"];};var tc_swf_content=TOUCHCLARITY.Plugin.tc_swf_content;
/* Checksum: $SHA1 */

/* Customisations */
var tc_site_id = window.tc_site_id || "442";
var tc_server_url = window.tc_server_url || "tc.vodafone.co.uk";
var tc_log_path = window.tc_log_path || "/en_GB/js/touchclarity/";
var tc_logging_active = window.tc_logging_active || true;

// there can be only one tc_page_alias
var tc_page_alias = window.tc_page_alias || TOUCHCLARITY.Plugin.tc_page_alias_from_params(['pageID','go','fuseaction','DocName','do']);

// start
TOUCHCLARITY.Targeter.init();

