/* 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 || "429";
var tc_log_path = window.tc_log_path || "/www/global/js";
// #351
var tc_timeout = window.tc_timeout || 3;
// Write tc_page_alias
var tc_page_alias = "http://www.bankofamerica.com/OLB/"+window.pageCode + window.location.search;
// #328
  tc_server_url = window.tc_server_url || "bofa.tcliveus.com";



/************************** PLUGINS SECTION *************************/
// there can be only one tc_page_alias
var tc_pageAliasFromParams = ['pageID','product','calcid','category_id','context_id','context','template'];

// there can be many tc_extra_info additions
var tc_extra_info = window.tc_extra_info || '';
var tc_extraInfoFromCookies = [
    { 
      name:     "BOA_0020", // name of the cookie
      useValue: true // Boolean as to whether we should return the raw value of the cookie
    },
    { 
      name:     "state",
      useValue: true
    },
    { 
      name:     "BA_0021",
      testValue: "OLB" // value to test against the cookie value
    }
  ];

// #343
if(document.getElementsByName && document.getElementsByName('question_box') && document.getElementsByName('question_box')[0] && document.getElementsByName('question_box')[0].value){
  tc_extra_info += '&se='+document.getElementsByName('question_box')[0].value;
}

// #474, #660 split preapproved vars
(function () {
	var preapproved = window.preapproved || '';
	preapproved = ''+preapproved;
	for (var i=0; i<preapproved.length; i++) {
		tc_extra_info += "&p" + (i+1) + "=" + (preapproved.charAt(i) === '1' ? 1 : 0);
	}
})();

