/* 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. */

window.tc = window.tc || {};
tc.site_id = tc.site_id || 478;
tc.log_path = tc.log_path || "/templates/script/targeting";
// Uncomment for live servers
//tc.server_hostname = tc.server_hostname || "tc.ulsterbank.ie";
tc.server_hostname = tc.server_hostname || "tc.ulsterbank.co.uk";

/************************** PLUGINS SECTION *************************/

tc.pageAliasFromParams = ['id'];

//SWF OBJECT flash plugin

/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
window.undefined=window.undefined;window.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.tc_page_alias_from_params",{init:function(_8){if(_8.page_alias){return;}if(typeof _8.pageAliasFromParams=="string"){_8.pageAliasFromParams=[_8.pageAliasFromParams];}if(!_8.pageAliasFromParams){return;}var _9=new omtr.tc.plugin.tc_page_alias_from_params.Query(),_a=_8.pageAliasFromParams,_b="",i;for(i=0;i<_a.length;i++){if(_9.params&&typeof _9.params[_a[i]]!="undefined"){_b+="/"+_a[i]+"/"+_9.params[_a[i]];}}if(_b!==""){_b=_b.substring(1)+"?"+_9.queryString;_8.page_alias=_b;}},Query:function(_d){var q="",_f;if(typeof _d=="boolean"||typeof _d=="number"||typeof _d=="undefined"){q=_d?document.referrer.replace(/^[^\?]+\??/,""):document.location.search.replace(/^\?/,"");}else{if(typeof _d=="string"){q=_d;}}q=q.replace(/#[^#]*$/,"");this.queryString=q;this.params={};_f=this.queryString.split(/[&;]/);for(var i=0;i<_f.length;i++){var _11=_f[i].split("=");if(!_11.length==2){continue;}if(!(_11[0]||_11[1])){continue;}var key=unescape(_11[0]);var val=unescape(_11[1]);val=val.replace(/\+/g," ");this.params[key]=val;}}});omtr.extend("omtr.tc.plugin",{tc_swf_content:function(_14,_15){if(!_14||!(typeof _14=="object")){return _15;}if(typeof deconcept!="object"||typeof deconcept.SWFObject!="function"){return _15;}_14.id=_14.id||"tc-flash-content";_14.version=_14.version||"6.0.65";_14.backgroundColor=_14.backgroundColor||"#FFFFFF";if(!_14.swf||!_14.width||!_14.height){return _15;}var _16=new deconcept.SWFObject(_14.swf,_14["id"],_14.width,_14.height,_14.version,_14.backgroundColor,false,_14["quality"],false,_14["detectKey"],_14["detection"]);if(_14.vars&&typeof _14.vars=="object"){var a=[];for(var i=0;i<_14.vars.length;i++){if(typeof _14.vars[i]=="string"){a[i]=_14.vars[i].split("=");_16.addVariable(a[i][0],a[i][1]);}}}if(_16.installedVer.versionIsValid(_16.getAttribute("version"))){return _16.getSWFHTML();}else{return _15;}}});window.tc_swf_content=omtr.tc.plugin.tc_swf_content;omtr.extend("omtr.tc",{Version:"5.2.0",Vendor:"Omniture",Product:"TouchClarity"});(function(){var _19=function(){var _1a="undefined";var api=this;var _1c=window.location;var _1d={timeout:5,site_id:425,server_hostname:"tagging-qa.touchclarity.com",active:true,base_url:_1c.href,products:"",referrer:(function(){if(typeof document.referrer==_1a){return _1a;}if(document.referrer===null){return "null";}if(document.referrer===""){return "empty";}return document.referrer;})(),log_path:"/touchclarity",containers:new function(){var _1e=function(id,_20){this.id=id;this.rendered=false;this.displayed=false;this.defaulted=false;this.error=false;this.content="";this.default_content=_20;this.timeout_id=null;this.coids=[];};var ccs={};this.add=function(_22){var cc=new _1e(_22,"");ccs[_22]=cc;return cc;};this.get=function(_24){var cc=ccs[_24];if(!cc){cc=this.add(_24);cc.error=true;}return cc;};this.getAll=function(){var _26=[];for(var id in ccs){if(ccs[id].constructor==_1e){_26.push(ccs[id]);}}return _26;};this.getIDs=function(){var ids=[];for(var id in ccs){if(ccs[id].constructor==_1e){ids.push(id);}}return ids;};}()};var _2a=new function(){var _2b=encodeURIComponent||escape;this.getLogURL=function(_2c,_2d,_2e,_2f,_30){var _31=function(url){if(typeof url==_1a||url===""||url===null){return _1c.href;}url=""+url;if(url.substring(0,4)!="http"&&url.substring(0,1)!="/"){url=_1c.pathname.substring(0,_1c.pathname.lastIndexOf("/")+1)+url;}if(url.substring(0,1)=="/"){url=api.logger.http+_1c.host+url;}return url;};var _33=function(_34){_34=(typeof _34!=_1a?_34:_1d.base_url);if(_34.indexOf("?")>0){_34=_34.substring(0,_34.indexOf("?"));}var al=(_34!=api.logger.http+_1c.host+_1c.pathname);return al;};if(typeof _2c==_1a){_2c="i";}if(typeof _2d==_1a){_2d=_1d.base_url;}_2d=_31(_2d);var url=api.logger.http+_1d.server_hostname+"/"+_2c+"?siteID="+_1d.site_id;var _37=new Date().getTime();url+="&ts="+(typeof _2f!=_1a?_2f:_37);var _38=_1d.containers.getIDs();if(_38.length>0){for(var cc=0;cc<_38.length;cc++){url+="&ccID="+_2b(_38[cc]);}}if(_2c=="c"){url+="&log=no";}var al=_33(_2d);if(al){url+="&alias=true";}if(_2e&&_2e.length){url+="&prod="+_2b(_2e);}if(typeof _30!=_1a){url+=_30;}_2d=_2b(_2d);while(_2d.length>1999-url.length){_2d=_2d.substring(0,_2d.lastIndexOf(_2b("&")));}url+="&location="+_2d;var dg={};dg.tagv=_2b(omtr.tc.Version);dg.tz=0-(new Date().getTimezoneOffset());dg.r=_2b(_1d.referrer);dg.title=""+_2b(document.title);if(al){dg.aliased=_2b(_1c.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 _3d="&"+key+"="+dg[key];if(url.length+_3d.length<2000){url+=_3d;}else{break;}}}return url;};}();this.logger=new function(){var _3e=this;this.loaded=true;this.http="http"+(_1c.href.substring(0,6)=="https:"?"s":"")+"://";var _3f=false;var _40=false;var _41=[];var _42=function(_43,url,_45,_46,_47){if(typeof url==_1a||url===""){return false;}if(_1d.active){var _48=new Image();_48.src=_2a.getLogURL("i",_45,_47,new Date().getTime());_41.push(_48);}if(typeof _46==_1a){return window.open(url,_43);}else{return window.open(url,_43,_46);}};var _49=function(_4a,_4b,_4c){if(!_1d.active){return null;}var _4d=new Image();_4d.src=_2a.getLogURL("i",_4a,_4b,new Date().getTime(),_4c);_41.push(_4d);return _4d;};var _4e=function(_4f,url,_51,_52,_53,_54){var _55=null;if(typeof url==_1a||url===""){return;}if(typeof _54==_1a||_54===""){_54="window.location.href='"+url+"'";}if(typeof _51==_1a){_51=url;}if(typeof _4f==_1a||_4f===""||_4f=="_self"){if(_1d.active){_55=new Image();_55.timeout_id=setTimeout(_54,(_1d.timeout*1000));_55.onload=function(){eval(_54);clearTimeout(_3e.image.timeout_id);};_55.onerror=function(){eval(_54);clearTimeout(_3e.image.timeout_id);};_55.src=_2a.getLogURL("i",_51,_53,new Date().getTime());_41.push(_55);}else{eval(_54);}}else{if(typeof _4f=="object"&&_4f.document){if(_1d.active){_55=new Image();_55.src=_2a.getLogURL("i",_51,_53);_41.push(_55);}_4f.location.href=url;}else{_42(_4f,url,_51,_52,_53);}}};var _56=function(_57){if(_57.containers){return null;}else{var _58=null;if(_1d.active&&!_40){_58=_49();_58.onload=function(){_3f=true;};}_40=true;return _58;}};this.init=function(_59){if(_40){return;}if(typeof _59!="object"){if(typeof window.tc=="object"){_59=window.tc;}else{_59={};}}if(_59.active===false||_59.active==="false"||_59.active===0){_1d.active=false;}if(_59.site_id){_1d.site_id=_59.site_id;}if(_59.server_hostname){_1d.server_hostname=_59.server_hostname;}if(_59.page_alias){_1d.base_url=_59.page_alias;}if(_59.extra_info){_1d.base_url+=(_1d.base_url.indexOf("?")>0?"&":"?")+_59.extra_info;}if(_59.products){_1d.products=_59.products;}if(_59.referrer){_1d.referrer=_59.referrer;}_56(_59);};api.log=_49;api.redirect=_4e;}();this.targeter=new function(){this.loaded=true;this.content_url="";var _5a=false;var _5b=false;var _5c=function(){return (!document.getElementById&&!document.all);};var _5d=function(){if(_5b===true){return 0;}var cc,_5f=_1d.containers.getAll(),_60="",_61=0,_62=0,_63=0;for(var i=0;i<_5f.length;i++){cc=_5f[i];if(cc.error){_60+="&error="+cc.id;_61++;}}if(_61>0){api.log(null,null,_60);_5b=true;return 3;}for(var i=0;i<_5f.length;i++){cc=_5f[i];if(!cc.displayed&&!cc.defaulted){return 0;}if(cc.defaulted){_60+="&default="+cc.id;_62++;}else{for(var co=0;co<cc.coids.length;co++){_60+="&displayed="+cc.coids[co];_63++;}}}api.log(null,null,_60);_5b=true;var _66=1;if(_62>0&&_63==0){_66=2;}if(_62>0&&_63>0){_66=3;}return _66;};api.report=_5d;var _67=function(cc){return (function(){if(!cc.displayed){cc.defaulted=true;document.getElementById("tc_content_"+cc.id).innerHTML=cc.default_content;}omtr.tc.report();});};var _69=function(id,_6b){var _6c=function(_6d){document.write("<span id='tc_content_"+id+"'>"+_6d+"</span>");};if(_5c()){_6c(_6b);return;}var cc=_1d.containers.get(id);cc.default_content=_6b;if(cc.error===true){_6c(_6b);}else{if(cc.content!==""){if(cc.content=="__default__"){_6c(cc.default_content);}else{_6c(cc.content);}cc.displayed=true;}else{_6c("");cc.rendered=true;if(cc.default_content){var _6f=_67(cc);cc.timeout_id=setTimeout(_6f,_1d.timeout*1000);}}}omtr.tc.report();};var _70=function(_71,_72,_73){var cc=_1d.containers.get(_71);if(cc.defaulted){return;}cc.coids.push(_72);if(cc.rendered){if(_73=="__default__"){_73=cc.default_content;}document.getElementById("tc_content_"+_71).innerHTML+=_73;cc.displayed=true;}else{cc.content+=_73;}};this.init=function(_75){if(_5a){return;}if(typeof _75.containers=="string"){_1d.containers.add(_75.containers);}else{if(_75.containers&&_75.containers.length){for(var i=0;i<_75.containers.length;i++){_1d.containers.add(_75.containers[i]);}}else{return;}}if(_75.log_path){_1d.log_path=_75.log_path;}if(_1d.active&&!_5c()){var _77=_75.test?_2a.fixURL(_75.test):_2a.getLogURL("c");this.content_url="<scr"+"ipt src='"+_77+"'></scr"+"ipt>";if(_75.test){document.writeln(this.content_url);}else{document.writeln("<iframe id='tc_iframe' src='"+_1d.log_path+"/tc_targeting.html' width=0 height=0 style='display:none'></iframe>");}}_5a=true;};api.optimize=_69;api.set_content=_70;}();var _78=function(_79){if(omtr.tc.plugin){for(var _7a in omtr.tc.plugin){if(omtr.tc.plugin[_7a].init){omtr.tc.plugin[_7a].init(_79);}}}};var _7b=false;this.init=function(_7c){if(_7b){return;}if(typeof _7c!="object"){if(typeof window.tc=="object"){_7c=window.tc;}else{_7c={};}}_78(_7c);this.logger.init(_7c);this.targeter.init(_7c);_7b=true;};};omtr.extend("omtr.tc",new _19());if(window.tc&&window.tc.autoStart){omtr.tc.init(tc);}})();

