﻿/* TouchClarity 
 * Copyright (c) Omniture 2001-2007. All rights reserved. Patent Pending.
 * Privacy Policy at http://www.touchclarity.com/privacy/
 */
/************************** CONFIG SECTION **************************/
/* You may add or alter any code config here. */
var tc_site_id = window.tc_site_id || 452;
var tc_server_url = window.tc_server_url || "tc.autoanything.com";
var tc_log_path = window.tc_log_path || "/scripts";
var tc_logging_active = window.tc_logging_active || true;

/************************** PLUGINS SECTION *************************/
 
/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
window.undefined=window.undefined;window.omtr=window.omtr||{};window.omtr.tc=window.omtr.tc||{Version:"4.3",Vendor:"Omniture",Product:"TouchClarity",Filename:"tc_targeting.js"};omtr.tc.targeter=omtr.tc.targeter||{loaded:true,init:function(){omtr.tc.logger.tc_loader();this.tc_opt_loader();},tc_unsupported:function(){omtr.tc.Util.BrowserDetect.init();if((omtr.tc.Util.BrowserDetect.browser=="Netscape"||omtr.tc.Util.BrowserDetect.browser=="Explorer")&&(omtr.tc.Util.BrowserDetect.version<5)){return true;}else{return false;}},tc_optimise:function(id,_2){if(omtr.tc.targeter.tc_unsupported()){document.write(_2);return;}if(tc_ccs[id]==null){tc_ccs[id]=new omtr.tc.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;}omtr.tc.targeter.tc_report();",tc_timeout);}}else{document.write(_2);}}omtr.tc.targeter.tc_report();},tc_set_content:function(_4,_5,_6){if(tc_ccs[_4]==null){tc_ccs[_4]=new omtr.tc.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;}}omtr.tc.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&&omtr.tc.logger.tc_configured()&&(typeof tc_done==tc_ud||tc_done===false)){tc_tag_version="4.3";tc_log_call="<scr"+"ipt src='"+(typeof tc_test!=tc_ud?tc_test:omtr.tc.logger.tc_get_log_URL("c",tc_url,tc_products,tc_time))+"'></scr"+"ipt>";if(!omtr.tc.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=omtr.tc.targeter.tc_optimise;var tc_set_content=omtr.tc.targeter.tc_set_content;var tc_report=omtr.tc.targeter.tc_report;omtr.tc.Util=omtr.tc.Util||{};omtr.tc.Util.BrowserDetect=omtr.tc.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.3",Vendor:"Touch Clarity",Filename:"tc_logging.js"};omtr.tc.logger=omtr.tc.logger||{loaded:true,init:function(){this.tc_loader();},tc_configured:function(){tc_tag_version="4.3";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="tc_targeting.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=omtr.tc.logger.tc_fixURL(_11);tc_image=new Image();tc_image.src=omtr.tc.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=omtr.tc.logger.tc_fixURL(url);if(typeof _16==tc_ud){_16=url;}_16=omtr.tc.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=omtr.tc.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=omtr.tc.logger.tc_get_log_URL("i",_16,_18);}_14.location.href=url;}else{omtr.tc.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=omtr.tc.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=omtr.tc.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=omtr.tc.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)&&omtr.tc.logger.tc_configured()&&(typeof tc_done==tc_ud||tc_done===false)){url=omtr.tc.logger.tc_fixURL(tc_url);_2c.onload=function(){tc_sent=true;};_2c.src=omtr.tc.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=omtr.tc.logger.tc_log;var tc_redirect=omtr.tc.logger.tc_redirect;var tc_open_window=omtr.tc.logger.tc_open_window;var tc_optimise=window.tc_optimise||omtr.tc.logger.tc_optimise;var tc_site_id=window.tc_site_id||425;var tc_server_url=window.tc_server_url||"tagging-qa.touchclarity.com";var tc_log_path=window.tc_log_path||"/touchclarity";var tc_logging_active=window.tc_logging_active||true;omtr.tc.targeter.init();