/* 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 || 444;
var tc_server_url = window.tc_server_url || "tc.palm.com";
var tc_log_path = window.tc_log_path || "/js";
var tc_logging_active = window.tc_logging_active || true;

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

// #444
var tc_dataObjectConfig = {
  source: 'omtr.data',
  propList: 'pageName,channel,products,events,purchaseID',
  encode: true
}
			
// #444
var tc_pageAliasFromParams = ['productID','categoryID','id','t1']

// #444
var tc_extraInfoFromCookies = [
    { name: "siCarrier", useValue: true },
    { name: "siDevice", useValue: true }
  ];

/************* 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_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(_1,_2,_3){if(!tc_logging_active){return;}_1=omtr.tc.logger.tc_fixURL(_1);tc_image=new Image();tc_image.src=omtr.tc.logger.tc_get_log_URL("i",_1,tc_products,new Date().getTime(),_3);},tc_redirect:function(_4,_5,_6,_7,_8,_9){if(typeof _5==tc_ud||_5==""){return;}if(typeof _9==tc_ud||_9==""){_9="tc_d_loc.href='"+_5+"'";}_5=omtr.tc.logger.tc_fixURL(_5);if(typeof _6==tc_ud){_6=_5;}_6=omtr.tc.logger.tc_fixURL(_6);if(typeof _4==tc_ud||_4==""||_4=="_self"){if(tc_logging_active){tc_timer=new Image();tc_timer.onload=function(){eval(_9);clearTimeout(tc_timeout_id);};tc_timer.onerror=function(){eval(_9);clearTimeout(tc_timeout_id);};tc_timer.src=omtr.tc.logger.tc_get_log_URL("i",_6,_8,new Date().getTime());tc_timeout_id=setTimeout(_9,tc_timeout);}else{eval(_9);}}else{if(typeof _4=="object"&&_4.document){if(tc_logging_active){tc_timer=new Image();tc_timer.src=omtr.tc.logger.tc_get_log_URL("i",_6,_8);}_4.location.href=_5;}else{omtr.tc.logger.tc_open_window(_4,_5,_6,_7,_8);}}},tc_open_window:function(_a,_b,_c,_d,_e){if(typeof _b==tc_ud||_b==""){return false;}if(tc_logging_active){tc_timer=new Image();tc_timer.src=omtr.tc.logger.tc_get_log_URL("i",_c,_e,new Date().getTime());}if(typeof _d==tc_ud){return window.open(_b,_a);}else{return window.open(_b,_a,_d);}},tc_get_log_URL:function(_f,_10,_11,_12,_13){if(typeof _f==tc_ud){_f="i";}var url=tc_server_url+"/"+_f+"?siteID="+tc_site_id;if(_f!="d"){url+="&ts="+(typeof _12!=tc_ud?_12:tc_time);var al=omtr.tc.logger.tc_isAlias(_10);if(typeof tc_containers!=tc_ud){for(var cc=0;cc<tc_containers.length;cc++){url+="&ccID="+tc_containers[cc];}}if(_f=="c"){url+="&log=no";}if(al){url+="&alias=true";}if((typeof _11!=tc_ud)&&_11.length){url+="&prod="+tc_encfn(_11);}if(typeof _13!=tc_ud){url+=_13;}if(_10==tc_ud){_10=tc_d_loc;}_10=tc_encfn(_10);while(_10.length>1999-url.length){_10=_10.substring(0,_10.lastIndexOf(tc_encfn("&")));}url+="&location="+_10;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 _19="&"+key+"="+dg[key];if(url.length+_19.length<2000){url+=_19;}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(_1b){_1b=(typeof _1b!=tc_ud?_1b:(typeof tc_page_alias==tc_ud?"":tc_page_alias));_1b=omtr.tc.logger.tc_fixURL(_1b);if(_1b.indexOf("?")>0){_1b=_1b.substring(0,_1b.indexOf("?"));}return (_1b!=tc_http+tc_d_loc.host+tc_d_loc.pathname);},tc_loader:function(){var _1c=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);_1c.onload=function(){tc_sent=true;};_1c.src=omtr.tc.logger.tc_get_log_URL("i",url,tc_products,tc_time);}tc_done=true;return _1c;}},tc_optimise:function(id,_1e){return false;}};omtr.tc.util=omtr.tc.util||{};omtr.tc.util.tc_namespace=omtr.tc.util.tc_namespace||function(){var a=arguments,o=null,i,j,d;for(i=0;i<a.length;i=i+1){d=a[i].split(".");o=window;for(j=(d[0]=="window")?1:0;j<d.length;j=j+1){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}return o;};omtr.tc.util=omtr.tc.util||{};omtr.tc.util.cookie=omtr.tc.util.cookie||function(_24,_25){this._name=_24;var _26=(typeof decodeURIComponent!="undefined"?decodeURIComponent:unescape);var _27=document.cookie;if(_27===""){return;}var _28=_24+"=";var _29=_27.split(";");var _2a=null;for(var i=0;i<_29.length;++i){var c=_29[i];while(c.charAt(0)==" "){c=c.substring(1,c.length);}if(c.indexOf(_28)===0){_2a=c.substring(_28.length,c.length);break;}}if(_2a===null){return false;}this["_value"]=_26(_2a);if(!_25){return true;}var _2d=_2a.substring(_24.length+1);var a=_2d.split("&");for(var j=0;j<a.length;++j){a[j]=a[j].split(":");}for(var k=0;k<a.length;++k){this[a[k][0]]=_26(a[k][1]);}};omtr.tc.util.cookie.prototype.store=function(_31,_32,_33,_34){var _35=(typeof encodeURIComponent!="undefined"?encodeURIComponent:escape);var _36="";for(var _37 in this){if((_37.charAt(0)=="_")||((typeof this[_37])=="function")){continue;}if(_36!==""){_36+="&";}_36+=_37+":"+_35(this[_37]);}var _38=this._name+"="+_36;if(_31||_31===0){_38+="; max-age="+(_31*24*60*60);}if(_32){_38+="; path="+_32;}if(_33){_38+="; domain="+_33;}if(_34){_38+="; secure";}document.cookie=_38;};omtr.tc.util.cookie.prototype.remove=function(_39,_3a,_3b){for(var _3c in this){if(_3c.charAt(0)!="_"&&typeof this[_3c]!="function"){delete this[_3c];}}this.store(0,_39,_3a,_3b);};omtr.tc.util.cookie.enabled=function(){if(navigator.cookieEnabled!==undefined){return navigator.cookieEnabled;}if(omtr.tc.util.cookie.enabled.cache!==undefined){return omtr.tc.util.cookie.enabled.cache;}document.cookie="_testcookie=test; max-age=10000";var _3d=document.cookie;if(_3d.indexOf("_testcookie=test")==-1){omtr.tc.util.cookie.enabled.cache=false;return omtr.tc.util.cookie.enabled.cache;}else{document.cookie="_testcookie=test; max-age=0";omtr.tc.util.cookie.enabled.cache=true;return omtr.tc.util.cookie.enabled.cache;}};omtr.tc.plugin=omtr.tc.plugin||{};omtr.tc.plugin.tc_extra_info_from_cookies=omtr.tc.plugin.tc_extra_info_from_cookies||function(_3e){if(!_3e||!(typeof _3e=="object"&&typeof _3e[0]=="object")){return false;}var _3f="";for(var _40=0;_40<_3e.length;++_40){var _41=_3e[_40];var _42=new omtr.tc.util.cookie(_41.name,_41.trusted);if(typeof _42["_value"]!="undefined"&&_41.useValue){_3f+="&"+_42["_name"]+"="+_42["_value"];}else{if(typeof _42["_value"]!="undefined"){_3f+="&"+_42["_name"]+((_42["_value"]==_41.testValue)?"=true":"=false");}else{_3f+="&"+_42["_name"]+"=false";}}}_3f=_3f.substring(1);return _3f;};var tc_extra_info=window.tc_extra_info||"";if(tc_extraInfoFromCookies){tc_extra_info+=omtr.tc.plugin.tc_extra_info_from_cookies(tc_extraInfoFromCookies);}omtr.tc.util=omtr.tc.util||{};omtr.tc.util.tc_objectPropertiesToParams=omtr.tc.util.tc_objectPropertiesToParams||function(_43){if(typeof _43!=("undefined")&&typeof _43==("object")){tc_encfn=(typeof encodeURIComponent!="undefined"?encodeURIComponent:escape);var _44="";for(var _45 in _43){if((typeof (_43[_45])!=("function"))&&(typeof (_43[_45])!=("array"))&&(typeof (_43[_45])!=("object"))&&(typeof (_43[_45])!=("undefined"))&&((_43[_45])!=(""))&&((_43[_45])!=(null))){_44+="&"+tc_encfn(_45.toString())+"="+tc_encfn(_43[_45]);}}return _44;}else{return "";}};omtr.tc.util=omtr.tc.util||{};omtr.tc.util.query=omtr.tc.util.query||function(_46){var q;if(typeof _46=="boolean"||typeof _46=="number"||typeof _46=="undefined"){q=_46?document.referrer.replace(/^[^\?]+\??/,""):document.location.search.replace(/^\?/,"");}else{if(typeof _46=="string"){q=_46;}else{return false;}}q=q.replace(/#[^#]*$/,"");if(q){this.queryString=q;this.params=this.parsequery();}};omtr.tc.util.query.prototype.parsequery=function(){var _48={};if(!this.queryString){return _48;}var _49=this.queryString.split(/[&;]/);for(var i=0;i<_49.length;++i){var _4b=_49[i].split("=");if(!_4b.length==2){continue;}if(!(_4b[0]||_4b[1])){continue;}var key=unescape(_4b[0]);var val=unescape(_4b[1]);val=val.replace(/\+/g," ");_48[key]=val;}return _48;};omtr.tc.plugin=omtr.tc.plugin||{};omtr.tc.plugin.tc_serialize=omtr.tc.plugin.tc_serialize||function(_4e){if(!_4e||!(typeof _4e=="object")){return "";}var _4f="";_4e.source=_4e.source||omtr.data;_4e.propList=_4e.propList||window.undefined;_4e.encode=_4e.encode||true;if(typeof omtr.data==("object")&&typeof omtr.data.serialize==("function")){_4f+=omtr.data.serialize(_4e.propList,_4e.encode);return _4f;}_4f+=omtr.tc.util.tc_objectPropertiesToParams(_4e.source);return _4f;};var tc_serialize=omtr.tc.plugin.tc_serialize;var tc_extra_info=window.tc_extra_info||"";tc_extra_info+=tc_serialize(tc_dataObjectConfig);omtr.tc.plugin=omtr.tc.plugin||{};omtr.tc.plugin.tc_page_alias_from_params=omtr.tc.plugin.tc_page_alias_from_params||function(_50){var _51=new omtr.tc.util.query();var _52="";for(var i=0;i<_50.length;++i){if(_51["params"]&&typeof _51["params"][_50[i]]!="undefined"){_52+="/"+_50[i]+"/"+_51["params"][_50[i]];}}if(_52!==""){_52=_52+"?"+_51["queryString"];return _52;}else{return window.undefined;}};var tc_page_alias=window.tc_page_alias||omtr.tc.plugin.tc_page_alias_from_params(tc_pageAliasFromParams);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.logger.init();