var toolTips=new Class({initialize:function(){this.setup()},setup:function(){var f=$$("img.tooltip");if(f.length>0){var k=new Element("div",{id:"toolTip",role:"alert"});var g=new Element("div",{"class":"rT"});var h=new Element("div",{"class":"rM"});var j=new Element("div",{"class":"rB"});k.setStyle("display","none");g.inject(k);h.inject(k);j.inject(k);k.inject(document.body,"bottom")}f.each(function(a){a.set("tabindex","0");a.addEvent("mouseenter",function(c){var b=a.getCoordinates();tipTitle=a.get("alt");a.set("alt","");h.set("text",tipTitle);k.setStyle("display","block");var d=k.getSize();k.setPosition({x:b.right-25,y:(b.bottom-d.y)-15})});a.addEvent("focus",function(c){var b=a.getCoordinates();tipTitle=a.get("alt");h.set("text",tipTitle);k.setStyle("display","block");var d=k.getSize();k.setPosition({x:b.right-25,y:(b.bottom-d.y)-15})});a.addEvent("mouseleave",function(b){k.setStyle("display","none");a.set("alt",h.get("text"))});a.addEvent("blur",function(b){k.setStyle("display","none");a.set("alt",h.get("text"))})})}});popup=new Class({Implements:[Options,Events],options:{winHeight:460,winWidth:640,name:'newWindow',winTop:(screen.height/2),winLeft:(screen.width/2)},initialize:function(el,options){this.setOptions(options);this.options.winTop=(screen.height/2)-(this.options.winHeight/2),this.options.winLeft=(screen.width/2)-(this.options.winWidth/2);this.el=el;this.url=this.el.get('href');this.features='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,height='+this.options.winHeight+',width='+this.options.winWidth+',top='+this.options.winTop+',left='+this.options.winLeft;this.el.addEvent('click',function(){this.window=window.open(this.url,this.options.name,this.features);return false}.bind(this))}});var tabs=new Class({Implements:[Options,Events],options:{},tabs:[],initialize:function(h,e){this.setOptions(e);this.format(h);this.tabs=$$("div.tab-links li");var g=$getUrlKey("#");this.tabs.each(function(b,c){var a=b.getElement("a").getProperty("href");this.addTab(b,$$(a));if(g){if(a=="#"+g){this.showTab=c}}},this);if(this.showTab){this.show(this.tabs[this.showTab]);var f=new Fx.Scroll(window,{duration:0}).toTop()}else{this.show(this.tabs[0])}},format:function(j){var j=$(j);var f=new Element("div",{"class":"tab-links clearfix"});var h=new Element("div",{"class":"tab-content"});var k=j.getElement("ul");f.wraps(k);var g=j.getElements("div.tab-item");h.inject(j);h.adopt(g)},addTab:function(d,c){this.tabs.include(d);d.store("tab-item",c);this.attach(d)},attach:function(b){b.addEvent("click",function(a){a.preventDefault();this.show(b)}.bind(this))},show:function(d){this.tabs.each(function(a){a.removeClass("selected");a.set("opacity",".5");var b=a.retrieve("tab-item");b.setStyle("display","none")});d.set("opacity","1");var c=d.retrieve("tab-item");c.setStyle("display","block");d.addClass("selected")}});var tables=new Class({initialize:function(){this.setup()},setup:function(){var c=$$("tr");c.each(function(a){a.getChildren(":nth-child(first)").addClass("first");a.getChildren(":nth-child(last)").addClass("last")});var d=$$("table.even-cols");d.each(function(a){var b=a.getElements("th");var f=(100/b.length).round(1);b.setStyle("width",f+"%")})}});var sitewide=new Class({initialize:function(){this.topLinks();this.listinks()},topLinks:function(){$$(".sitewide-top").addEvent("click",function(){var b=new Fx.Scroll(window,{duration:400}).toTop();return false})},listinks:function(){$$("#sitewideList a").addEvent("click",function(){var f=$getUrlKey("#",this.href);var d=$(f);var e=new Fx.Scroll(window,{duration:400,onComplete:function(){$(d).highlight("#e5eff6")}}).toElement(d);return false})}});var siteMap=new Class({initialize:function(c,d){this.element=$(c);this.trigger=$(d);this.setup()},setup:function(){var f=new Element("div",{id:"siteMapWrapper"});var d=new Element("div",{"class":"cA"});d.grab(this.element);d.inject(f);f.inject($('accessibility'),"after");var e=new Fx.Slide(this.element,{duration:300,transition:Fx.Transitions.Sine.easeOut});e.hide();$(this.trigger).addEvent("click",function(){e.toggle();this.getParent().toggleClass("active");return false})}});var plinth=new Class({initialize:function(){this.setup()},setup:function(){var b=$$("div.plinth");b.each(function(g){var f=new Element("div",{"class":"plinth"});var a=new Element("div",{"class":"cL"});var h=new Element("div",{"class":"cR"});g.removeClass("plinth");g.addClass("cC");a.inject(f);f.wraps(g);h.inject(f)})}});var confirm=new Class({initialize:function(){this.setup()},setup:function(){var a=$$("a[rel=external]");var b="You are now leaving the Bank of America website, which is hosted by MBNA Europe Bank Limited.<br /><br />By clicking Continue, you will be taken to a website that is not affiliated with MBNA Europe Bank and may offer a different privacy policy and level of security.  MBNA Europe Bank is not responsible for and does not endorse, guarantee or monitor content, availability, viewpoints, products or services that are offered or expressed on other websites.<br /><br />You can click the Close button now to return.<br /><br />";a.each(function(c){c.appendText(" ");if(window.env=="STAGING"){slnk='/bac_co_uk/lib-ui/img/pages/new-window.gif'}else{slnk='/lib-ui/img/pages/new-window.gif'}c.adopt(new Element('img',{'src':slnk,'alt':'opens in a new window'}));c.addEvent("click",function(d){Alert.confirm(b,{textBoxBtnOk:"Continue",textBoxBtnCancel:"Close",onComplete:function(e){if(e){window.open(c.get("href"))}}});return false})})}});var alertBox=new Class({Implements:[Options,Chain],getOptions:function(){return{name:"alertBox",zIndex:65555,onReturn:false,onReturnFunction:$empty,BoxStyles:{width:500},OverlayStyles:{"background-color":"#000",opacity:0.7},showDuration:200,showEffect:Fx.Transitions.linear,closeDuration:100,closeEffect:Fx.Transitions.linear,moveDuration:500,moveEffect:Fx.Transitions.Back.easeOut,onShowStart:$empty,onShowComplete:$empty,onCloseStart:$empty,onCloseComplete:function(a){this.options.onReturnFunction(this.options.onReturn)}.bind(this)}},initialize:function(b){this.i=0;this.setOptions(this.getOptions(),b);this.Overlay=new Element("div",{id:"BoxOverlay",styles:{display:"none",position:"fixed",top:"0",left:"0",opacity:0,"z-index":this.options.zIndex,"background-color":this.options.OverlayStyles["background-color"],height:window.getScrollHeight()+"px",width:window.getScrollWidth()+"px"}});this.Content=new Element("div",{id:this.options.name+"-BoxWrapper",tabindex:0,role:"alert"});this.Wrapper=new Element("div",{id:this.options.name+"-BoxContent"}).adopt(this.Content);this.InBox=new Element("div",{id:this.options.name+"-InBox"}).adopt(this.Wrapper);this.Box=new Element("div",{id:this.options.name+"-Box",styles:{display:"none","z-index":this.options.zIndex+2,position:"absolute",top:"0",left:"0",width:this.options.BoxStyles.width+"px"}}).adopt(this.InBox);this.Overlay.injectInside(document.body);this.Box.injectInside(document.body);this.preloadImages();window.addEvent("resize",function(){if(this.options.display==1){this.Overlay.setStyles({height:window.getScrollHeight()+"px",width:window.getScrollWidth()+"px"});this.replaceBox()}}.bind(this));this.Box.addEvent("keydown",function(a){if(a.key=="esc"){this.options.onReturn=false;this.display(0)}}.bind(this));window.addEvent("scroll",this.replaceBox.bind(this))},preloadImages:function(){var a=new Array(2);a[0]=new Image();a[1]=new Image();a[2]=new Image();a[0].src=this.Box.getStyle("background-image").replace(new RegExp("url('?([^']*)'?)","gi"),"$1");a[1].src=this.InBox.getStyle("background-image").replace(new RegExp("url('?([^']*)'?)","gi"),"$1");a[2].src=this.Wrapper.getStyle("background-image").replace(new RegExp("url('?([^']*)'?)","gi"),"$1")},togFlashObjects:function(b){var c=new Array("embed","iframe","object");for(y=0;y<c.length;y++){var a=document.getElementsByTagName(c[y]);for(i=0;i<a.length;i++){a[i].style.visibility=b}}},display:function(a){if(this.Transition){this.Transition.cancel()}if(this.options.display==0&&a!=0||a==1){if(Browser.Engine.trident4){$$("select","object","embed").each(function(b){b.style.visibility="hidden"})}this.togFlashObjects("hidden");this.Overlay.setStyle("display","block");this.options.display=1;this.fireEvent("onShowStart",[this.Overlay]);this.Transition=new Fx.Tween(this.Overlay,{property:"opacity",duration:this.options.showDuration,transition:this.options.showEffect,onComplete:function(){sizes=window.getSize();scrollito=window.getScroll();this.Box.setStyles({display:"block",left:(scrollito.x+(sizes.x-this.options.BoxStyles.width)/2).toInt()});this.replaceBox();this.fireEvent("onShowComplete",[this.Overlay])}.bind(this)}).start(this.options.OverlayStyles.opacity)}else{if(Browser.Engine.trident4){$$("select","object","embed").each(function(b){b.style.visibility="visible"})}this.togFlashObjects("visible");this.queue.delay(500,this);this.Box.setStyles({display:"none",top:0});this.Content.empty();this.options.display=0;this.fireEvent("onCloseStart",[this.Overlay]);if(this.i==1){this.Transition=new Fx.Tween(this.Overlay,{property:"opacity",duration:this.options.closeDuration,transition:this.options.closeEffect,onComplete:function(){this.fireEvent("onCloseComplete",[this.Overlay])}.bind(this)}).start(0)}}},replaceBox:function(){if(this.options.display==1){sizes=window.getSize();scrollito=window.getScroll();if(this.MoveBox){this.MoveBox.cancel()}this.MoveBox=new Fx.Morph(this.Box,{duration:this.options.moveDuration,transition:this.options.moveEffect}).start({left:(scrollito.x+(sizes.x-this.options.BoxStyles.width)/2).toInt(),top:(scrollito.y+(sizes.y-this.Box.offsetHeight)/2).toInt()});this.focusin.delay(this.options.moveDuration,this)}},focusin:function(){$(this.options.name+"-BoxWrapper").focus()},queue:function(){this.i--;this.callChain()},messageBox:function(c,d,a,b){this.chain(function(){a=$extend({textBoxBtnOk:"OK",textBoxBtnCancel:"Cancelar",textBoxInputPrompt:null,password:false,onComplete:$empty},a||{});this.options.onReturnFunction=a.onComplete;this.WrapperBotones=new Element("div",{id:this.options.name+"-Buttons"});if(c=="alert"||c=="info"||c=="error"){this.AlertBtnOk=new Element("input",{id:"BoxAlertBtnOk",type:"submit",value:a.textBoxBtnOk,styles:{width:"70px"}});this.AlertBtnOk.addEvent("click",function(){this.options.onReturn=true;this.display(0)}.bind(this));if(c=="alert"){this.clase="BoxAlert"}else{if(c=="error"){this.clase="BoxError"}else{if(c=="info"){this.clase="BoxInfo"}}}this.Content.setProperty("class",this.clase).set("html",d);this.AlertBtnOk.injectInside(this.WrapperBotones);this.WrapperBotones.injectInside(this.Content);this.display(1)}else{if(c=="confirm"){this.ConfirmBtnOk=new Element("input",{id:"BoxConfirmBtnOk",type:"submit",value:a.textBoxBtnOk,styles:{width:"70px"}});this.ConfirmBtnCancel=new Element("input",{id:"BoxConfirmBtnCancel",type:"submit",value:a.textBoxBtnCancel,styles:{width:"70px"}});this.ConfirmBtnOk.addEvent("click",function(){this.options.onReturn=true;this.display(0)}.bind(this));this.ConfirmBtnCancel.addEvent("click",function(){this.options.onReturn=false;this.display(0)}.bind(this));this.Content.setProperty("class","BoxConfirm").set("html",d);this.ConfirmBtnOk.injectInside(this.WrapperBotones);this.ConfirmBtnCancel.injectInside(this.WrapperBotones);this.WrapperBotones.injectInside(this.Content);this.display(1)}else{if(c=="prompt"){this.PromptBtnOk=new Element("input",{id:"BoxPromptBtnOk",type:"submit",value:a.textBoxBtnOk,styles:{width:"70px"}});this.PromptBtnCancel=new Element("input",{id:"BoxPromptBtnCancel",type:"submit",value:a.textBoxBtnCancel,styles:{width:"70px"}});c=a.password?"password":"text";this.PromptInput=new Element("input",{id:"BoxPromptInput",type:c,value:b,styles:{width:"250px"}});this.PromptBtnOk.addEvent("click",function(){this.options.onReturn=this.PromptInput.value;this.display(0)}.bind(this));this.PromptBtnCancel.addEvent("click",function(){this.options.onReturn=false;this.display(0)}.bind(this));this.Content.setProperty("class","BoxPrompt").set("html",d+"<br />");this.PromptInput.injectInside(this.Content);new Element("br").injectInside(this.Content);this.PromptBtnOk.injectInside(this.WrapperBotones);this.PromptBtnCancel.injectInside(this.WrapperBotones);this.WrapperBotones.injectInside(this.Content);this.display(1)}else{this.options.onReturn=false;this.display(0)}}}});this.i++;if(this.i==1){this.callChain()}},alert:function(a,b){this.messageBox("alert",a,b)},info:function(a,b){this.messageBox("info",a,b)},error:function(a,b){this.messageBox("error",a,b)},confirm:function(a,b){this.messageBox("confirm",a,b)},prompt:function(b,c,a){this.messageBox("prompt",b,a,c)}});alertBox.implement(new Events,new Options);window.addEvent("domready",function(){Alert=new alertBox()});var accordion=new Class({Implements:[Options,Events,Chain],options:{togglers:[],elements:[],openAll:false,firstElementsOpen:[-1],fixedHeight:false,fixedWidth:false,height:true,opacity:true,width:false,onActive:function(c,d){c.addClass("accordion-toggle-active");this.setShowHideLink()},onBackground:function(c,d){c.removeClass("accordion-toggle-active");this.setShowHideLink()}},togglers:[],elements:[],element:[],showHideLink:[],initialize:function(d){var e=Array.link(arguments,{options:Object.type,elements:Array.type});this.setOptions(e.options);this.element=$(d);var f=$getUrlKey("#");elements=$$(this.options.elements);this.showHideLink=this.addShowHideLink();$$(this.options.togglers).each(function(a,b){this.addSection(a,elements[b],b);if(f){if(a.get("id")==f){this.options.firstElementsOpen[0]=b}}},this);if(this.togglers.length){if(this.options.openAll){this.showAll()}else{this.toggleSections(this.options.firstElementsOpen,false,true)}}this.openSections=this.showSections.bind(this);this.closeSections=this.hideSections.bind(this);this.element.addClass("accordion-active")},addSection:function(l,m){l=$(l);m=$(m);items=m.getChildren();wrapper=new Element("div",{"class":"accordion-item-wrapper"});m.adopt(wrapper);items.each(function(a){wrapper.adopt(a)});var j=this.togglers.contains(l);var g=this.togglers.length;this.togglers.include(l);this.elements.include(m);var h=this.togglers.indexOf(l);l.addEvent("click",this.toggleSection.bind(this,h));var k;if(this.options.height&&this.options.width){k="both"}else{k=(this.options.height)?"vertical":"horizontal"}m.store("reveal",new Fx.Reveal(m,{transitionOpacity:this.options.opacity,mode:k,heightOverride:this.options.fixedHeight,widthOverride:this.options.fixedWidth}));return this},onComplete:function(d,c){this.fireEvent(this.elements[d].isDisplayed()?"onActive":"onBackground",[this.togglers[d],this.elements[d]]);this.callChain();return this},showSection:function(d,c){this.toggleSection(d,c,true)},hideSection:function(d,c){this.toggleSection(d,c,false)},toggleSection:function(h,l,g,k){var j=g?"reveal":$defined(g)?"dissolve":"toggle";k=$pick(k,true);var m=this.elements[h];if($pick(l,true)){m.retrieve("reveal")[j]().chain(this.onComplete.bind(this,[h,k]))}else{if(j=="toggle"){m.togglek()}else{m[j=="reveal"?"show":"hide"]()}this.onComplete(h,k)}return this},toggleAll:function(e,f){var g=f?"reveal":$chk(f)?"disolve":"toggle";var h=this.elements.getLast();this.elements.each(function(a,b){this.toggleSection(b,e,f,a==h)},this);return this},toggleSections:function(f,d,e){last=f.getLast();this.elements.each(function(a,b){this.toggleSection(b,d,f.contains(b)?e:!e,b==last)},this);return this},showSections:function(c,d){c.each(function(a){this.showSection(a,d)},this)},hideSections:function(c,d){c.each(function(a){this.hideSection(a,d)},this)},showAll:function(b){return this.toggleAll(false,true)},hideAll:function(b){return this.toggleAll(false,false)},showHideAll:function(b){rel=b.get("rel");if(rel=="show"){this.showAll()}else{this.hideAll()}return false},addShowHideLink:function(){element=this.element;link=new Element("a",{"class":"accordion-show-hide",html:"[+] Show All",rel:"show",href:"#"},this);element.adopt(link);link.addEvent("click",this.showHideAll.bind(this,link));return link},setShowHideLink:function(){togglers=this.togglers;active=false;togglers.each(function(b){if(b.hasClass("accordion-toggle-active")){active=true}},this);link=this.showHideLink;if(active){link.set("html","[-] Hide All");link.set("rel","hide")}else{link.set("html","[+] Show All");link.set("rel","show")}}});var NewsFeedList=new Class({Implements:[Options,Events],options:{xmlPath:'help-centre/news-room/',Dataxml:'feed.xml',placeholder:'newslinks',links:3},initialize:function(id,options){this.setOptions(options);this.list=new Element('ul',{'class':'links'});var myRequest=new Request({url:this.options.xmlPath+this.options.Dataxml,onSuccess:function(txt,xml){this.data=xml2json.parser(txt).newslist.newsitem;n=0;for(var i=0;i<this.data.length;i++){d=this.options.xmlPath+this.data[i].url;if(this.data[i].title!="null"){this.list.adopt(new Element('li').adopt(new Element('a',{'href':d,'text':this.data[i].title,'title':this.data[i].title})))}n++;if(n==this.options.links){break}}$(this.options.placeholder).empty();$(this.options.placeholder).adopt(new Element('p',{'text':'Recent topics include:'}),this.list)}.bind(this),onFailure:function(xml){}.bind(this)}).send()}});xml2json={parser:function(xmlcode,ignoretags,debug){if(!ignoretags){ignoretags=""};xmlcode=xmlcode.replace(/\s*\/>/g,'/>');xmlcode=xmlcode.replace(/<\?[^>]*>/g,"").replace(/<\![^>]*>/g,"");if(!ignoretags.sort){ignoretags=ignoretags.split(",")};var x=this.no_fast_endings(xmlcode);x=this.attris_to_tags(x);x=escape(x);x=x.split("%3C").join("<").split("%3E").join(">").split("%3D").join("=").split("%22").join("\"");for(var i=0;i<ignoretags.length;i++){x=x.replace(new RegExp("<"+ignoretags[i]+">","g"),"*$**"+ignoretags[i]+"**$*");x=x.replace(new RegExp("</"+ignoretags[i]+">","g"),"*$***"+ignoretags[i]+"**$*")};x='<JSONTAGWRAPPER>'+x+'</JSONTAGWRAPPER>';this.xmlobject={};var y=this.xml_to_object(x).jsontagwrapper;if(debug){y=this.show_json_structure(y,debug)};return y},xml_to_object:function(xmlcode){var x=xmlcode.replace(/<\//g,"§");x=x.split("<");var y=[];var level=0;var opentags=[];for(var i=1;i<x.length;i++){var tagname=x[i].split(">")[0];opentags.push(tagname);level++;y.push(level+"<"+x[i].split("§")[0]);while(x[i].indexOf("§"+opentags[opentags.length-1]+">")>=0){level--;opentags.pop()}};var oldniva=-1;var objname="this.xmlobject";for(var i=0;i<y.length;i++){var preeval="";var niva=y[i].split("<")[0];var tagnamn=y[i].split("<")[1].split(">")[0];tagnamn=tagnamn.toLowerCase();var rest=y[i].split(">")[1];if(niva<=oldniva){var tabort=oldniva-niva+1;for(var j=0;j<tabort;j++){objname=objname.substring(0,objname.lastIndexOf("."))}};objname+="."+tagnamn;var pobject=objname.substring(0,objname.lastIndexOf("."));if(eval("typeof "+pobject)!="object"){preeval+=pobject+"={value:"+pobject+"};\n"};var objlast=objname.substring(objname.lastIndexOf(".")+1);var already=false;for(k in eval(pobject)){if(k==objlast){already=true}};var onlywhites=true;for(var s=0;s<rest.length;s+=3){if(rest.charAt(s)!="%"){onlywhites=false}};if(rest!=""&&!onlywhites){if(rest/1!=rest){rest="'"+rest.replace(/\'/g,"\\'")+"'";rest=rest.replace(/\*\$\*\*\*/g,"</");rest=rest.replace(/\*\$\*\*/g,"<");rest=rest.replace(/\*\*\$\*/g,">")}}else{rest="{}"};if(rest.charAt(0)=="'"){rest='unescape('+rest+')'};if(already&&!eval(objname+".sort")){preeval+=objname+"=["+objname+"];\n"};var before="=";after="";if(already){before=".push(";after=")"};var toeval=preeval+objname+before+rest+after;eval(toeval);if(eval(objname+".sort")){objname+="["+eval(objname+".length-1")+"]"};oldniva=niva};return this.xmlobject},show_json_structure:function(obj,debug,l){var x='';if(obj.sort){x+="[\n"}else{x+="{\n"};for(var i in obj){if(!obj.sort){x+=i+":"};if(typeof obj[i]=="object"){x+=this.show_json_structure(obj[i],false,1)}else{if(typeof obj[i]=="function"){var v=obj[i]+"";x+=v}else if(typeof obj[i]!="string"){x+=obj[i]+",\n"}else{x+="'"+obj[i].replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")+"',\n"}}};if(obj.sort){x+="],\n"}else{x+="},\n"};if(!l){x=x.substring(0,x.lastIndexOf(","));x=x.replace(new RegExp(",\n}","g"),"\n}");x=x.replace(new RegExp(",\n]","g"),"\n]");var y=x.split("\n");x="";var lvl=0;for(var i=0;i<y.length;i++){if(y[i].indexOf("}")>=0||y[i].indexOf("]")>=0){lvl--};tabs="";for(var j=0;j<lvl;j++){tabs+="\t"};x+=tabs+y[i]+"\n";if(y[i].indexOf("{")>=0||y[i].indexOf("[")>=0){lvl++}};if(debug=="html"){x=x.replace(/</g,"&lt;").replace(/>/g,"&gt;");x=x.replace(/\n/g,"<BR>").replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;")};if(debug=="compact"){x=x.replace(/\n/g,"").replace(/\t/g,"")}};return x},no_fast_endings:function(x){x=x.split("/>");for(var i=1;i<x.length;i++){var t=x[i-1].substring(x[i-1].lastIndexOf("<")+1).split(" ")[0];x[i]="></"+t+">"+x[i]};x=x.join("");return x},attris_to_tags:function(x){var d=' ="\''.split("");x=x.split(">");for(var i=0;i<x.length;i++){var temp=x[i].split("<");for(var r=0;r<4;r++){temp[0]=temp[0].replace(new RegExp(d[r],"g"),"_jsonconvtemp"+r+"_")};if(temp[1]){temp[1]=temp[1].replace(/'/g,'"');temp[1]=temp[1].split('"');for(var j=1;j<temp[1].length;j+=2){for(var r=0;r<4;r++){temp[1][j]=temp[1][j].replace(new RegExp(d[r],"g"),"_jsonconvtemp"+r+"_")}};temp[1]=temp[1].join('"')};x[i]=temp.join("<")};x=x.join(">");x=x.replace(/ ([^=]*)=([^ |>]*)/g,"><$1>$2</$1");x=x.replace(/>"/g,">").replace(/"</g,"<");for(var r=0;r<4;r++){x=x.replace(new RegExp("_jsonconvtemp"+r+"_","g"),d[r])};return x}};if(!Array.prototype.push){Array.prototype.push=function(x){this[this.length]=x;return true}};if(!Array.prototype.pop){Array.prototype.pop=function(){var response=this[this.length-1];this.length--;return response}};