<!--

var pUZRs=0
var bNwOg=1
var DeBUs=2
var dcnRe=0;
var lUYdW=1;
var iDxQk=2;
var OZmLl=0
var quaLC=1
var VNvQW=false 
function MD5(string){
function RotateLeft(lValue,iShiftBits){
return(lValue<<iShiftBits)|(lValue>>>(32-iShiftBits));
}
function AddUnsigned(lX,lY){
var lX4,lY4,lX8,lY8,lResult;
lX8=(lX&0x80000000);
lY8=(lY&0x80000000);
lX4=(lX&0x40000000);
lY4=(lY&0x40000000);
lResult=(lX&0x3FFFFFFF)+(lY&0x3FFFFFFF);
if(lX4&lY4){
return(lResult^0x80000000^lX8^lY8);
}
if(lX4|lY4){
if(lResult&0x40000000){
return(lResult^0xC0000000^lX8^lY8);
}else{
return(lResult^0x40000000^lX8^lY8);
}
}else{
return(lResult^lX8^lY8);
}
}
function F(x,y,z){return(x&y)|((~x)&z);}
function G(x,y,z){return(x&z)|(y&(~z));}
function H(x,y,z){return(x^y^z);}
function I(x,y,z){return(y^(x|(~z)));}
function FF(a,b,c,d,x,s,ac){
a=AddUnsigned(a,AddUnsigned(AddUnsigned(F(b,c,d),x),ac));
return AddUnsigned(RotateLeft(a,s),b);
};
function GG(a,b,c,d,x,s,ac){
a=AddUnsigned(a,AddUnsigned(AddUnsigned(G(b,c,d),x),ac));
return AddUnsigned(RotateLeft(a,s),b);
};
function HH(a,b,c,d,x,s,ac){
a=AddUnsigned(a,AddUnsigned(AddUnsigned(H(b,c,d),x),ac));
return AddUnsigned(RotateLeft(a,s),b);
};
function II(a,b,c,d,x,s,ac){
a=AddUnsigned(a,AddUnsigned(AddUnsigned(I(b,c,d),x),ac));
return AddUnsigned(RotateLeft(a,s),b);
};
function ConvertToWordArray(string){
var lWordCount;
var lMessageLength=string.length;
var lNumberOfWords_temp1=lMessageLength+8;
var lNumberOfWords_temp2=(lNumberOfWords_temp1-(lNumberOfWords_temp1%64))/64;
var lNumberOfWords=(lNumberOfWords_temp2+1)*16;
var lWordArray=Array(lNumberOfWords-1);
var lBytePosition=0;
var lByteCount=0;
while(lByteCount<lMessageLength){
lWordCount=(lByteCount-(lByteCount%4))/4;
lBytePosition=(lByteCount%4)*8;
lWordArray[lWordCount]=(lWordArray[lWordCount]|(string.charCodeAt(lByteCount)<<lBytePosition));
lByteCount++;
}
lWordCount=(lByteCount-(lByteCount%4))/4;
lBytePosition=(lByteCount%4)*8;
lWordArray[lWordCount]=lWordArray[lWordCount]|(0x80<<lBytePosition);
lWordArray[lNumberOfWords-2]=lMessageLength<<3;
lWordArray[lNumberOfWords-1]=lMessageLength>>>29;
return lWordArray;
};
function WordToHex(lValue){
var WordToHexValue="",WordToHexValue_temp="",lByte,lCount;
for(lCount=0;lCount<=3;lCount++){
lByte=(lValue>>>(lCount*8))&255;
WordToHexValue_temp="0"+lByte.toString(16);
WordToHexValue=WordToHexValue+WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2);
}
return WordToHexValue;
};
function Utf8Encode(string){
string=string.replace(/\r\n/g,"\n");
var utftext="";
for(var n=0;n<string.length;n++){
var c=string.charCodeAt(n);
if(c<128){
utftext+=String.fromCharCode(c);
}
else if((c>127)&&(c<2048)){
utftext+=String.fromCharCode((c>>6)|192);
utftext+=String.fromCharCode((c&63)|128);
}
else{
utftext+=String.fromCharCode((c>>12)|224);
utftext+=String.fromCharCode(((c>>6)&63)|128);
utftext+=String.fromCharCode((c&63)|128);
}
}
return utftext;
};
var x=Array();
var k,AA,BB,CC,DD,a,b,c,d;
var S11=7,S12=12,S13=17,S14=22;
var S21=5,S22=9,S23=14,S24=20;
var S31=4,S32=11,S33=16,S34=23;
var S41=6,S42=10,S43=15,S44=21;
string=Utf8Encode(string);
x=ConvertToWordArray(string);
a=0x67452301;b=0xEFCDAB89;c=0x98BADCFE;d=0x10325476;
for(k=0;k<x.length;k+=16){
AA=a;BB=b;CC=c;DD=d;
a=FF(a,b,c,d,x[k+0],S11,0xD76AA478);
d=FF(d,a,b,c,x[k+1],S12,0xE8C7B756);
c=FF(c,d,a,b,x[k+2],S13,0x242070DB);
b=FF(b,c,d,a,x[k+3],S14,0xC1BDCEEE);
a=FF(a,b,c,d,x[k+4],S11,0xF57C0FAF);
d=FF(d,a,b,c,x[k+5],S12,0x4787C62A);
c=FF(c,d,a,b,x[k+6],S13,0xA8304613);
b=FF(b,c,d,a,x[k+7],S14,0xFD469501);
a=FF(a,b,c,d,x[k+8],S11,0x698098D8);
d=FF(d,a,b,c,x[k+9],S12,0x8B44F7AF);
c=FF(c,d,a,b,x[k+10],S13,0xFFFF5BB1);
b=FF(b,c,d,a,x[k+11],S14,0x895CD7BE);
a=FF(a,b,c,d,x[k+12],S11,0x6B901122);
d=FF(d,a,b,c,x[k+13],S12,0xFD987193);
c=FF(c,d,a,b,x[k+14],S13,0xA679438E);
b=FF(b,c,d,a,x[k+15],S14,0x49B40821);
a=GG(a,b,c,d,x[k+1],S21,0xF61E2562);
d=GG(d,a,b,c,x[k+6],S22,0xC040B340);
c=GG(c,d,a,b,x[k+11],S23,0x265E5A51);
b=GG(b,c,d,a,x[k+0],S24,0xE9B6C7AA);
a=GG(a,b,c,d,x[k+5],S21,0xD62F105D);
d=GG(d,a,b,c,x[k+10],S22,0x2441453);
c=GG(c,d,a,b,x[k+15],S23,0xD8A1E681);
b=GG(b,c,d,a,x[k+4],S24,0xE7D3FBC8);
a=GG(a,b,c,d,x[k+9],S21,0x21E1CDE6);
d=GG(d,a,b,c,x[k+14],S22,0xC33707D6);
c=GG(c,d,a,b,x[k+3],S23,0xF4D50D87);
b=GG(b,c,d,a,x[k+8],S24,0x455A14ED);
a=GG(a,b,c,d,x[k+13],S21,0xA9E3E905);
d=GG(d,a,b,c,x[k+2],S22,0xFCEFA3F8);
c=GG(c,d,a,b,x[k+7],S23,0x676F02D9);
b=GG(b,c,d,a,x[k+12],S24,0x8D2A4C8A);
a=HH(a,b,c,d,x[k+5],S31,0xFFFA3942);
d=HH(d,a,b,c,x[k+8],S32,0x8771F681);
c=HH(c,d,a,b,x[k+11],S33,0x6D9D6122);
b=HH(b,c,d,a,x[k+14],S34,0xFDE5380C);
a=HH(a,b,c,d,x[k+1],S31,0xA4BEEA44);
d=HH(d,a,b,c,x[k+4],S32,0x4BDECFA9);
c=HH(c,d,a,b,x[k+7],S33,0xF6BB4B60);
b=HH(b,c,d,a,x[k+10],S34,0xBEBFBC70);
a=HH(a,b,c,d,x[k+13],S31,0x289B7EC6);
d=HH(d,a,b,c,x[k+0],S32,0xEAA127FA);
c=HH(c,d,a,b,x[k+3],S33,0xD4EF3085);
b=HH(b,c,d,a,x[k+6],S34,0x4881D05);
a=HH(a,b,c,d,x[k+9],S31,0xD9D4D039);
d=HH(d,a,b,c,x[k+12],S32,0xE6DB99E5);
c=HH(c,d,a,b,x[k+15],S33,0x1FA27CF8);
b=HH(b,c,d,a,x[k+2],S34,0xC4AC5665);
a=II(a,b,c,d,x[k+0],S41,0xF4292244);
d=II(d,a,b,c,x[k+7],S42,0x432AFF97);
c=II(c,d,a,b,x[k+14],S43,0xAB9423A7);
b=II(b,c,d,a,x[k+5],S44,0xFC93A039);
a=II(a,b,c,d,x[k+12],S41,0x655B59C3);
d=II(d,a,b,c,x[k+3],S42,0x8F0CCC92);
c=II(c,d,a,b,x[k+10],S43,0xFFEFF47D);
b=II(b,c,d,a,x[k+1],S44,0x85845DD1);
a=II(a,b,c,d,x[k+8],S41,0x6FA87E4F);
d=II(d,a,b,c,x[k+15],S42,0xFE2CE6E0);
c=II(c,d,a,b,x[k+6],S43,0xA3014314);
b=II(b,c,d,a,x[k+13],S44,0x4E0811A1);
a=II(a,b,c,d,x[k+4],S41,0xF7537E82);
d=II(d,a,b,c,x[k+11],S42,0xBD3AF235);
c=II(c,d,a,b,x[k+2],S43,0x2AD7D2BB);
b=II(b,c,d,a,x[k+9],S44,0xEB86D391);
a=AddUnsigned(a,AA);
b=AddUnsigned(b,BB);
c=AddUnsigned(c,CC);
d=AddUnsigned(d,DD);
}
var temp=WordToHex(a)+WordToHex(b)+WordToHex(c)+WordToHex(d);
return temp.toLowerCase();
}
function WA_marketRemoveItem(FVvIo)
{
bKCQt().ExfYA(FVvIo)
var SYmlS=WA_Dialog.getCurrent();
SYmlS.tsYaZ()
}
function bKCQt()
{
if(document.wa_global_settings_market==undefined)document.wa_global_settings_market=new Ttdbc()
return document.wa_global_settings_market;
}
function dSaNG()
{
this.NErpP=function()
{
return this.BFPsP+"-"+this.gUmFM_index
}
this.GkMRB=function(dvdMH,QHLMb)
{
this.gUmFM=dvdMH.obj.market.info.folder.substring(13);
this.gUmFM_index=dvdMH.obj.index;
this.gUmFM_modif=dvdMH.obj.market.info.critical_id_modif
this.BFPsP=dvdMH.obj.market.id 

this.iZgvO=1;
this.ZgQwB=dvdMH.title;
this.jUGkA=dvdMH.price;
this.oNShs=dvdMH.weight;
this.QXsQC=dvdMH.code_product;
}
this.ZwUlC=function(dvdMH,QHLMb)
{

this.ZgQwB=dvdMH.title;
this.jUGkA=dvdMH.price;
this.oNShs=dvdMH.weight;
this.QXsQC=dvdMH.code_product;
}
this.GxJJI=function()
{
var s="";
s+=this.NErpP();
if(this.m_opt_vals)
for(var i=0;i<this.m_opt_vals.length;i++)
{
var ItsTu=this.m_opt_vals[i]
if(ItsTu!=-1) s+="/"+ItsTu;
}
return s;
}
this.cLPvg=function()
{
var val="";
val+="j="+this.gUmFM+",";
val+="i="+this.gUmFM_index+",";
val+="m="+this.gUmFM_modif+",";
val+="q="+this.iZgvO+",";
if(this.m_opt_vals)
{
for(var i=0;i<this.m_opt_vals.length;i++)
{
val+="o"+i+"=";
var WfiDB=this.m_opt_vals[i]
if(WfiDB>-1)
val+=WfiDB
else
val+=""
val+=","
}
}
return val;
}
this.cBJtW=function(map,k)
{
var v=map[k];
if(v=="undefined") return "";
return v;
}
this.rwHFg=function(map)
{
this.gUmFM=this.cBJtW(map,"j");
if(this.gUmFM=="") return false;
this.gUmFM_index=this.cBJtW(map,"i");
this.gUmFM_modif=this.cBJtW(map,"m");
this.iZgvO=parseInt(map["q"]);
this.m_opt_vals=new Array();
for(var i=0;i<3;i++)
{
var NoCFB=parseInt(map["o"+i]);
if(isNaN(NoCFB))NoCFB=-1;
this.m_opt_vals.push(NoCFB)
}
return true;
}
this.sbWVq=function(s,sep_group,sep_val)
{
if(sep_group==null)sep_group=",";
if(sep_val==null)sep_val="=";
var m_array=new Array();
var tab=s.split(sep_group);
for(var i=0;i<tab.length;i++)
{
var tab3=tab[i].split(sep_val);
if(tab3.length==2)m_array[tab3[0]]=tab3[1];
}
return m_array;
}
this.gVlvB=function(iYgLA)
{
var DbNcZ=this.sbWVq(iYgLA)
return this.rwHFg(DbNcZ) 
}
this.JBCOB=function()
{
return dQGkS(this.dvdMH,this.m_opt_vals)
}
}
function CQQJN(rXMCU,xtEgJ)
{
var evbBR=rXMCU[0]
var rqYvE=rXMCU[1]
var GQVdc=rXMCU[2]
if(evbBR.length==0)
{
GQVdc.call(rqYvE)
return;
}
var js=evbBR.pop()
WA_loadScript(js.src,CQQJN,[evbBR,rqYvE,GQVdc]);
}
function WA_arrayContains(RmXuE,iYgLA)
{
for(var n=0;n<RmXuE.length;n++){if(RmXuE[n]==iYgLA)return true;}
return false;
}
function qjsJx(RmXuE)
{
var DbNcZ=new Array()
for(var n=0;n<RmXuE.length;n++)
{
var QYmsl=RmXuE[n]
if(QYmsl=="address") DbNcZ=DbNcZ.concat(["address_1","address_2","city","zip"])
else DbNcZ.push(QYmsl)
}
return DbNcZ;
}
function mwYjt()
{
this.uAlhN=function()
{
if(this.ClOgC.length==0)return CONST_WA_GLOBAL_SETTINGS.default_selected_country;
return this.ClOgC;
}
this.XOram=function()
{
this.srwUD()
}
this.sbWVq=function(s)
{
var KIDiF=new Array();
var tab=s.split(",");
for(var i=0;i<tab.length;i++)
{
var tab3=tab[i].split("=");
if(tab3.length==2)KIDiF[tab3[0]]=tab3[1];
}
return KIDiF;
}
this.ckHeU=function(HtNOf)
{
if(HtNOf==undefined) return ""
return(HtNOf==OZmLl)?"deliv-":"bill-"
}
this.AuSDU=function(Dkref,HtNOf,QiNcQ)
{
if(!QiNcQ)QiNcQ=""
var vOVAt=this.ckHeU(HtNOf)
if(Dkref=="country")
{
if(HtNOf==OZmLl) return this.ClOgC
if(HtNOf==quaLC) Dkref="countryCode"
}
if(Dkref=="state")
{
Dkref="stateCode"
}
var ItsTu=this.IwVlj[vOVAt+Dkref]
if(!ItsTu) return QiNcQ
ItsTu=ItsTu.replace(/\"/g,"'")
return ItsTu
}
this.NPVFl=function(ItsTu)
{
if(ItsTu==undefined)return ""
return ItsTu
}
this.KpxZv=function(key,val)
{
if((val==null)||(val==undefined)) val="";
WA_SetCookie("crbst-card-"+key,val)
}
this.RMaRd=function(key)
{
var rqYvE=WA_GetCookie("crbst-card-"+key)
if(rqYvE=="null")rqYvE="";
return ""+rqYvE
}
this.PkeJa=function()
{
this.IwVlj=new Array()
var iYgLA=this.RMaRd("order-infos")
var DbNcZ=this.sbWVq(iYgLA)
for(var k1 in DbNcZ)
{
var ItsTu=DbNcZ[k1]
if((k1.indexOf("deliv-")==0)||(k1.indexOf("bill-")==0))
this.IwVlj[k1]=unescape(ItsTu)
}
this.ClOgC=this.NPVFl(DbNcZ["countryCode"])
if(this.LVCVG.length==0)
{
this.LVCVG=this.NPVFl(DbNcZ["typePayment"])
}
this.mfIwd=(this.NPVFl(DbNcZ["differentBillingAddressChecked"])=="true")
this.inRZE=(this.NPVFl(DbNcZ["salesConditionChecked"])=="true")
}
this.srwUD=function()
{
var iYgLA=""
for(var k1 in this.IwVlj)
{
var ItsTu=this.IwVlj[k1]
iYgLA+=k1+"="+escape(ItsTu)+","
}
var ChAbU=""
ChAbU+="countryCode="+escape(this.ClOgC)+","
ChAbU+="typePayment="+escape(this.LVCVG)+","
ChAbU+="differentBillingAddressChecked="+(this.mfIwd)+","
ChAbU+="salesConditionChecked="+(this.inRZE)+","
iYgLA+=ChAbU 
this.KpxZv("order-infos",iYgLA)
}
this.bkiBA=function(atAtu)
{
if(trimString(atAtu.value).length==0)
{
atAtu.style.backgroundColor="#ff0000"
atAtu.focus()
return false;;
}
atAtu.style.backgroundColor=""
return true;
}
this.ABdhN=function(HtNOf)
{
var RpxGm=qjsJx(CONST_WA_GLOBAL_SETTINGS.list_form_fields)
var RoxGO=qjsJx(CONST_WA_GLOBAL_SETTINGS.list_mandatory_form_fields) 
var fkZca=this.IwVlj;
var vOVAt=this.ckHeU(HtNOf) 
var UBcvS=document.getElementById("wa-market-form")
for(var n=0;n<RpxGm.length;n++)
{
var Pnbff=RpxGm[n]
var cRwKe=UBcvS[Pnbff]
var ItsTu=trimString(cRwKe.value)
if(Pnbff!="address_2")
if(WA_arrayContains(RoxGO,Pnbff))
{
if(this.bkiBA(cRwKe)==false)return false;
}
fkZca[vOVAt+Pnbff]=ItsTu
}
var imEsj=document.getElementById("wa-select-state");
var HkAvl=document.getElementById("wa-market-state");
if(imEsj&&(HkAvl.style.display!="none"))
{
if(this.bkiBA(imEsj)==false)return false;
fkZca[vOVAt+"stateCode"]=imEsj.value
}
else
{
fkZca[vOVAt+"stateCode"]=""
}
if(HtNOf==quaLC)
{
var xrUIG=document.getElementById("wa-select-form-country");
if(xrUIG)
{
fkZca[vOVAt+"countryCode"]=xrUIG.value
}
}
this.srwUD()
return true;
}
this.RoxIF=""
this.ClOgC=""
this.LVCVG=""
this.mfIwd=false;
this.inRZE=false
this.PkeJa()
}
function Ttdbc()
{
this.OGsnq=new Array();
this.rqYvE_callback=false;
this.xRtfd=false;
this.PCZgm=false;
this.lnxDK=new mwYjt()
this.BgiNX=CONST_WA_GLOBAL_SETTINGS.use_native_paypal_cart;
this.JZNWF=function(rqYvE,GQVdc)
{
this.rqYvE_callback=rqYvE
this.xRtfd=GQVdc 
var svoih=this.RMaRd("data")
this.eVdmK(svoih) 
var evbBR=new Array()
var RmXuE=this.OGsnq;
for(var i=0;i<RmXuE.length;i++)
{
var aHOok=RmXuE[i];
var YtqIv=Translator.m_lang_for_filename
if(YtqIv.length>0)YtqIv="_"+YtqIv;
var nCBnV=aHOok.gUmFM;
var n=nCBnV.indexOf("_")
if(n>-1)nCBnV=nCBnV.substring(n+1)
aHOok.BFPsP="wa-id-"+nCBnV 
var vBgXw=wa_global_market.markets[aHOok.BFPsP]
if(this.PCZgm==false)
if(!vBgXw)
{
var lZiEt="crbst_market_"+aHOok.gUmFM+'/'
WA_declareMarket(aHOok.BFPsP,lZiEt,aHOok.gUmFM_modif) 
var CWUDv=lZiEt+'market-definition'+YtqIv+'.js?v='+aHOok.gUmFM_modif
evbBR.push({id:nCBnV,src:CWUDv})
}
}
CQQJN([evbBR,this,this.gEwSs],true)
}
this.HlmDq=function()
{
this.KpxZv("data","")
this.lnxDK.KpxZv("order-infos","")
this.lnxDK.PkeJa()
this.eVdmK("")
}
this.gEwSs=function()
{
this.PCZgm=true;
var RmXuE=this.OGsnq;
var OEEhW=new Array();
for(var i=0;i<RmXuE.length;i++)
{
var aHOok=RmXuE[i];
var nCBnV=aHOok.BFPsP
var Hbuxd=wa_global_market.markets[nCBnV] 

if(Hbuxd.info)
{
var qPHbJ=Hbuxd.info.products 
var QHLMb=aHOok.gUmFM_index
var dvdMH=qPHbJ[QHLMb]
aHOok.dvdMH=dvdMH
aHOok.ZwUlC(aHOok.dvdMH,QHLMb)
if((dvdMH.unavail==false)&&(aHOok.gUmFM_modif==Hbuxd.info.critical_id_modif))
{
OEEhW.push(aHOok)
}
}
else
{
}
}
this.OGsnq=OEEhW
this.uEKkL() 

this.xRtfd.call(this.rqYvE_callback)
}
this.eVdmK=function(YZBei)
{
var RmXuE=new Array();
var list_string_products=YZBei.split(";")
for(var i=0;i<list_string_products.length;i++)
{
var s_data=list_string_products[i];
if(s_data&&(s_data.length>0))
{
var aHOok=new dSaNG();
if(aHOok.gVlvB(s_data))
{
RmXuE.push(aHOok);
}
}
}
this.OGsnq=RmXuE;
var DArwO=this.SwCJb()
if(WA_getNumberMarketItemsInCart()!=DArwO)
{
this.QwQfB()
this.gpmnr()
}
}
this.Dtqmg=function()
{
var pgYIV=''
try{pgYIV=CONST_WA_GLOBAL_SETTINGS.currency_mnemonic}catch(e){}
return pgYIV
}
this.ExfYA=function(FVvIo)
{
var list2=new Array();
var RmXuE=this.OGsnq
for(var i=0;i<RmXuE.length;i++)
{
var aHOok=RmXuE[i];
if(i!=FVvIo)
{
list2.push(aHOok);
}
}
this.OGsnq=list2;
this.uEKkL()
}
this.addProductToShoppingCard=function(dvdMH,optionsValues)
{
if(this.cWlIt()==false)
{
WA_Dialog.alert(Translator.tr("You can't use shopping card Your browser doesnt accept cookies !"));
return false;
}
var KfWdX=dvdMH.obj
var RmXuE=this.FpPOn();
var n=RmXuE.length
var uUkaI=new dSaNG()
uUkaI.GkMRB(dvdMH,n);
uUkaI.m_opt_vals=optionsValues
var b_match=false;
for(var i=0;i<RmXuE.length;i++)
{
var aHOok=RmXuE[i];
if(aHOok.GxJJI()==uUkaI.GxJJI())
{
b_match=true;
aHOok.iZgvO++;
}
}
if(b_match==false)
{
var svoih=this.RMaRd("data")
var SePxX=uUkaI.cLPvg()
var anmWc=svoih.length+SePxX.length 
if(anmWc>4000)
{
WA_Dialog.alert(Translator.tr("Cookies cart contains max data !"));
return false;
}
RmXuE.push(uUkaI);
}
return true
}
this.YbEcJ=function()
{
var RmXuE=this.OGsnq
var svoih="";
for(var i=0;i<RmXuE.length;i++)
{
var info=RmXuE[i];
svoih+=info.cLPvg()+";";
}
return svoih;
}
this.SwCJb=function()
{
var DgSoQ=0;
var RmXuE=this.OGsnq;
for(var i=0;i<RmXuE.length;i++)
{
var aHOok=RmXuE[i];
DgSoQ+=aHOok.iZgvO
}
return DgSoQ;
}
this.QwQfB=function()
{
this.KpxZv("nb_items",this.SwCJb())
}
this.uEKkL=function()
{
var RmXuE=this.OGsnq
var svoih=this.YbEcJ()
this.KpxZv("data",svoih)
this.QwQfB()
this.gpmnr();
}
this.gpmnr=function()
{
WA_refreshNumberMarketItemsInCart()
}
this.FpPOn=function()
{
return this.OGsnq;
}
this.cWlIt=function()
{
this.KpxZv("watestcookies","test")
return(this.RMaRd("watestcookies")=="test");
}
this.KpxZv=function(key,val)
{
if((val==null)||(val==undefined)) val="";
WA_SetCookie("crbst-card-"+key,val)
}
this.RMaRd=function(key)
{
var rqYvE=WA_GetCookie("crbst-card-"+key)
if(rqYvE=="null")rqYvE="";
return ""+rqYvE
}
this.rNXfq=function(v)
{
return WA_formatPrice(v)
}
this.Qsgqi=function(v)
{
return WA_basicFormatPrice(v)+" "+CONST_WA_GLOBAL_SETTINGS.currency_code;
}
this.oaXeO=function(aLeQY)
{
return Math.round(aLeQY*100)/100
}
this.pEiIP=function()
{
var RmXuE=this.FpPOn()
var price=0;
for(var i=0;i<RmXuE.length;i++)
{
var aHOok=RmXuE[i];
price+=(aHOok.JBCOB()*aHOok.iZgvO);
}
return price;
}
this.jueJt=function()
{
var aLeQY=this.pEiIP()
var bFgFo=0;
var RmXuE=CONST_WA_GLOBAL_SETTINGS.list_promo_codes
for(var i=0;i<RmXuE.length;i++)
{
var UNkPZ=RmXuE[i];
if(MD5(trimString(this.lnxDK.RoxIF.toUpperCase()))==UNkPZ.c)
{
if(UNkPZ.v.indexOf("%")>-1)
{
var bFgFo=parseFloat(UNkPZ.v)/100;
return aLeQY*bFgFo;
}
else
{
return parseFloat(UNkPZ.v);
}
break;
}
}
return 0;
}
this.FcPuM=function(VZExu)
{
var qmLqV=0;
var OZmIk=CONST_WA_GLOBAL_SETTINGS.shipping_type
if(OZmIk==pUZRs)return qmLqV;
var FiHcw=CONST_WA_GLOBAL_SETTINGS.shipping_intervals
for(var i=0;i<FiHcw.length;i++)
{
var mYMaL=FiHcw[i];
if(mYMaL.v<VZExu)qmLqV=mYMaL.p
}
return qmLqV;
}
this.MKYwT=function(XFGct,VZExu)
{
var DbNcZ=CONST_WA_GLOBAL_SETTINGS.KIDiF_list_extra_shipping_by_country_code
if(DbNcZ==undefined)
{
DbNcZ=new Array()
CONST_WA_GLOBAL_SETTINGS.KIDiF_list_extra_shipping_by_country_code=DbNcZ;
var iEGip=CONST_WA_GLOBAL_SETTINGS.list_extra_shipping_by_country_code
for(var FVvIo in iEGip)
{
var xkEZA=iEGip[FVvIo];
var KJofp=xkEZA.c
for(var mNFhS in KJofp)
{
var RKmJN=KJofp[mNFhS];DbNcZ[RKmJN]=xkEZA.p;
}
}
}
var FiHcw=DbNcZ[XFGct]
if(FiHcw==undefined) return 0;
var extra_val=0;
for(var i=0;i<FiHcw.length;i++)
{
var mYMaL=FiHcw[i];
if(mYMaL.v<VZExu)extra_val=mYMaL.p
}
if(isNaN(extra_val)) extra_val=0;
return extra_val;
}
this.BuDvN=function(XFGct)
{
var DbNcZ=CONST_WA_GLOBAL_SETTINGS.KIDiF_list_tva_by_country_code
if(DbNcZ==undefined)
{
DbNcZ=new Array()
CONST_WA_GLOBAL_SETTINGS.KIDiF_list_tva_by_country_code=DbNcZ;
var iEGip=CONST_WA_GLOBAL_SETTINGS.list_tva_by_country_code
for(var FVvIo in iEGip)
{
var xkEZA=iEGip[FVvIo];
var KJofp=xkEZA.c;
for(var mNFhS in KJofp)
{
var RKmJN=KJofp[mNFhS];DbNcZ[RKmJN]=xkEZA.p;
}
}
}
return DbNcZ[XFGct];
}
this.FIbDX=function()
{
var OZmIk=CONST_WA_GLOBAL_SETTINGS.shipping_type
var RmXuE=this.FpPOn()
var CGpAA=0;
for(var i=0;i<RmXuE.length;i++)
{
var aHOok=RmXuE[i];
if(OZmIk==bNwOg)
{
CGpAA+=(aHOok.iZgvO*aHOok.JBCOB());
}
if(OZmIk==DeBUs)
{
CGpAA+=(aHOok.iZgvO*aHOok.oNShs);
}
}
if(OZmIk==bNwOg)
{
CGpAA-=this.jueJt()
}
var ClOgC=this.lnxDK.ClOgC;
var ppqGB=0;
ppqGB+=this.FcPuM(CGpAA);
ppqGB+=this.MKYwT(ClOgC,CGpAA);
return this.oaXeO(ppqGB);
}
this.plaHQ=function()
{
return CONST_WA_GLOBAL_SETTINGS.tva_type==lUYdW
}
this.VDudo=function()
{
return CONST_WA_GLOBAL_SETTINGS.tva_type==iDxQk
}
this.XkMBL=function()
{
return CONST_WA_GLOBAL_SETTINGS.tva_type==dcnRe
}
this.WnGNk=function()
{
if(this.XkMBL())return 0;
var tax=0;
var country_code=this.lnxDK.ClOgC;
if(country_code.length>0)
{
tax=this.BuDvN(country_code);
if(isNaN(tax))tax=0;
}
return tax;
}
this.jLkDi=function(aLeQY)
{
if(this.plaHQ())
{
var n0=this.WnGNk()/100;
return aLeQY*(n0/(1+n0));
}
if(this.VDudo())
{
return aLeQY*this.WnGNk()/100;
}
return aLeQY;
}
this.mLwfg=function()
{
if(this.XkMBL())return 0;
var RmXuE=this.FpPOn()
var Cvvuf=0;
var NAcvP=0;
for(var i=0;i<RmXuE.length;i++)
{
var aHOok=RmXuE[i];
Cvvuf+=(aHOok.JBCOB()*aHOok.iZgvO);
}
Cvvuf+=this.FIbDX();
NAcvP=this.oaXeO(this.jLkDi(Cvvuf));
return NAcvP;
}
this.FLaMx=function()
{
var aLeQY=0;
aLeQY+=this.pEiIP()
if(this.VDudo())aLeQY+=this.mLwfg()
aLeQY+=this.FIbDX()
aLeQY-=this.jueJt()
return aLeQY;
}
}
function JsaCd(mbfnl,ePrJr)
{
if(mbfnl.lab<ePrJr.lab) return-1;
if(mbfnl.lab>ePrJr.lab) return 1;
return 0
}
function WA_marketWatchQuantity()
{
var SYmlS=WA_Dialog.getCurrent()
SYmlS.TxJZa()
}
function WA_displayDialogMarketCart()
{
var SYmlS=new WA_Dialog();
SYmlS.OiXoT=false;
SYmlS.tSfil=function()
{
this.CfWoV()
this.OiXoT=setInterval("WA_marketWatchQuantity()",400)
}
SYmlS.CfWoV=function()
{
if(this.OiXoT)clearInterval(this.OiXoT)
}
SYmlS.TxJZa=function()
{
var AAqxc=bKCQt();
var FAhXh=AAqxc.FpPOn();
for(var n=0;n<FAhXh.length;n++)
{
var aHOok=FAhXh[n]
var ddpTN=document.getElementById("wa-cart-quantity-"+n)
var WRbfl=ddpTN.value
var pJHow=parseInt(WRbfl)
if(isNaN(pJHow))pJHow=0;
if((WRbfl!='')&&(pJHow+""!=WRbfl))
{
ddpTN.value=""+pJHow
}
if(pJHow!=aHOok.iZgvO)
{
aHOok.iZgvO=pJHow
AAqxc.uEKkL()
this.VDice()
}
}
var RJXmj=document.getElementById("wa-promo-code")
if(RJXmj)
{
if(RJXmj.value!=AAqxc.lnxDK.RoxIF)
{
AAqxc.lnxDK.RoxIF=RJXmj.value
this.VDice()
}
}
}
SYmlS.onCustomKeypress=function(EtNiW)
{
if(EtNiW==13)
{
wa_timeout(Delegate.create(this,this.mLmcv),0);
}
return false;
}
SYmlS.closeWin=function()
{
this.CfWoV()
this.intern_closeWin()
}
SYmlS.VDice=function()
{
var AAqxc=bKCQt();
var FAhXh=AAqxc.FpPOn();
if(FAhXh.length==0) return;
for(var n=0;n<FAhXh.length;n++)
{
var aHOok=FAhXh[n]
var gQhrg=document.getElementById("wa-cart-total-"+n)
var aLeQY=aHOok.JBCOB() 
var mZtYc=aHOok.iZgvO*aLeQY
var iYgLA="<span style='"
iYgLA+=(mZtYc>0)?"color:"+WA_GLOBAL_COLOR_THEME.color_text+";font-weight:normal;":"color:#ff0000;font-weight:bold;"
iYgLA+="'>"
iYgLA+=AAqxc.rNXfq(mZtYc)
iYgLA+="</span>"
gQhrg.innerHTML=iYgLA
}
var VLXeH=AAqxc.pEiIP()
var doXwm=AAqxc.mLwfg()
var vgPfv=AAqxc.FIbDX()
var WhaAb=AAqxc.FLaMx()
var rWvOR=AAqxc.jueJt()
var QKBkh=""
var gQhrg=document.getElementById("wa-cart-amount-total")
QKBkh+=Translator.tr("Sub total")+" : "+AAqxc.rNXfq(VLXeH)
QKBkh+="<br>"
if(vgPfv>0)
{
QKBkh+="<span>"+Translator.tr("Shipping amount")+" : "+AAqxc.rNXfq(vgPfv)+"</span>";
QKBkh+="<br>"
}
if(AAqxc.plaHQ()||AAqxc.VDudo())
{
if(AAqxc.plaHQ())
{
QKBkh+="<div style='width:100%;text-align:left;'>"
QKBkh+=Translator.tr("Tax included");
}
if(AAqxc.VDudo())
{
QKBkh+="<div>"
QKBkh+=Translator.tr("Extra Tax");
}
QKBkh+=" : ";
QKBkh+=AAqxc.rNXfq(doXwm)+"</div>";
}
if(rWvOR>0)
{
QKBkh+="<span>"+Translator.tr("Promotion")+" : - "+AAqxc.rNXfq(rWvOR)+"</span><br>";
}
QKBkh+="<span><b>"+Translator.tr("Total")+" : "+AAqxc.rNXfq(WhaAb)+"</b></span>";
gQhrg.innerHTML=QKBkh
}
SYmlS.Xehra=function()
{
WA_displayDialogMarketCart()
}
SYmlS.hmRxA=function()
{
this.closeWin()
}
SYmlS.mLmcv=function()
{
var AAqxc=bKCQt();
if(WA_getNumberMarketItemsInCart()==0)return;
var mxJRO=document.getElementById("wa-market-select-country")
if(mxJRO)
{
AAqxc.lnxDK.ClOgC=mxJRO.value
}
if(AAqxc.lnxDK.ClOgC=="")
{
var mxJRO=document.getElementById("wa-market-select-country")
if(mxJRO)
{
mxJRO.focus()
mxJRO.style.backgroundColor="#ff0000"
return;
}
}
if(CONST_WA_GLOBAL_SETTINGS.link_sale_condition)
{
if(AAqxc.lnxDK.inRZE!=true)
{
var hTRMm=document.getElementById("wa-sales-condition")
if(hTRMm)
{
hTRMm.focus()
var cdZYL=document.getElementById("wa-sales-condition-label")
cdZYL.style.backgroundColor="#ff0000"
return;
}
}
}
var CgLcG=CONST_WA_GLOBAL_SETTINGS.list_type_payment
if(CgLcG.length==1)
{
AAqxc.lnxDK.LVCVG=CgLcG[0]
}
var mxJRO=document.getElementById("wa-market-select-payment")
if(mxJRO)
{
AAqxc.lnxDK.LVCVG=mxJRO.value
if(AAqxc.lnxDK.LVCVG=="")
{
mxJRO.focus()
mxJRO.style.backgroundColor="#ff0000"
return;
}
}
tvYqJ()
}
SYmlS.tsYaZ=function()
{
WA_exec_callback_opera_compliant(this,this.BabBu)
}
SYmlS.BabBu=function()
{
var AAqxc=bKCQt();

var xrUIG=document.getElementById("wa-market-select-country")
if(xrUIG)
{
AAqxc.lnxDK.ClOgC=xrUIG.value
}
AAqxc.lnxDK.XOram()
var SgEUQ=html_getLayer("market-cart-content")
var UHWHL=html_getLayer("wa-market-payment-form") 
var iYgLA=""
var FAhXh=AAqxc.FpPOn();
html_SetVisibility(UHWHL,(FAhXh.length>0))
if(FAhXh.length==0)
{
iYgLA+="<span style='font-family:Arial;font-size:16px;'>"
iYgLA+=Translator.tr("No articles in Card !")
iYgLA+="</span>"
}
else
{
var mJtHh="border:1px solid "+WA_GLOBAL_COLOR_THEME.color0+";font-weight:normal;"
var DYESj=new RGBColor(WA_GLOBAL_COLOR_THEME.color0);
var lRkna=DYESj.toHsl();
DYESj.fromHsl(lRkna[0],lRkna[1],lRkna[2]+0.2)
var gqKhd="border:1px solid "+WA_GLOBAL_COLOR_THEME.color0+";font-weight:normal;color:"+WA_GLOBAL_COLOR_THEME.color_text+";background-color:"+DYESj.toRGB()+";"
var NXxUf="border:1px solid "+WA_GLOBAL_COLOR_THEME.color0+";color:#ff0000;font-weight:bold;"
var cjNpV="color:#222222;font-size:12px;"
iYgLA+="<table style='font-family:Arial;font-weight:normal;border:2px solid "+WA_GLOBAL_COLOR_THEME.color0+";border-collapse:collapse;width:100%;margin:auto;background-color:"+WA_GLOBAL_COLOR_THEME.color2+";'>"
iYgLA+="<thead style='font-size:13px;border:1px solid;'>"
iYgLA+="<tr>"
iYgLA+="<th  colspan=2 style='"+gqKhd+"'></th>"
iYgLA+="<th style='"+gqKhd+"'  width=70px><b>"+Translator.tr("Price")+"</b></th>"
iYgLA+="<th style='"+gqKhd+"'  width=70px><b>"+Translator.tr("Quantity")+"</b></th>"
iYgLA+="<th style='"+gqKhd+"'  width=70px><b>"+Translator.tr("Total")+"</b></th>"
iYgLA+="<th style='"+gqKhd+"'  width=90px></th>"
iYgLA+="</tr>"
var oxHCn=new RGBColor(WA_GLOBAL_COLOR_THEME.color2);
var UqedQ=oxHCn.toHsl();
oxHCn.fromHsl(UqedQ[0],UqedQ[1],UqedQ[2]-0.1) 
for(var n=0;n<FAhXh.length;n++)
{
var vDkpU="";
if(n%2==0)
{
vDkpU="background-color:"+oxHCn.toRGB()+";"
}
var BtWNe=mJtHh+vDkpU;
var aHOok=FAhXh[n]
iYgLA+="<tr>"
iYgLA+="<th style='"+BtWNe+"' >"
var Hbuxd=wa_global_market.markets[aHOok.BFPsP]
var deNas=new Size(30,30)
var rpZQr=deNas
if(Hbuxd.info.design.crop_thumb==false)
{
rpZQr=aHOok.dvdMH.size_thumb.clone()
rpZQr.scale(deNas)
}
else
{
}
if(aHOok.dvdMH.img_thumb.length>0)
iYgLA+="<img border=0 src='"+aHOok.dvdMH.img_thumb+"' width="+rpZQr.width+"px height="+rpZQr.height+"px>"
iYgLA+="</th>" 
iYgLA+="<th style='"+BtWNe+"text-align:left;padding:5px;' >"
iYgLA+="<b>"+aHOok.ZgQwB+"</b>"
if(aHOok.QXsQC.length>0)
{
iYgLA+="<span style='"+cjNpV+"'>";
iYgLA+=" ["+aHOok.QXsQC+"]";
iYgLA+="</span>";
}
if(aHOok.m_opt_vals)
{
iYgLA+="<br>"
iYgLA+="<span style='"+cjNpV+"'>";
for(var i_opt=0;i_opt<aHOok.dvdMH.options.length;i_opt++)
{
var pMGLe=aHOok.dvdMH.options[i_opt]
if(pMGLe)
{
var acPoW=aHOok.m_opt_vals[i_opt];
var HRinf=pMGLe.title;
if(HRinf.length>0)
{
iYgLA+=HRinf;
iYgLA+=":"
}
iYgLA+=pMGLe.vals[acPoW];
iYgLA+=" "
}
}
iYgLA+="</span>";
}
iYgLA+="</th>"
var aLeQY=aHOok.JBCOB()
iYgLA+="<th style='"+BtWNe+"' >"+AAqxc.rNXfq(aLeQY)+"</th>"
iYgLA+="<th style='"+BtWNe+"'  align=center><input type=text id='wa-cart-quantity-"+n+"' style='width:45px;' maxlength=3 value='"+aHOok.iZgvO+"' type=text/></th>"
iYgLA+="<th style='"
var mZtYc=aHOok.iZgvO*aLeQY
iYgLA+=(mZtYc>0)?BtWNe:(NXxUf+vDkpU);
iYgLA+="' ><span id='wa-cart-total-"+n+"'>"
iYgLA+=AAqxc.rNXfq(mZtYc)
iYgLA+="</span></th>"
iYgLA+="<th style='"+BtWNe+"' ><a href=\"javascript:WA_marketRemoveItem("+n+")\">"+Translator.tr("Remove card item")+"</a></th>"
iYgLA+="</tr>"
}
iYgLA+="<tr>"
iYgLA+="<th style='"+mJtHh+"text-align:right;padding:5px;' id='wa-cart-amount-total'  colspan=5>&nbsp;</th>"
iYgLA+="<th style='"+mJtHh+"' ></th>"
iYgLA+="</tr>"
iYgLA+="</thead>"
iYgLA+="</table>"
iYgLA+="<br>"
}
SgEUQ.innerHTML=iYgLA
this.tSfil()
WA_exec_callback_opera_compliant(this,this.VDice) 
}
SYmlS.TLnWc=function()
{
var AAqxc=bKCQt();
this.addButton(Translator.tr("Continue Shopping"),this.hmRxA,[""],this)
this.addButton(Translator.tr("Checkout order"),this.mLmcv,[""],this)
this.initializeWindow(670,700)
var LBlXe="font-family:Arial;font-size:12px;color:#000000;"
var iYgLA=""
iYgLA+="<div id='market-cart-content' style='width:100%;"+LBlXe+"' align=center>" 
iYgLA+="</div>"
iYgLA+="<br>"
iYgLA+="<div style='width:100%;"+LBlXe+"' align=center id='wa-market-payment-form'>" 
var otWCg=CONST_WA_GLOBAL_SETTINGS.list_favorite_country
var LvfqK=CONST_WA_GLOBAL_SETTINGS.list_country
var QSbiT=new Array()
for(var CsQMX=0;CsQMX<otWCg.length;CsQMX++)
{
QSbiT[otWCg[CsQMX]]=true
}
for(var CsQMX=0;CsQMX<LvfqK.length;CsQMX++)
{
QSbiT[LvfqK[CsQMX]]=true
}
var KmFxw=0;
var QqoFQ=""
for(var c in QSbiT)
{
KmFxw++;
QqoFQ=c
}
if(KmFxw>1)
{
iYgLA+="<span style='font-weight:bold;'>"
iYgLA+=Translator.tr("Please choose a country to deliver your order")
iYgLA+="</span>"
iYgLA+="<br>"
iYgLA+="<select onchange=\"WA_marketChangeCountry(this)\" id='wa-market-select-country'>"
if(CONST_WA_GLOBAL_SETTINGS.default_selected_country.length==0)
{
iYgLA+="<option value=\"\">...</option>"
}
var Tchtg=new Array()
for(var CsQMX=0;CsQMX<otWCg.length;CsQMX++)
{
var iKujY=otWCg[CsQMX]
Tchtg.push({code:iKujY,lab:Translator.country(iKujY)})
}
for(var CsQMX=0;CsQMX<Tchtg.length;CsQMX++)
{
var rqYvE=Tchtg[CsQMX]
var iKujY=rqYvE.code
iYgLA+="<option "
if(AAqxc.lnxDK.uAlhN()==iKujY)iYgLA+="selected "
iYgLA+="value=\""+iKujY+"\">"+Translator.country(iKujY)+"</option>"
}
if((otWCg.length>0)&&(LvfqK.length>0))
{
iYgLA+="<option value=\"\">-----</option>"
}
var gUePB=new Array()
for(var CsQMX=0;CsQMX<LvfqK.length;CsQMX++)
{
var iKujY=LvfqK[CsQMX]
gUePB.push({code:iKujY,lab:Translator.country(iKujY)})
}
if((otWCg.length==0)&&(LvfqK.length==0))
{
var RmXuE=CONST_WA_COUNTRIES.codes
for(var CsQMX=0;CsQMX<RmXuE.length;CsQMX++)
{
var iKujY=RmXuE[CsQMX]
gUePB.push({code:iKujY,lab:Translator.country(iKujY)})
}
}
gUePB.sort(JsaCd)
for(var CsQMX=0;CsQMX<gUePB.length;CsQMX++)
{
var rqYvE=gUePB[CsQMX]
var iKujY=rqYvE.code
iYgLA+="<option "
if(AAqxc.lnxDK.uAlhN()==iKujY)iYgLA+="selected "
iYgLA+="value=\""+iKujY+"\">"+Translator.country(iKujY)+"</option>"
}
iYgLA+="</select>"
iYgLA+="<br>"
iYgLA+="<br>"
}
var CgLcG=CONST_WA_GLOBAL_SETTINGS.list_type_payment
if(CgLcG.length>1)
{
iYgLA+="<span style='font-weight:bold;'>"
iYgLA+=Translator.tr("Choose a type of payment")
iYgLA+="</span>"
iYgLA+="<br>"
iYgLA+="<select onchange=\"WA_marketChangeTypePayment(this)\" id='wa-market-select-payment'>"
if((CgLcG.length>1)||(CgLcG.length==0))
{
iYgLA+="<option value=\"\">...</option>"
}
for(var CsQMX=0;CsQMX<CgLcG.length;CsQMX++)
{
var LVCVG=CgLcG[CsQMX]
iYgLA+="<option "
if(AAqxc.lnxDK.LVCVG==LVCVG)iYgLA+="selected "
iYgLA+="value=\""+LVCVG+"\">"+Translator.tr("label_market_"+LVCVG)+"</option>"
}
iYgLA+="</select>"
iYgLA+="<br>"
iYgLA+="<br>"
}
if(CONST_WA_GLOBAL_SETTINGS.list_promo_codes)
{
var RmXuE=CONST_WA_GLOBAL_SETTINGS.list_promo_codes
iYgLA+="<span id='wa-promo-code-label'  style='font-weight:bold;'>"
iYgLA+=Translator.tr("form-label-code_promo")
iYgLA+="</span><br>"
iYgLA+="<input id='wa-promo-code' onchange=\"WA_marketChangePromoCode(this)\" " 
iYgLA+=" value='"+AAqxc.lnxDK.RoxIF+"' "
iYgLA+="/>"
iYgLA+="<br>"
iYgLA+="<br>"
}
if(CONST_WA_GLOBAL_SETTINGS.link_sale_condition)
{
iYgLA+="<a "+WA_LinkToHref(CONST_WA_GLOBAL_SETTINGS.link_sale_condition)+" style='color:#0000ff'>"
iYgLA+=Translator.tr("Terms of sell")
iYgLA+="</a>"
iYgLA+="<br>" 
iYgLA+="<span id='wa-sales-condition-label'  style='font-weight:bold;'>"
iYgLA+=Translator.tr("label_market_accept_terms")
iYgLA+="</span>"
iYgLA+="<input id='wa-sales-condition' onchange=\"WA_marketChangeSalesCondition(this)\" "
iYgLA+=(AAqxc.lnxDK.inRZE)?"checked ":""
iYgLA+="type='checkbox' value='1'/>" 
iYgLA+="<br>"
iYgLA+="<br>" 
}
if((KmFxw==1)||(CgLcG.length==1))
{
iYgLA+="<hr width=80%>"
iYgLA+="<br>"
if(KmFxw==1)
{
AAqxc.lnxDK.ClOgC=QqoFQ
iYgLA+="<span style='font-weight:bold;'>"
iYgLA+=Translator.tr("form-label-country")+" : "+Translator.country(AAqxc.lnxDK.ClOgC)
iYgLA+="</span>"
iYgLA+="<br>"
iYgLA+="<br>"
}
if(CgLcG.length==1)
{
var LVCVG=CgLcG[0]
iYgLA+="<span style='font-weight:bold;'>"
iYgLA+=Translator.tr("PRINT_FORM_LABEL_TYPE_PAYMENT")+" : "+Translator.tr("label_market_"+LVCVG)
iYgLA+="</span>"
iYgLA+="<br>"
iYgLA+="<br>"
}
}
iYgLA+="</div>"
this.writeContent(iYgLA)
var SgEUQ=html_getLayer("market-cart-content")
SgEUQ.innerHTML="<div width=100% align=center><img src='wa_loading.gif'></div>" 

AAqxc.JZNWF(this,this.tsYaZ)
}
SYmlS.TLnWc() 
}
function WA_marketChangeCountry(mxJRO)
{
mxJRO.style.backgroundColor=""
var SYmlS=WA_Dialog.getCurrent()
SYmlS.tsYaZ()
}
function WA_marketChangeTypePayment(mxJRO)
{
var AAqxc=bKCQt();
AAqxc.lnxDK.LVCVG=mxJRO.value
AAqxc.lnxDK.XOram()
mxJRO.style.backgroundColor=""
}
function WA_marketChangeSalesCondition(atAtu)
{
var AAqxc=bKCQt();
AAqxc.lnxDK.inRZE=atAtu.checked
AAqxc.lnxDK.XOram() 
var cdZYL=document.getElementById("wa-sales-condition-label")
cdZYL.style.backgroundColor="" 
}
function WA_marketChangePromoCode(atAtu)
{
var AAqxc=bKCQt();
AAqxc.lnxDK.RoxIF=atAtu.value
AAqxc.lnxDK.XOram() 


}
function WA_LinkToHref(ARRMf)
{
var iYgLA=""
var ZYkbl=ARRMf.url
var tihXM=Translator.m_lang_for_filename
if(tihXM.length>0)tihXM="_"+tihXM
ZYkbl=ZYkbl.replace(/@lng@/g,tihXM)
iYgLA+="href=\""+ZYkbl+"\" "
if(ARRMf.open==1)
{
iYgLA+="target="
iYgLA+="_blank"
}
return iYgLA;
}
function WA_displayDialogMarketProduct(nCBnV,FVvIo)
{
var vBgXw=wa_global_market.markets[nCBnV]
var gCTJO=vBgXw.obj
var qPHbJ=gCTJO.info.products
var dvdMH=qPHbJ[FVvIo] 

var SYmlS=new WA_Dialog();

SYmlS.dvdMH=dvdMH
SYmlS.TYSJt=nCBnV
SYmlS.Xehra=function()
{
WA_displayDialogMarketCart()
}
SYmlS.Louhq=function()
{
var AAqxc=bKCQt();
AAqxc.JZNWF(this,this.AebwW) 
}
SYmlS.AebwW=function()
{
var dvdMH=this.dvdMH;
var AAqxc=bKCQt();
var Otlut=new Array();
var smVLJ=dvdMH.obj.id;
for(var i=0;i<3;i++)
{
var HClwt=-1;
var vOVAt=smVLJ+"-select-opt"
var mxJRO=document.getElementById(vOVAt+i)
if(mxJRO)
{
if(mxJRO.value.length==0)
{
mxJRO.style.backgroundColor="#ff0000";
mxJRO.focus()
return;
}
HClwt=parseInt(mxJRO.value)
}
Otlut.push(HClwt)
}
if(AAqxc.addProductToShoppingCard(dvdMH,Otlut))
{
AAqxc.uEKkL()
WA_displayDialogMarketCart()
}
}
SYmlS.TLnWc=function()
{
var nCBnV=this.TYSJt
var dvdMH=this.dvdMH
var iYgLA=""
this.addButton(Translator.tr("Go to my card"),this.Xehra,[""],this)
if(dvdMH.unavail==false)
{
this.addButton(Translator.tr("Add to card"),this.Louhq,[""],this)
}
this.initializeWindow(670,this.idealHeight())
iYgLA+="<table border=0 width=100% cellpadding=4>"
iYgLA+="<tr>" 
if(dvdMH.img_big.length>0)
{
iYgLA+="<td width='100px' align=center valign=top>"
var rpZQr=dvdMH.size_thumb.clone() 
rpZQr.scale(new Size(200,200))
iYgLA+="<a href=\""+dvdMH.img_big+"\" target=_blank>"
iYgLA+="<img border=0 src=\""+dvdMH.img_big+"\" width='"+rpZQr.width+"px' height='"+rpZQr.height+"px'>"
iYgLA+="</a>"
iYgLA+="</td>"
}
var nXVUC="color:"+WA_GLOBAL_COLOR_THEME.color_text+";";
iYgLA+="<td valign=top style='font-family:Arial;'>"
iYgLA+="<span style='font-weight:bold;font-size:16px;"+nXVUC+"'>"
iYgLA+=dvdMH.title
iYgLA+="</span>"
iYgLA+="<br>"
if(dvdMH.sub_title.length>0)
{
iYgLA+="<span style='color:#333333;font-size:14px;'>"
iYgLA+=dvdMH.sub_title
iYgLA+="</span>"
iYgLA+="<br>"
}
iYgLA+="<br>"
iYgLA+="<table border=0 width=100% cellspacing=0 cellpadding=0><tr><td>"
iYgLA+="<span style='"+nXVUC+";font-size:14px;'>"
iYgLA+=Translator.tr("Price")+" : "
iYgLA+="</span>"
iYgLA+="<span style='"+nXVUC+";font-size:18px;font-weight:bold;' id='"+dvdMH.obj.id+"-price'>"
if(dvdMH.unavail)
{
iYgLA+=Translator.tr("Unavailable")
}
iYgLA+="</span>"
if(dvdMH.more_info)
{
iYgLA+="</td><td align=right>"
var ARRMf=dvdMH.more_info
var VBBgL=WA_LinkToHref(ARRMf)
iYgLA+="<a "+VBBgL+" style='font-family:Arial;text-decoration:underline;font-weight:bold;font-size:12px;color:0000ff;'>"+Translator.tr("More product info link")+"</a>"
}
iYgLA+="</td></tr></table>"
iYgLA+="<br>"
var JkoUn=dvdMH.obj.index
if(dvdMH.unavail==false)
if(dvdMH.options.length>0)
{
iYgLA+="<table border=0 cellspacing=0 cellpadding=0>"
for(var n=0;n<dvdMH.options.length;n++)
{
var pMGLe=dvdMH.options[n]
if(pMGLe)
{
iYgLA+="<tr><td align=right>"
iYgLA+="<span style='font-family:Arial;font-weight:bold;font-size:12px;"+nXVUC+"'>"
iYgLA+=pMGLe.title+" :&nbsp;"
iYgLA+="</span>"
iYgLA+="</td><td align=left>"
iYgLA+="<select id='"+dvdMH.obj.id+"-select-opt"+n+"' onchange=\"WA_market_changeCustomPrice('"+nCBnV+"',"+JkoUn+")\">"
iYgLA+="<option value=\"\">...</option>"
for(var CsQMX=0;CsQMX<pMGLe.vals.length;CsQMX++)
{
var ItsTu=pMGLe.vals[CsQMX]
iYgLA+="<option value=\""+CsQMX+"\">"+ItsTu+"</option>"
}
iYgLA+="</select>"
iYgLA+="</td></tr>";
}
}
iYgLA+="</table>"
}
iYgLA+="</td>"
iYgLA+="</tr>"
iYgLA+="</table>"
if(dvdMH.description.length>0)
{
iYgLA+="<table border=0 width=100% cellpadding=4>"
iYgLA+="<tr><td colspan=2>"
iYgLA+="<span style='font-family:Arial;font-size:13px;"+nXVUC+"'>"
iYgLA+="<hr>"
iYgLA+=dvdMH.description
iYgLA+="</span>"
iYgLA+="</td></tr>"
iYgLA+="</table>"
}
this.writeContent(iYgLA)
WA_market_changeCustomPrice(nCBnV,JkoUn)
}
SYmlS.displayWindowWithAutoResize(300,SYmlS.TLnWc) 
}
function IlLkj(dvdMH,smVLJ)
{
var PbYHX=new Array()
for(var i=0;i<3;i++)
{
var vOVAt=smVLJ+"-select-opt"
var mxJRO=document.getElementById(vOVAt+i)
PbYHX[i]=-1
if(mxJRO)
{
mxJRO.style.backgroundColor="";
var ItsTu=parseInt(mxJRO.value)
if(isNaN(ItsTu)==false)
PbYHX[i]=ItsTu
}
}
return dQGkS(dvdMH,PbYHX)
}
function dQGkS(dvdMH,PbYHX)
{
if(dvdMH.unavail)return;
var QZLJV=false;
for(var i=0;i<dvdMH.custom_prices.length;i++)
{
var sjffH=dvdMH.custom_prices[i]
var pciPG=true;
for(var n=0;n<3;n++)
{
if(sjffH.tab[n]!=PbYHX[n])pciPG=false
}
if(pciPG)
{
QZLJV=sjffH;
break;
}
}
var aLeQY=dvdMH.price
if(QZLJV)
{
aLeQY=QZLJV.pr
}
return aLeQY;
}
function WA_market_changeCustomPrice(nCBnV,JkoUn)
{
var AAqxc=bKCQt();
var vBgXw=wa_global_market.markets[nCBnV]
var qPHbJ=vBgXw.info.products;
var dvdMH=qPHbJ[JkoUn]
if(dvdMH.unavail)return;
var smVLJ=dvdMH.obj.id
var aLeQY=IlLkj(dvdMH,smVLJ)
var ReRIB=html_getLayer(smVLJ+"-price")
if(ReRIB)
{
ReRIB.innerHTML=AAqxc.rNXfq(aLeQY)
}
}
function tvYqJ()
{
var AAqxc=bKCQt();
if(WA_getNumberMarketItemsInCart()==0)return;
var aHOok=AAqxc.lnxDK
if((AAqxc.BgiNX)&&(aHOok.LVCVG=="paypal"))
{
TEDem();
return;
}
cDBAv(OZmLl)
}
function cDBAv(HtNOf)
{
var AAqxc=bKCQt();
var aHOok=AAqxc.lnxDK
aHOok.PkeJa()
var SYmlS=new WA_Dialog();
SYmlS.HtNOf=HtNOf
SYmlS.IXFlH=function(EtNiW)
{
return Translator.tr("form-label-"+EtNiW)
}
SYmlS.onCustomKeypress=function(EtNiW)
{
if(EtNiW==13)
{
wa_timeout(Delegate.create(this,this.wntLx),0);
}
return false;
}
SYmlS.oUJFp=function()
{
if(this.HtNOf==OZmLl)
{
WA_displayDialogMarketCart()
}
else
{
cDBAv(OZmLl)
}
}
SYmlS.rWkeI=function()
{
TEDem()
}
SYmlS.wntLx=function()
{
var AAqxc=bKCQt();
var aHOok=AAqxc.lnxDK
if(aHOok.ABdhN(this.HtNOf)==false) return;
aHOok.XOram()
if(this.HtNOf==OZmLl)
{
if(aHOok.mfIwd==true)
{
cDBAv(quaLC)
}
else
{
this.rWkeI()
}
}
else
{
this.rWkeI()
}
}
SYmlS.UtTTx=function(EtNiW,momjc)
{
if(momjc==undefined) momjc=""
if(momjc)momjc=" size="+momjc
return "<input name='"+EtNiW+"' value=\""+aHOok.AuSDU(EtNiW,this.HtNOf)+"\" type=text "+momjc+">"
}
SYmlS.Thdjv=function(IRnJB)
{
return "<td width=150px align=right valign=top>"+Translator.tr(IRnJB)+" :</td>"
}
SYmlS.TLnWc=function()
{
var AAqxc=bKCQt();
var aHOok=AAqxc.lnxDK 
this.addButton("< "+Translator.tr('Back'),this.oUJFp,[""],this)
this.addButton(Translator.tr('Continue')+" >",this.wntLx,[""],this)
this.initializeWindow(600,600)
var AKiMw="form-label-"
var RpxGm=CONST_WA_GLOBAL_SETTINGS.list_form_fields 
var iYgLA=""
iYgLA+="<form id='wa-market-form' onSubmit='return false'>"
iYgLA+="<table border=0 width=100% cellspacing=5 style='font-family:Arial;font-size:15px;'>"
iYgLA+="<tr><td colspan=2 align=center style='font-size:18px;'>"
iYgLA+=Translator.tr((this.HtNOf==OZmLl)?"Fill Deliver information below":"Fill Billing information below")
iYgLA+="<br><br></td></tr>"
for(var n=0;n<RpxGm.length;n++)
{
var cRwKe=RpxGm[n]
if(cRwKe=="address")
{
iYgLA+="<tr>"+this.Thdjv("Address");
iYgLA+="<td>"
iYgLA+=this.UtTTx("address_1",30)
iYgLA+="</td></tr>"
iYgLA+="<tr><td></td><td>"
iYgLA+=this.UtTTx("address_2",30)
iYgLA+="</td></tr>"
iYgLA+="<tr>"+this.Thdjv("form-label-city");
iYgLA+="<td>"
iYgLA+=this.UtTTx("city")+"&nbsp;"+this.IXFlH("zip")+" : "+this.UtTTx("zip",10)
iYgLA+="</td></tr>" 
iYgLA+="<tr>"+this.Thdjv("form-label-country");
iYgLA+="<td>"
if(this.HtNOf==quaLC)
{
iYgLA+="<select id='wa-select-form-country' onchange='WA_marketChangeFormCountry("+this.HtNOf+")'>"
var gUePB=new Array();
var RmXuE=CONST_WA_COUNTRIES.codes
for(var CsQMX=0;CsQMX<RmXuE.length;CsQMX++)
{
var iKujY=RmXuE[CsQMX]
gUePB.push({code:iKujY,lab:Translator.country(iKujY)})
}
gUePB.sort(JsaCd)
var tfhEh=aHOok.uAlhN()
tfhEh=aHOok.AuSDU('countryCode',this.HtNOf,tfhEh)
for(var CsQMX=0;CsQMX<gUePB.length;CsQMX++)
{
var rqYvE=gUePB[CsQMX]
var iKujY=rqYvE.code
iYgLA+="<option "
if(tfhEh==iKujY)iYgLA+="selected "
iYgLA+="value=\""+iKujY+"\">"+Translator.country(iKujY)+"</option>"
}
iYgLA+="</select>"
}
else
{
iYgLA+=Translator.country(AAqxc.lnxDK.ClOgC);
}
iYgLA+="<br><span id='wa-market-state'>"
iYgLA+="<select id='wa-select-state'></select>"
iYgLA+="</span>" 
iYgLA+="</td></tr>"
}
else
{
iYgLA+="<tr>"+this.Thdjv("form-label-"+cRwKe);
iYgLA+="<td>"
iYgLA+=this.UtTTx(cRwKe,30) 
iYgLA+="</td></tr>"
}
}
if(this.HtNOf==OZmLl)
{
iYgLA+="<tr><td colspan=2 align=center >"
iYgLA+=Translator.tr("Billing adress is different")+" <input type=checkbox "
if(AAqxc.lnxDK.mfIwd)iYgLA+="checked "
iYgLA+="onchange='WA_marketCheckBillingAdress(this)'>"
iYgLA+="</td></tr>"
}
iYgLA+="</table>"
iYgLA+="</form>"
this.writeContent(iYgLA)
WA_exec_callback_opera_compliant(this,this.GjEmW) 
}
SYmlS.GjEmW=function()
{
WA_marketChangeFormCountry(this.HtNOf)
}
SYmlS.TLnWc()
}
function OSdDf(HtNOf,mxJRO,DbNcZ)
{
var AAqxc=bKCQt();
var aHOok=AAqxc.lnxDK
var GLAfK=aHOok.AuSDU("stateCode",HtNOf) 
mxJRO.options.length=0
for(var n=0;n<DbNcZ.length;n++)
{
var val=DbNcZ[n]
var elOptNew=document.createElement('option');
elOptNew.value=val;
if(val.length==0)val="--- "+Translator.tr("form-label-state")+" ---"
elOptNew.text=val;
if(elOptNew.value==GLAfK)elOptNew.selected=true
try{
mxJRO.add(elOptNew,null);
}
catch(ex){
mxJRO.add(elOptNew);
}
}
}
function WA_marketChangeFormCountry(HtNOf)
{
var AAqxc=bKCQt();
var aHOok=AAqxc.lnxDK
var XFGct=aHOok.ClOgC
var mxJRO=document.getElementById("wa-select-form-country");
if(mxJRO) XFGct=mxJRO.value;
html_SetDisplay("wa-market-state",(XFGct=="US")||(XFGct=="CA")||(XFGct=="BR"))
var imEsj=document.getElementById("wa-select-state");
if(imEsj)
{
if(XFGct=="US") OSdDf(HtNOf,imEsj,["","Alabama","Alaska","Arizona","Arkansas","Armed Forces Americas(exc.Canada)","Armed Forces Eur, ME, Afr, CDN","Armed Forces Pacific","California","Colorado","Connecticut","D.C.","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington(State)","West Virginia","Wisconsin","Wyoming"])
if(XFGct=="CA") OSdDf(HtNOf,imEsj,["","Alberta","British Columbia","Manitoba","New Brunswick","Newfoundland and Labrador","Northwest Territories","Nova Scotia","Nunavut","Ontario","Prince Edward Isl.","Quebec","Saskatchewan","Yukon Territory"])
if(XFGct=="BR") OSdDf(HtNOf,imEsj,["","Acre(AC)","Alagoas(AL)","Amapá(AP)","Amazonas(AM)","Bahia(BA)","Ceará(CE)","Espírito Santo(ES)","Goiás(GO)","Maranhão(MA)","Mato Grosso(MT)","Mato Grosso do Sul(MS)","Minas Gerais(MG)","Pará(PA)","Paraíba(PB)","Paraná(PR)","Pernambouc(PE)","Piauí(PI)","Rio de Janeiro(RJ)","Rio Grande do Norte(RN)","Rio Grande do Sul(RS)","Rondônia(RO)","Roraima(RR)","Santa Catarina(SC)","São Paulo(SP)","Sergipe(SE)","Tocantins(TO)","District fédéral(DF)"])
}
}
function WA_marketCheckBillingAdress(atAtu)
{
var AAqxc=bKCQt();
var aHOok=AAqxc.lnxDK
aHOok.mfIwd=atAtu.checked
aHOok.XOram()
}
function TEDem()
{
var AAqxc=bKCQt();


var SYmlS=new WA_Dialog();
SYmlS.oUJFp=function()
{
if(AAqxc.lnxDK.LVCVG=="paypal")
{
WA_displayDialogMarketCart();return;
}
if(AAqxc.lnxDK.mfIwd)
cDBAv(quaLC)
else
cDBAv(OZmLl)
}
SYmlS.OCknr=function(Dkref,ItsTu)
{
ItsTu=""+ItsTu
ItsTu=ItsTu.replace(/'/g,"&lsquo;")
return "<input type=hidden name='"+Dkref+"' value=\""+ItsTu+"\">"
}
SYmlS.xfICi=function()
{
var AAqxc=bKCQt();
var iYgLA=""
var SSakT=CONST_WA_GLOBAL_SETTINGS.currency_info
if(SSakT.charCodeAt(3)>=100) return""
iYgLA+="<form id='wa-http-sender' accept-charset='UTF-8' method=POST action='https://www.paypal.com/cgi-bin/webscr' target='_blank'>"
iYgLA+=this.OCknr("cmd","_cart")
iYgLA+=this.OCknr("business",CONST_WA_GLOBAL_SETTINGS.email_paypal_account)
iYgLA+=this.OCknr("upload","1")
iYgLA+=this.OCknr("charset","utf-8")
iYgLA+=this.OCknr("no_note","0")
iYgLA+=this.OCknr("currency_code",CONST_WA_GLOBAL_SETTINGS.currency_code)
iYgLA+=this.OCknr("no_shipping","2")
var ORPHb=AAqxc.FpPOn()
for(var i=0;i<ORPHb.length;i++)
{
var info=ORPHb[i];
var index=i+1;
var nZtpc=info.JBCOB();
if(AAqxc.plaHQ())
{
var tFMiW=AAqxc.oaXeO(AAqxc.jLkDi(nZtpc));
nZtpc=nZtpc-tFMiW;
}
iYgLA+=this.OCknr("amount_"+index,""+nZtpc)
iYgLA+=this.OCknr("quantity_"+index,info.iZgvO)
var ucioo=0;
if(info.QXsQC.length>0)
{
iYgLA+=this.OCknr("on"+ucioo+"_"+index,"ref")
iYgLA+=this.OCknr("os"+ucioo+"_"+index,info.QXsQC)
ucioo++;
}
var rJWMP=""
if(info.m_opt_vals)
{
for(var i_opt=0;i_opt<info.dvdMH.options.length;i_opt++)
{
var pMGLe=info.dvdMH.options[i_opt]
if(pMGLe)
{
var acPoW=info.m_opt_vals[i_opt];
var LAYiZ=pMGLe.vals[acPoW]
var HRinf=pMGLe.title;
if(HRinf.length==0) HRinf="opt"+(i_opt+1);
iYgLA+=this.OCknr("on"+ucioo+"_"+index,HRinf)
iYgLA+=this.OCknr("os"+ucioo+"_"+index,LAYiZ)
if(rJWMP.length>0)rJWMP=rJWMP+", "
rJWMP+=LAYiZ
ucioo++;
}
}
}
var JHsqB=info.ZgQwB;
if(rJWMP.length>0)JHsqB=JHsqB+"("+rJWMP+")"
iYgLA+=this.OCknr("item_name_"+index,JHsqB) 
}
var ppqGB=AAqxc.FIbDX()
if(AAqxc.plaHQ())
{
ppqGB=ppqGB-AAqxc.oaXeO(AAqxc.jLkDi(ppqGB));
}
if(AAqxc.plaHQ())
{
var GeMcH=AAqxc.pEiIP();
var gdpmm=AAqxc.FIbDX()
var Cvvuf=GeMcH+gdpmm;
var Gbmqe=AAqxc.oaXeO(AAqxc.jLkDi(Cvvuf));
var rTiBH=Cvvuf-Gbmqe;
rTiBH=rTiBH-ppqGB;
var ZXcxJ=0;
for(var i=0;i<ORPHb.length;i++)
{
var info=ORPHb[i];
var index=i+1;
var pOodx=0;
var EGnQj=0;
var nZtpc=info.iZgvO*info.JBCOB();
var n0=AAqxc.WnGNk()/100;
var tax=nZtpc*(n0/(1+n0));
nZtpc=nZtpc-tax;
pOodx=nZtpc;
var viujV=info.JBCOB();
var tFMiW=AAqxc.oaXeO(AAqxc.jLkDi(viujV));
viujV=viujV-tFMiW;
EGnQj=info.iZgvO*viujV;
if(EGnQj>pOodx)
{
viujV=info.m_price;
viujV=viujV-tFMiW;
var bGpMr=viujV;
if((bGpMr>0)&&(bGpMr!=info.JBCOB()))
{
bGpMr=bGpMr-0.01;
}
iYgLA+=this.OCknr("amount_"+index,bGpMr) 
EGnQj=info.m_quantity*bGpMr;
}
ZXcxJ+=EGnQj;
}
var nxqNn=AAqxc.oaXeO(rTiBH-ZXcxJ);
if(nxqNn>0)
{
var index=ORPHb.length+1;
iYgLA+=this.OCknr("item_name_"+index,Translator.tr("TVA correction"))
iYgLA+=this.OCknr("quantity_"+index,1)
iYgLA+=this.OCknr("amount_"+index,nxqNn)
}
iYgLA+=this.OCknr("tax_cart",Gbmqe)
}
else
{
iYgLA+=this.OCknr("tax_cart",AAqxc.mLwfg())
}
iYgLA+=this.OCknr("handling_cart",ppqGB) 
iYgLA+="</form>"
return iYgLA;
}
SYmlS.YHMFs=function()
{
var BrspZ=this.WxfZX(OZmLl);
var iYgLA="";
if(BrspZ.length>0)
{
iYgLA+=""+Translator.tr("Shipping information")+":\n";
iYgLA+=BrspZ;
}
return iYgLA;
}
SYmlS.sAXnj=function()
{
var BrspZ=this.WxfZX(quaLC);
var iYgLA="";
if(BrspZ.length>0)
{
iYgLA+=Translator.tr("Billing information")+":\n";
iYgLA+=BrspZ;
}
return iYgLA;
}
SYmlS.WxfZX=function(HtNOf)
{
var AAqxc=bKCQt();
var aHOok=AAqxc.lnxDK
var iYgLA="";
var nRcID=new Array();
var RpxGm=qjsJx(CONST_WA_GLOBAL_SETTINGS.list_form_fields)
RpxGm.push("country")
RpxGm.push("state")
for(var i=0;i<RpxGm.length;i++)
{
var Pnbff=RpxGm[i];
nRcID[Pnbff]=aHOok.AuSDU(Pnbff,HtNOf)
}
if(nRcID["firstname"])iYgLA+=nRcID["firstname"]+"\n"
if(nRcID["lastname"])iYgLA+=nRcID["lastname"]+"\n"
if(nRcID["company"])
{
iYgLA+=Translator.tr("form-label-company")+" : "+nRcID["company"]+"\n"
}
if(nRcID["fiscal_code"]) iYgLA+=Translator.tr("form-label-fiscal_code")+" : "+nRcID["fiscal_code"]+"\n"
if(nRcID["tva"]) iYgLA+=Translator.tr("form-label-tva")+" : "+nRcID["tva"]+"\n"
if(nRcID["address_1"]) iYgLA+=nRcID["address_1"]+"\n"
if(nRcID["address_2"]) iYgLA+=nRcID["address_2"]+"\n"
if(nRcID["zip"]) iYgLA+=nRcID["zip"]+" "
if(nRcID["city"]) iYgLA+=nRcID["city"]+"\n"
if(nRcID["country"])iYgLA+=Translator.country(nRcID["country"])
if(nRcID["state"]&&nRcID["state"].length>0) iYgLA+=" "+nRcID["state"];
iYgLA+="\n"
if(nRcID["phone"]) iYgLA+=Translator.tr("form-label-phone")+" : "+nRcID["phone"]+"\n"
if(nRcID["fax"]) iYgLA+=Translator.tr("form-label-fax")+" : "+nRcID["fax"]+"\n"
if(nRcID["email"]) iYgLA+=nRcID["email"]+"\n" 
if(nRcID["comment"])
{
iYgLA+=Translator.tr("form-label-comment")+" : \n";
iYgLA+=nRcID["comment"]+"\n"
}
return iYgLA;
}
SYmlS.OswHY=function()
{
var AAqxc=bKCQt();
var iYgLA="";
var ORPHb=AAqxc.FpPOn();
iYgLA+="**************\n"
for(var i=0;i<ORPHb.length;i++)
{
var aHOok=ORPHb[i];
var index=i+1;
var JHsqB=aHOok.ZgQwB;
if(aHOok.QXsQC.length>0)
{
JHsqB+=" ["+aHOok.QXsQC+"]";
}
var rJWMP=""
if(aHOok.m_opt_vals)
{
for(var i_opt=0;i_opt<aHOok.dvdMH.options.length;i_opt++)
{
var pMGLe=aHOok.dvdMH.options[i_opt]
if(pMGLe)
{
if(rJWMP.length>0)rJWMP=rJWMP+", "
var acPoW=aHOok.m_opt_vals[i_opt];
var LAYiZ=pMGLe.vals[acPoW]
var HRinf=pMGLe.title;
if(HRinf.length>0) rJWMP+=HRinf+" : "
rJWMP+=LAYiZ
}
}
}
if(rJWMP.length>0)JHsqB=JHsqB+"\n("+rJWMP+")"
iYgLA+=JHsqB;
iYgLA+="\n"
iYgLA+=Translator.tr("Price")+" : "+AAqxc.Qsgqi(aHOok.JBCOB())+"\n"
iYgLA+=Translator.tr("Quantity")+" : "+aHOok.iZgvO+"\n"
iYgLA+=Translator.tr("Total")+" : "+AAqxc.Qsgqi(aHOok.JBCOB()*aHOok.iZgvO);
iYgLA+="\n"
iYgLA+="**************\n"
}
var VLXeH=AAqxc.pEiIP()
var doXwm=AAqxc.mLwfg()
var vgPfv=AAqxc.FIbDX()
var WhaAb=AAqxc.FLaMx()
var rWvOR=AAqxc.jueJt() 
iYgLA+=Translator.tr("Sub total")+" : "+AAqxc.Qsgqi(VLXeH)+"\n";
if(CONST_WA_GLOBAL_SETTINGS.shipping_type!=pUZRs)
{
iYgLA+=Translator.tr("Shipping amount")+" : "+AAqxc.Qsgqi(vgPfv)+"\n";
}
if(AAqxc.plaHQ()||AAqxc.VDudo())
{
if(AAqxc.plaHQ())
{
iYgLA+=Translator.tr("Tax included");
}
if(AAqxc.VDudo())
{
iYgLA+=Translator.tr("Extra Tax");
}
iYgLA+=" : ";
iYgLA+=AAqxc.Qsgqi(doXwm)+"\n";
}
if(rWvOR>0)
{
iYgLA+=Translator.tr("Promotion")+" : - "+AAqxc.Qsgqi(rWvOR)+"\n";
}
iYgLA+=Translator.tr("Total")+" : "+AAqxc.Qsgqi(WhaAb)+"\n";
return iYgLA;
}
SYmlS.PgHdI=function()
{
var AAqxc=bKCQt();
var iYgLA="";
var ORPHb=AAqxc.FpPOn()
iYgLA+="<table class=wa-cart-global-table >"
iYgLA+="<tr class=wa-cart-title >"
iYgLA+="<td>&nbsp;</td>"
iYgLA+="<td>"+Translator.tr("Price")+"</td>"
iYgLA+="<td>"+Translator.tr("Quantity")+"</td>"
iYgLA+="<td>"+Translator.tr("Total")+"</td>"
iYgLA+="</tr>"
for(var i=0;i<ORPHb.length;i++)
{
iYgLA+="<tr>"
var aHOok=ORPHb[i];
var index=i+1;
iYgLA+="<td>"
var JHsqB=aHOok.ZgQwB;
if(aHOok.QXsQC.length>0)
{
JHsqB+=" ["+aHOok.QXsQC+"]";
}
JHsqB="<b>"+JHsqB+"</b>"
var rJWMP=""
if(aHOok.m_opt_vals)
{
for(var i_opt=0;i_opt<aHOok.dvdMH.options.length;i_opt++)
{
var pMGLe=aHOok.dvdMH.options[i_opt]
if(pMGLe)
{
if(rJWMP.length>0)rJWMP=rJWMP+", "
var acPoW=aHOok.m_opt_vals[i_opt];
var LAYiZ=pMGLe.vals[acPoW]
var HRinf=pMGLe.title;
if(HRinf.length>0) rJWMP+=HRinf+" : "
rJWMP+=LAYiZ
}
}
}
if(rJWMP.length>0)JHsqB=JHsqB+"<br><span class=wa-cart-option >("+rJWMP+")</span>"
iYgLA+=JHsqB;
iYgLA+="</td>"
iYgLA+="<td>"+AAqxc.rNXfq(aHOok.JBCOB())+"</td>"
iYgLA+="<td>"+aHOok.iZgvO+"</td>"
iYgLA+="<td>"+AAqxc.rNXfq(aHOok.JBCOB()*aHOok.iZgvO)+"</td>"
iYgLA+="</tr>"
}
iYgLA+="<tr><td colspan=4>"
var VLXeH=AAqxc.pEiIP()
var doXwm=AAqxc.mLwfg()
var vgPfv=AAqxc.FIbDX()
var WhaAb=AAqxc.FLaMx()
var rWvOR=AAqxc.jueJt() 
iYgLA+="<table class=wa-cart-table-total >"
iYgLA+="<tr><td align=right >"+Translator.tr("Sub total")+" : "+AAqxc.rNXfq(VLXeH)+"</td></tr>";
if(CONST_WA_GLOBAL_SETTINGS.shipping_type!=pUZRs)
{
iYgLA+="<tr><td align=right>"+Translator.tr("Shipping amount")+" : "+AAqxc.rNXfq(vgPfv)+"</td></tr>";
}
if(AAqxc.plaHQ()||AAqxc.VDudo())
{
if(AAqxc.plaHQ())
{
iYgLA+="<tr><td align=left >"+Translator.tr("Tax included");
}
if(AAqxc.VDudo())
{
iYgLA+="<tr><td align=right >"+Translator.tr("Extra Tax");
}
iYgLA+=" : ";
iYgLA+=AAqxc.rNXfq(doXwm)+"</td></tr>";
}
if(rWvOR>0)
{
iYgLA+="<tr><td align=right class=wa-cart-promo >"+Translator.tr("Promotion")+" : - "+AAqxc.rNXfq(rWvOR)+"</td></tr>";
}
iYgLA+="<tr><td align=right class=wa-cart-total >"+Translator.tr("Total")+" : "+AAqxc.rNXfq(WhaAb)+"</td></tr>";
iYgLA+="</table>" 
iYgLA+="</td></tr>"
iYgLA+="</table>"
iYgLA=iYgLA.replace(/\"/g,"'")
return iYgLA;
}
SYmlS.IawTp=function(ItsTu)
{
if((""+ItsTu).length==1)ItsTu="0"+ItsTu;
return ItsTu
}
SYmlS.HkLsS=function()
{
var AAqxc=bKCQt();
var aHOok=AAqxc.lnxDK
var SSakT=CONST_WA_GLOBAL_SETTINGS.currency_info
var iYgLA=""
if(SSakT.charCodeAt(3)>=100) return""
if(VNvQW)
{
iYgLA+="<form id='wa-http-sender' accept-charset='UTF-8' method=POST action='"+VNvQW_URL+"crbst_market_print_form.php' target='_blank'>"
}
else
{
iYgLA+="<form id='wa-http-sender' accept-charset='UTF-8' method=POST action='crbst_market_print_form.php' target='_blank'>"
}
iYgLA+=this.OCknr("type_payment",aHOok.LVCVG)
iYgLA+=this.OCknr("MAIL_TITLE_PREFIXE",Translator.tr("title email Order notification"))
iYgLA+=this.OCknr("MAIN_TITLE",Translator.tr("PRINT_FORM_MAIN_TITLE"))
iYgLA+=this.OCknr("PREFIXE_ORDER",Translator.tr("PRINT_FORM_PREFIXE_ORDER"))
var pwSXO=""
var blETO=new Date()
pwSXO+="wa-"+this.IawTp(blETO.getYear()-100)+this.IawTp(blETO.getMonth()+1)+this.IawTp(blETO.getDate())
pwSXO+=blETO.getHours()+this.IawTp(blETO.getMinutes())+this.IawTp(blETO.getSeconds())
pwSXO+="-"+Math.round(Math.random()*100) 
iYgLA+=this.OCknr("ID_ORDER",pwSXO)
iYgLA+=this.OCknr("CARD_TITLE",Translator.tr("PRINT_FORM_CARD_TITLE"))
iYgLA+=this.OCknr("LABEL_TYPE_PAYMENT",Translator.tr("PRINT_FORM_LABEL_TYPE_PAYMENT"))
iYgLA+=this.OCknr("send_copy_email_to_buyer",(AAqxc.send_copy_email_to_buyer)?"1":"0") 

var nRcID=new Array();
var RpxGm=qjsJx(CONST_WA_GLOBAL_SETTINGS.list_form_fields)
RpxGm.push("country")
RpxGm.push("state")
for(var i=0;i<RpxGm.length;i++)
{
var Pnbff=RpxGm[i];
nRcID[Pnbff]=AAqxc.lnxDK.AuSDU(Pnbff,OZmLl)
}
iYgLA+=this.OCknr("form_first_name",nRcID["firstname"]);
iYgLA+=this.OCknr("form_last_name",nRcID["lastname"]);
iYgLA+=this.OCknr("form_address1",nRcID["address_1"]);
iYgLA+=this.OCknr("form_address2",nRcID["address_2"]);
iYgLA+=this.OCknr("form_city",nRcID["address_2"]);
iYgLA+=this.OCknr("form_zip",nRcID["zip"]);
iYgLA+=this.OCknr("form_state",nRcID["state"]);
iYgLA+=this.OCknr("form_country",nRcID["country"]);
iYgLA+=this.OCknr("form_company",nRcID["company"]);
iYgLA+=this.OCknr("form_fiscal_code",nRcID["fiscal_code"]);
iYgLA+=this.OCknr("form_tva",nRcID["tva"]);
iYgLA+=this.OCknr("form_phone",nRcID["phone"]);
iYgLA+=this.OCknr("form_fax",nRcID["fax"]);
iYgLA+=this.OCknr("CARD_TOTAL_PRICE",AAqxc.FLaMx());
iYgLA+=this.OCknr("CARD_CURRENCY",CONST_WA_GLOBAL_SETTINGS.currency_code);
iYgLA+=this.OCknr("CARD_LANG",Translator.m_lang);
iYgLA+=this.OCknr("LABEL_PROCESS_ORDER",Translator.tr("PRINT_FORM_PROCESS_ORDER"));
iYgLA+=this.OCknr("wa_promo_code",AAqxc.lnxDK.RoxIF);
iYgLA+=this.OCknr("email_buyer",aHOok.AuSDU("email",OZmLl))
if(aHOok.LVCVG=="custom")
{
iYgLA+=this.OCknr("TYPE_PAYMENT",Translator.tr("PRINT_FORM_TYPE_CUSTOM"))
}
if(aHOok.LVCVG=="check")
{
iYgLA+=this.OCknr("TYPE_PAYMENT",Translator.tr("PRINT_FORM_TYPE_CHECK"))
iYgLA+=this.OCknr("MESSAGE_CHECK",Translator.tr("PRINT_FORM_MESSAGE_CHECK"))
}
if(aHOok.LVCVG=="wire")
{
iYgLA+=this.OCknr("TYPE_PAYMENT",Translator.tr("PRINT_FORM_TYPE_WIRE"))
iYgLA+=this.OCknr("MESSAGE_WIRE",Translator.tr("PRINT_FORM_MESSAGE_WIRE"))
}
if(aHOok.LVCVG=="paypal")
{
iYgLA+=this.OCknr("LABEL_PAYPAL_CART_TITLE",Translator.tr("PRINT_FORM_PAYPAL_CART_TITLE"));
iYgLA+=this.OCknr("TYPE_PAYMENT","Paypal")
iYgLA+=this.OCknr("MESSAGE_PAYPAL",Translator.tr("PRINT_FORM_MESSAGE_PAYPAL"))
}
iYgLA+=this.OCknr("LABEL_PRINT",Translator.tr("PRINT_FORM_LABEL_PRINT"))
iYgLA+=this.OCknr("card_html",this.PgHdI())
iYgLA+=this.OCknr("card_plain_text",this.OswHY())
iYgLA+=this.OCknr("LABEL_SELLER_INFORMATION",Translator.tr("Seller information"))
iYgLA+=this.OCknr("LABEL_BANK_ACCOUNT",Translator.tr("Bank account information"))
iYgLA+=this.OCknr("LABEL_ADDRESS",Translator.tr("Address"))
iYgLA+=this.OCknr("seller_address",CONST_WA_GLOBAL_SETTINGS.seller_address)
iYgLA+=this.OCknr("bank_account_informations",CONST_WA_GLOBAL_SETTINGS.bank_account_informations)
iYgLA+=this.OCknr("buyer_info_shipping",this.YHMFs())
var Exaog=""
if(aHOok.mfIwd)
{
Exaog=this.sAXnj();
};
iYgLA+=this.OCknr("buyer_info_billing",Exaog)
iYgLA+="</form>"
return iYgLA;
}
SYmlS.UxwEo=function()
{
var AAqxc=bKCQt();
AAqxc.HlmDq()
this.closeWin()
}
SYmlS.TLnWc=function()
{
var SSakT=CONST_WA_GLOBAL_SETTINGS.currency_info
var AAqxc=bKCQt();
var alGBK=true;
var aHOok=AAqxc.lnxDK 
if(aHOok.LVCVG=="paypal")
if((AAqxc.BgiNX==true)&&(CONST_WA_GLOBAL_SETTINGS.list_promo_codes==false))
{
alGBK=true;
}
if((alGBK==false)&&(aHOok.LVCVG=="paypal"))
{
this.addButton(Translator.tr('Clear cart'),this.UxwEo,[""],this)
this.initializeWindow(400,200)
}
else
{
this.initializeWindow(400,150)
}
var iYgLA=""
if((alGBK==false)&&(aHOok.LVCVG=="paypal"))
{
iYgLA+=this.xfICi()
}
if(alGBK)
{
iYgLA+=this.HkLsS()
if((VNvQW==false)&&(document.webaca_is_preview))
{
WA_Dialog.alert(Translator.tr("Operation not allowed in preview mode"))
return
}
}
iYgLA+="<table border=0 style='width:100%;'><tr>";
iYgLA+="<td align=center style='"+this.cssText1()+"'>"
iYgLA+=Translator.tr("You have been redirected to the payment page")
if((alGBK==false)&&(aHOok.LVCVG=="paypal"))
{
iYgLA+="<br><br>"
iYgLA+=Translator.tr("You can clear your cart")
}
iYgLA+="</td></tr></table>"
this.writeContent(iYgLA) 
if(SSakT.charCodeAt(3)>=100)
{
WA_Dialog.alert(Translator.tr("This cariboost edition can't support ebusiness features !'"))
return;
}
var UBcvS=document.getElementById("wa-http-sender")
UBcvS.submit()
if(alGBK)
{
AAqxc.HlmDq()
}
}
SYmlS.TLnWc()
}

-->
