function loadPage(_1){
this.loadlib(this.base,this.pagedir+_1+".v"+this.sver+".js");
}
function getXmlHttp(){
try{
return new XMLHttpRequest();
}
catch(e){
}
try{
return new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e){
}
try{
return new ActiveXObject("Msxml3.XMLHTTP");
}
catch(e){
}
try{
return new new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
return false;
}
}
function loadlib(_2,_3,_4){
if(this.bdebug){
document.writeln("<script type=\"text/javascript\" src=\""+_2+_3+"\"></script>");
return;
}
var _5=_2;
var _6=0;
while(true){
bloaded=false;
try{
var _7=_5+_3;
var _8=this.getXmlHttp();
_8.open("GET",_7,false);
_8.send(null);
bloaded=true;
}
catch(e){
}
if(bloaded&&_8.status==200){
var _9=_8.responseText;
if(window.execScript){
window.execScript(_9);
}else{
window.setTimeout(_9,0);
}
return true;
}
if(_4){
_5=_4;
}
if(++_6>1){
return false;
}
}
}
function load(){
this.base="";
this.sver="$Name: SPEEDYNZ20100830-1 $".replace(/[^\d]/g,"");
if(this.sver.length==0){
this.sver=123;
}
this.libdir="jslib/";
this.scriptdir="js/";
this.pagedir="js/page/";
this.classdir="js/classes/";
this.datadir="js/data/";
this.dymamiccontent="/jserv/";
this.libs="prototype,effects,controls,calendar".split(",");
this.mobilelibs="prototype".split(",");
this.scripts="jsonpayload,cookies,common,dateselect,currency,md5,session,externalreferrer,profile,consultant,specials".split(",");
this.mobilescripts="jsonpayload,cookies,common,dateselect,currency,md5,session,profile,consultant".split(",");
this.datascripts="country".split(",");
this.dynamicdatascripts="city".split(",");
this.classes="paxitem,product".split(",");
this.bdebug=document.location.href.indexOf("DEBUG")!=-1;
this.alllibs="all";
this.allloaded=false;
this.page=null;
this.bpageonly=false;
this.currentscripts=document.getElementsByTagName("script");
for(var i=0;i<this.currentscripts.length;i++){
var s=this.currentscripts[i];
if(!s){
continue;
}
var m=s.src.match(/(.*\/?)js\/loader\.js(\?.*)?$/);
if(!m){
continue;
}
this.base=m[1];
spagebase=this.base;
var _d=s.src.match(/\?.*load=([a-z,\-]*)/);
if(_d){
this.page=_d[1];
}
var _e=s.src.match(/\?.*mobile=([a-z,]*)/);
this.ismobile=false;
if(_e){
this.ismobile=true;
}
}
var _f=this.libs;
if(this.ismobile){
_f=this.mobilelibs;
}
var _10=this.scripts;
if(this.ismobile){
_10=this.mobilescripts;
}
for(var i=0;i<_f.length;i++){
this.loadlib(this.base,this.libdir+_f[i]+".v"+this.sver+".js");
}
this.allloaded=this.loadlib(this.base,this.scriptdir+this.alllibs+".v"+this.sver+".js");
if(!this.allloaded){
for(var i=0;i<_10.length;i++){
this.loadlib(this.base,this.scriptdir+_10[i]+".v"+this.sver+".js");
}
for(var i=0;i<this.classes.length;i++){
this.loadlib(this.base,this.classdir+this.classes[i]+".v"+this.sver+".js");
}
for(var i=0;i<this.datascripts.length;i++){
this.loadlib(this.base,this.datadir+this.datascripts[i]+".v"+this.sver+".js");
}
}
for(var i=0;i<this.dynamicdatascripts.length;i++){
this.loadlib(this.dymamiccontent,this.datadir+this.dynamicdatascripts[i]+".v"+this.sver+".js",this.base);
}
if(!this.page){
var _11=document.location.pathname.split("?")[0];
if(_11.length<2){
this.page="index.js";
}else{
if(_11.indexOf(".htm")!=-1){
st=_11.split("/");
this.page=st[st.length-1];
this.page=this.page.toLowerCase().replace(".html","");
}else{
st=_11.split("/");
page=st[st.length-1];
if(this.page==""&&st.length>2){
this.page=st[st.length-2];
}
}
}
}else{
if(this.page=="none"){
return;
}
}
if(this.page!=""){
this.loadPage(this.page);
}
}
function Loader(){
this.load=load;
this.loadlib=loadlib;
this.getXmlHttp=getXmlHttp;
this.loadPage=loadPage;
this.load();
}
var loader=new Loader();