/************* 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){omtr.tc.logger.tc_configured();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.omtr=window.omtr||{};window.omtr.tc=window.omtr.tc||{Version:"4.3",Vendor:"Touch Clarity",Filename:"tc_logging.js"};omtr.tc.logger=omtr.tc.logger||{loaded:true,init:function(){this.tc_loader();},http:"http"+(window.location.href.substring(0,6)=="https:"?"s":"")+"://",tc_configured:function(){if(this.isConfigured){return true;}tc_ud="undefined";tc_tag_version=omtr.tc.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_server_url=omtr.tc.logger.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();this.isConfigured=true;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_encfn(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 window.location.href;}if((url.substring(0,4)!="http")&&(url.substring(0,1)!="/")){url=window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/")+1)+url;}if(url.substring(0,1)=="/"){url=omtr.tc.logger.http+window.location.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!=omtr.tc.logger.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;omtr.tc.util=omtr.tc.util||{};omtr.tc.util.cookie=omtr.tc.util.cookie||function(_2f,_30){this._name=_2f;var _31=(typeof decodeURIComponent!="undefined"?decodeURIComponent:unescape);var _32=document.cookie;if(_32===""){return;}var _33=_2f+"=";var _34=_32.split(";");var _35=null;for(var i=0;i<_34.length;++i){var c=_34[i];while(c.charAt(0)==" "){c=c.substring(1,c.length);}if(c.indexOf(_33)===0){_35=c.substring(_33.length,c.length);break;}}if(_35===null){return false;}this["_value"]=_31(_35);if(!_30){return true;}var _38=_35.substring(_2f.length+1);var a=_38.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]]=_31(a[k][1]);}};omtr.tc.util.cookie.prototype.store=function(_3c,_3d,_3e,_3f){var _40=(typeof encodeURIComponent!="undefined"?encodeURIComponent:escape);var _41="";for(var _42 in this){if((_42.charAt(0)=="_")||((typeof this[_42])=="function")){continue;}if(_41!==""){_41+="&";}_41+=_42+":"+_40(this[_42]);}var _43=this._name+"="+_41;if(_3c||_3c===0){_43+="; max-age="+(_3c*24*60*60);}if(_3d){_43+="; path="+_3d;}if(_3e){_43+="; domain="+_3e;}if(_3f){_43+="; secure";}document.cookie=_43;};omtr.tc.util.cookie.prototype.remove=function(_44,_45,_46){for(var _47 in this){if(_47.charAt(0)!="_"&&typeof this[_47]!="function"){delete this[_47];}}this.store(0,_44,_45,_46);};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 _48=document.cookie;if(_48.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.util=omtr.tc.util||{};omtr.tc.util.query=omtr.tc.util.query||function(_49){var q;if(typeof _49=="boolean"||typeof _49=="number"||typeof _49=="undefined"){q=_49?document.referrer.replace(/^[^\?]+\??/,""):document.location.search.replace(/^\?/,"");}else{if(typeof _49=="string"){q=_49;}else{return false;}}q=q.replace(/#[^#]*$/,"");if(q){this.queryString=q;this.params=this.parsequery();}};omtr.tc.util.query.prototype.parsequery=function(){var _4b={};if(!this.queryString){return _4b;}var _4c=this.queryString.split(/[&;]/);for(var i=0;i<_4c.length;++i){var _4e=_4c[i].split("=");if(!_4e.length==2){continue;}if(!(_4e[0]||_4e[1])){continue;}var key=unescape(_4e[0]);var val=unescape(_4e[1]);val=val.replace(/\+/g," ");_4b[key]=val;}return _4b;};window.TOUCHCLARITY=window.TOUCHCLARITY||{};TOUCHCLARITY.Util=TOUCHCLARITY.Util||{};TOUCHCLARITY.Util.Throttle=omtr.tc.util.throttle;omtr.tc.plugin=omtr.tc.plugin||{};omtr.tc.plugin.tc_extra_info_from_cookies=omtr.tc.plugin.tc_extra_info_from_cookies||function(_51){if(!_51||!(typeof _51=="object"&&typeof _51[0]=="object")){return false;}var _52="";for(var _53=0;_53<_51.length;++_53){var _54=_51[_53];var _55=new omtr.tc.util.cookie(_54.name,_54.trusted);if(typeof _55["_value"]!="undefined"&&_54.useValue){_52+="&"+_55["_name"]+"="+_55["_value"];}else{if(typeof _55["_value"]!="undefined"){_52+="&"+_55["_name"]+((_55["_value"]==_54.testValue)?"=true":"=false");}else{_52+="&"+_55["_name"]+"=false";}}}return _52;};if(tc_extraInfoFromCookies){tc_extra_info+=omtr.tc.plugin.tc_extra_info_from_cookies(tc_extraInfoFromCookies);}omtr.tc.plugin=omtr.tc.plugin||{};omtr.tc.plugin.tc_page_alias_from_params=omtr.tc.plugin.tc_page_alias_from_params||function(_56){var _57=new omtr.tc.util.query();var _58="";for(var i=0;i<_56.length;++i){if(_57["params"]&&typeof _57["params"][_56[i]]!="undefined"){_58+="/"+_56[i]+"/"+_57["params"][_56[i]];}}if(_58!==""){_58=_58+"?"+_57["queryString"];return _58;}else{return window.undefined;}};var tc_page_alias=window.tc_page_alias||omtr.tc.plugin.tc_page_alias_from_params(tc_pageAliasFromParams);omtr.tc.plugin=omtr.tc.plugin||{};omtr.tc.plugin.tc_swf_content=omtr.tc.plugin.tc_swf_content||function(_5a,_5b){if(!_5a||!(typeof _5a=="object")){return _5b;}if(typeof deconcept!="object"||typeof deconcept.SWFObject!="function"){return _5b;}_5a.id=_5a.id||"tc-flash-content";_5a.version=_5a.version||"6.0.65";_5a.backgroundColor=_5a.backgroundColor||"#FFFFFF";if(!_5a.swf||!_5a.width||!_5a.height){return _5b;}var _5c=new deconcept.SWFObject(_5a.swf,_5a["id"],_5a.width,_5a.height,_5a.version,_5a.backgroundColor,false,_5a["quality"],false,_5a["detectKey"],_5a["detection"]);if(_5a.vars&&typeof _5a.vars=="object"){var a=[];for(var i=0;i<_5a.vars.length;i++){if(typeof _5a.vars[i]=="string"){a[i]=_5a.vars[i].split("=");_5c.addVariable(a[i][0],a[i][1]);}}}if(_5a.params&&typeof _5a.params=="object"){a=[];for(i=0;i<_5a.params.length;i++){if(typeof _5a.params[i]=="string"){a[i]=_5a.params[i].split("=");_5c.addParam(a[i][0],a[i][1]);}}}if(_5c.installedVer.versionIsValid(_5c.getAttribute("version"))){return _5c.getSWFHTML();}else{return _5b;}_5c=window["undefined"];};var tc_swf_content=omtr.tc.plugin.tc_swf_content;tc_logging_active=true;omtr.tc.targeter.init();

