/* Transformed JS from: /jslib/loader.js */
(function(a){function b(c,d){this.container=c;this.url=d;this.head=document.getElementsByTagName("head")[0]}b.prototype={_xhr:function(){if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest()}else{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}return xmlhttp},load:function(c){var d=this._xhr();d.onreadystatechange=function(f,e){return function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){var h=document.createElement("div"),j=document.createDocumentFragment(xmlhttp.responseText),i=null,g=[];h.style.display="none";document.body.appendChild(h);h.innerHTML=xmlhttp.responseText;while(h.firstChild){i=h.firstChild;if(i.tagName=="SCRIPT"){g.push(h.removeChild(i))}else{j.appendChild(i)}}if(e){f.container.insertBefore(j,f.container.firstChild)}if(g.length>0){f._appendscript(f.head,0,g)}document.body.removeChild(h)}}}(this,c);d.open("GET",this.url,true);d.send("");d=null},_appendscript:function(f,e,c){function h(l,k,j,i){if(j<i.length){return function(){l._appendscript(k,j,i)}}}var d=c[e],g=document.createElement("script");g.type="text/javascript";if(d.src){g.src=d.src}else{g.text=d.text}g.onload=h(this,f,e+1,c);g.onreadystatechange=function(m,l,k,j){var i=h(m,l,k,j);return function(){if(this.readyState=="complete"){if(i!==undefined){i()}}}}(this,f,e+1,c);f.appendChild(g)}};a.loader=b})(jOanda);
