<!--

var tlHBd=0
var FWxRT=1
var KearR=2
var pdPrf=0;
var RWtvb=1;
var brDQt=2;
var OXUZJ=0
var glCGH=1
var bnjvZ=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(NhHDs)
{
vjSPV().MBRir(NhHDs)
var FDIMs=WA_Dialog.getCurrent();
FDIMs.nXlgC()
}
function vjSPV()
{
if(document.wa_global_settings_market==undefined)document.wa_global_settings_market=new spkqs()
return document.wa_global_settings_market;
}
function UeWea()
{
this.heuYB=function()
{
return this.GYTif+"-"+this.emmUw_index
}
this.bhtgN=function(oFgwf,jKYsc)
{
this.emmUw=oFgwf.obj.market.info.folder.substring(13);
this.emmUw_index=oFgwf.obj.index;
this.emmUw_modif=oFgwf.obj.market.info.critical_id_modif
this.GYTif=oFgwf.obj.market.id 

this.PMUNR=1;
this.dgSaT=oFgwf.title;
this.BcwqC=oFgwf.price;
this.hZVQE=oFgwf.weight;
this.TbEMW=oFgwf.code_product;
}
this.hYhMb=function(oFgwf,jKYsc)
{

this.dgSaT=oFgwf.title;
this.BcwqC=oFgwf.price;
this.hZVQE=oFgwf.weight;
this.TbEMW=oFgwf.code_product;
}
this.qGtXF=function()
{
var s="";
s+=this.heuYB();
if(this.m_opt_vals)
for(var i=0;i<this.m_opt_vals.length;i++)
{
var qYQLt=this.m_opt_vals[i]
if(qYQLt!=-1) s+="/"+qYQLt;
}
return s;
}
this.bOnYC=function()
{
var val="";
val+="j="+this.emmUw+",";
val+="i="+this.emmUw_index+",";
val+="m="+this.emmUw_modif+",";
val+="q="+this.PMUNR+",";
if(this.m_opt_vals)
{
for(var i=0;i<this.m_opt_vals.length;i++)
{
val+="o"+i+"=";
var wYjaN=this.m_opt_vals[i]
if(wYjaN>-1)
val+=wYjaN
else
val+=""
val+=","
}
}
return val;
}
this.NOkEi=function(map,k)
{
var v=map[k];
if(v=="undefined") return "";
return v;
}
this.tPvcu=function(map)
{
this.emmUw=this.NOkEi(map,"j");
if(this.emmUw=="") return false;
this.emmUw_index=this.NOkEi(map,"i");
this.emmUw_modif=this.NOkEi(map,"m");
this.PMUNR=parseInt(map["q"]);
this.m_opt_vals=new Array();
for(var i=0;i<3;i++)
{
var QbmqO=parseInt(map["o"+i]);
if(isNaN(QbmqO))QbmqO=-1;
this.m_opt_vals.push(QbmqO)
}
return true;
}
this.ntqLJ=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.oEbBK=function(DsQGd)
{
var Bxlgd=this.ntqLJ(DsQGd)
return this.tPvcu(Bxlgd) 
}
this.TjbXk=function()
{
return iwXsI(this.oFgwf,this.m_opt_vals)
}
}
function cWXQa(rFDZr,pxpcD)
{
var YIDwX=rFDZr[0]
var dsxbX=rFDZr[1]
var KTraT=rFDZr[2]
if(YIDwX.length==0)
{
KTraT.call(dsxbX)
return;
}
var js=YIDwX.pop()
WA_loadScript(js.src,cWXQa,[YIDwX,dsxbX,KTraT]);
}
function WA_arrayContains(dcSQo,DsQGd)
{
for(var n=0;n<dcSQo.length;n++){if(dcSQo[n]==DsQGd)return true;}
return false;
}
function TBXxB(dcSQo)
{
var Bxlgd=new Array()
for(var n=0;n<dcSQo.length;n++)
{
var YdLEG=dcSQo[n]
if(YdLEG=="address") Bxlgd=Bxlgd.concat(["address_1","address_2","city","zip"])
else Bxlgd.push(YdLEG)
}
return Bxlgd;
}
function nhOSH()
{
this.qxxnO=function()
{
if(this.pmdUW.length==0)return CONST_WA_GLOBAL_SETTINGS.default_selected_country;
return this.pmdUW;
}
this.AXWCo=function()
{
this.joGMb()
}
this.ntqLJ=function(s)
{
var TftSX=new Array();
var tab=s.split(",");
for(var i=0;i<tab.length;i++)
{
var tab3=tab[i].split("=");
if(tab3.length==2)TftSX[tab3[0]]=tab3[1];
}
return TftSX;
}
this.eDbBG=function(sdTNA)
{
if(sdTNA==undefined) return ""
return(sdTNA==OXUZJ)?"deliv-":"bill-"
}
this.xOcVe=function(cXHeU,sdTNA,wBepI)
{
if(!wBepI)wBepI=""
var rtqEw=this.eDbBG(sdTNA)
if(cXHeU=="country")
{
if(sdTNA==OXUZJ) return this.pmdUW
if(sdTNA==glCGH) cXHeU="countryCode"
}
if(cXHeU=="state")
{
cXHeU="stateCode"
}
var qYQLt=this.VJMJn[rtqEw+cXHeU]
if(!qYQLt) return wBepI
qYQLt=qYQLt.replace(/\"/g,"'")
return qYQLt
}
this.BGabC=function(qYQLt)
{
if(qYQLt==undefined)return ""
return qYQLt
}
this.UhQFr=function(key,val)
{
if((val==null)||(val==undefined)) val="";
WA_SetCookie("crbst-card-"+key,val)
}
this.XjbJM=function(key)
{
var dsxbX=WA_GetCookie("crbst-card-"+key)
if(dsxbX=="null")dsxbX="";
return ""+dsxbX
}
this.eOmaP=function()
{
this.VJMJn=new Array()
var DsQGd=this.XjbJM("order-infos")
var Bxlgd=this.ntqLJ(DsQGd)
for(var k1 in Bxlgd)
{
var qYQLt=Bxlgd[k1]
if((k1.indexOf("deliv-")==0)||(k1.indexOf("bill-")==0))
this.VJMJn[k1]=unescape(qYQLt)
}
this.pmdUW=this.BGabC(Bxlgd["countryCode"])
if(this.oQUEu.length==0)
{
this.oQUEu=this.BGabC(Bxlgd["typePayment"])
}
this.nawfp=(this.BGabC(Bxlgd["differentBillingAddressChecked"])=="true")
this.SUJlQ=(this.BGabC(Bxlgd["salesConditionChecked"])=="true")
}
this.joGMb=function()
{
var DsQGd=""
for(var k1 in this.VJMJn)
{
var qYQLt=this.VJMJn[k1]
DsQGd+=k1+"="+escape(qYQLt)+","
}
var GHtHh=""
GHtHh+="countryCode="+escape(this.pmdUW)+","
GHtHh+="typePayment="+escape(this.oQUEu)+","
GHtHh+="differentBillingAddressChecked="+(this.nawfp)+","
GHtHh+="salesConditionChecked="+(this.SUJlQ)+","
DsQGd+=GHtHh 
this.UhQFr("order-infos",DsQGd)
}
this.qBdXZ=function(cEdAq)
{
if(trimString(cEdAq.value).length==0)
{
cEdAq.style.backgroundColor="#ff0000"
cEdAq.focus()
return false;;
}
cEdAq.style.backgroundColor=""
return true;
}
this.JoLRp=function(sdTNA)
{
var NVoNB=TBXxB(CONST_WA_GLOBAL_SETTINGS.list_form_fields)
var lMRCS=TBXxB(CONST_WA_GLOBAL_SETTINGS.list_mandatory_form_fields) 
var kKadu=this.VJMJn;
var rtqEw=this.eDbBG(sdTNA) 
var BEBtE=document.getElementById("wa-market-form")
for(var n=0;n<NVoNB.length;n++)
{
var DoRDx=NVoNB[n]
var YqLMb=BEBtE[DoRDx]
var qYQLt=trimString(YqLMb.value)
if(DoRDx!="address_2")
if(WA_arrayContains(lMRCS,DoRDx))
{
if(this.qBdXZ(YqLMb)==false)return false;
}
kKadu[rtqEw+DoRDx]=qYQLt
}
var URdHi=document.getElementById("wa-select-state");
var ILuTq=document.getElementById("wa-market-state");
if(URdHi&&(ILuTq.style.display!="none"))
{
if(this.qBdXZ(URdHi)==false)return false;
kKadu[rtqEw+"stateCode"]=URdHi.value
}
else
{
kKadu[rtqEw+"stateCode"]=""
}
if(sdTNA==glCGH)
{
var KFbeB=document.getElementById("wa-select-form-country");
if(KFbeB)
{
kKadu[rtqEw+"countryCode"]=KFbeB.value
}
}
this.joGMb()
return true;
}
this.afnoN=""
this.pmdUW=""
this.oQUEu=""
this.nawfp=false;
this.SUJlQ=false
this.eOmaP()
}
function spkqs()
{
this.dcBMC=new Array();
this.dsxbX_callback=false;
this.WBQmE=false;
this.jkgWN=false;
this.wmSwk=new nhOSH()
this.vwUfk=CONST_WA_GLOBAL_SETTINGS.use_native_paypal_cart;
this.JCdvh=function(dsxbX,KTraT)
{
this.dsxbX_callback=dsxbX
this.WBQmE=KTraT 
var ruvJA=this.XjbJM("data")
this.biQFQ(ruvJA) 
var YIDwX=new Array()
var dcSQo=this.dcBMC;
for(var i=0;i<dcSQo.length;i++)
{
var IqBOg=dcSQo[i];
var AnEKQ=Translator.m_lang_for_filename
if(AnEKQ.length>0)AnEKQ="_"+AnEKQ;
var VauIA=IqBOg.emmUw;
var n=VauIA.indexOf("_")
if(n>-1)VauIA=VauIA.substring(n+1)
IqBOg.GYTif="wa-id-"+VauIA 
var FHKKw=wa_global_market.markets[IqBOg.GYTif]
if(this.jkgWN==false)
if(!FHKKw)
{
var eqwWo="crbst_market_"+IqBOg.emmUw+'/'
WA_declareMarket(IqBOg.GYTif,eqwWo,IqBOg.emmUw_modif) 
var rVYEf=eqwWo+'market-definition'+AnEKQ+'.js?v='+IqBOg.emmUw_modif
YIDwX.push({id:VauIA,src:rVYEf})
}
}
cWXQa([YIDwX,this,this.QQCZg],true)
}
this.TjCkG=function()
{
this.UhQFr("data","")
this.wmSwk.UhQFr("order-infos","")
this.wmSwk.eOmaP()
this.biQFQ("")
}
this.QQCZg=function()
{
this.jkgWN=true;
var dcSQo=this.dcBMC;
var NEDLK=new Array();
for(var i=0;i<dcSQo.length;i++)
{
var IqBOg=dcSQo[i];
var VauIA=IqBOg.GYTif
var cUmRq=wa_global_market.markets[VauIA] 

if(cUmRq.info)
{
var pwkxd=cUmRq.info.products 
var jKYsc=IqBOg.emmUw_index
var oFgwf=pwkxd[jKYsc]
IqBOg.oFgwf=oFgwf
IqBOg.hYhMb(IqBOg.oFgwf,jKYsc)
if((oFgwf.unavail==false)&&(IqBOg.emmUw_modif==cUmRq.info.critical_id_modif))
{
NEDLK.push(IqBOg)
}
}
else
{
}
}
this.dcBMC=NEDLK
this.cFroD() 

this.WBQmE.call(this.dsxbX_callback)
}
this.biQFQ=function(kRvlk)
{
var dcSQo=new Array();
var list_string_products=kRvlk.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 IqBOg=new UeWea();
if(IqBOg.oEbBK(s_data))
{
dcSQo.push(IqBOg);
}
}
}
this.dcBMC=dcSQo;
var xsRbN=this.WLxfw()
if(WA_getNumberMarketItemsInCart()!=xsRbN)
{
this.EDQJK()
this.ovCNS()
}
}
this.wcmHX=function()
{
var bTJfc=''
try{bTJfc=CONST_WA_GLOBAL_SETTINGS.currency_mnemonic}catch(e){}
return bTJfc
}
this.MBRir=function(NhHDs)
{
var list2=new Array();
var dcSQo=this.dcBMC
for(var i=0;i<dcSQo.length;i++)
{
var IqBOg=dcSQo[i];
if(i!=NhHDs)
{
list2.push(IqBOg);
}
}
this.dcBMC=list2;
this.cFroD()
}
this.addProductToShoppingCard=function(oFgwf,optionsValues)
{
if(this.lPLAu()==false)
{
WA_Dialog.alert(Translator.tr("You can't use shopping card Your browser doesnt accept cookies !"));
return false;
}
var WYMlr=oFgwf.obj
var dcSQo=this.ZjxCe();
var n=dcSQo.length
var CLLnL=new UeWea()
CLLnL.bhtgN(oFgwf,n);
CLLnL.m_opt_vals=optionsValues
var b_match=false;
for(var i=0;i<dcSQo.length;i++)
{
var IqBOg=dcSQo[i];
if(IqBOg.qGtXF()==CLLnL.qGtXF())
{
b_match=true;
IqBOg.PMUNR++;
}
}
if(b_match==false)
{
var ruvJA=this.XjbJM("data")
var cPHPn=CLLnL.bOnYC()
var lHbpi=ruvJA.length+cPHPn.length 
if(lHbpi>4000)
{
WA_Dialog.alert(Translator.tr("Cookies cart contains max data !"));
return false;
}
dcSQo.push(CLLnL);
}
return true
}
this.VdnIr=function()
{
var dcSQo=this.dcBMC
var ruvJA="";
for(var i=0;i<dcSQo.length;i++)
{
var info=dcSQo[i];
ruvJA+=info.bOnYC()+";";
}
return ruvJA;
}
this.WLxfw=function()
{
var PVKiQ=0;
var dcSQo=this.dcBMC;
for(var i=0;i<dcSQo.length;i++)
{
var IqBOg=dcSQo[i];
PVKiQ+=IqBOg.PMUNR
}
return PVKiQ;
}
this.EDQJK=function()
{
this.UhQFr("nb_items",this.WLxfw())
}
this.cFroD=function()
{
var dcSQo=this.dcBMC
var ruvJA=this.VdnIr()
this.UhQFr("data",ruvJA)
this.EDQJK()
this.ovCNS();
}
this.ovCNS=function()
{
WA_refreshNumberMarketItemsInCart()
}
this.ZjxCe=function()
{
return this.dcBMC;
}
this.lPLAu=function()
{
this.UhQFr("watestcookies","test")
return(this.XjbJM("watestcookies")=="test");
}
this.UhQFr=function(key,val)
{
if((val==null)||(val==undefined)) val="";
WA_SetCookie("crbst-card-"+key,val)
}
this.XjbJM=function(key)
{
var dsxbX=WA_GetCookie("crbst-card-"+key)
if(dsxbX=="null")dsxbX="";
return ""+dsxbX
}
this.ubHib=function(v)
{
return WA_formatPrice(v)
}
this.vunhW=function(v)
{
return WA_basicFormatPrice(v)+" "+CONST_WA_GLOBAL_SETTINGS.currency_code;
}
this.NYTPJ=function(TwSQq)
{
return Math.round(TwSQq*100)/100
}
this.uLFri=function()
{
var dcSQo=this.ZjxCe()
var price=0;
for(var i=0;i<dcSQo.length;i++)
{
var IqBOg=dcSQo[i];
price+=(IqBOg.TjbXk()*IqBOg.PMUNR);
}
return price;
}
this.OEvHd=function()
{
var TwSQq=this.uLFri()
var jvucQ=0;
var dcSQo=CONST_WA_GLOBAL_SETTINGS.list_promo_codes
for(var i=0;i<dcSQo.length;i++)
{
var KgLPP=dcSQo[i];
if(MD5(trimString(this.wmSwk.afnoN.toUpperCase()))==KgLPP.c)
{
if(KgLPP.v.indexOf("%")>-1)
{
var jvucQ=parseFloat(KgLPP.v)/100;
return TwSQq*jvucQ;
}
else
{
return parseFloat(KgLPP.v);
}
break;
}
}
return 0;
}
this.eJuFV=function(tZgMH)
{
var FJvKL=0;
var ojmHX=CONST_WA_GLOBAL_SETTINGS.shipping_type
if(ojmHX==tlHBd)return FJvKL;
var TbxBb=CONST_WA_GLOBAL_SETTINGS.shipping_intervals
for(var i=0;i<TbxBb.length;i++)
{
var mxWoa=TbxBb[i];
if(mxWoa.v<tZgMH)FJvKL=mxWoa.p
}
return FJvKL;
}
this.WTNwi=function(SFapY,tZgMH)
{
var Bxlgd=CONST_WA_GLOBAL_SETTINGS.TftSX_list_extra_shipping_by_country_code
if(Bxlgd==undefined)
{
Bxlgd=new Array()
CONST_WA_GLOBAL_SETTINGS.TftSX_list_extra_shipping_by_country_code=Bxlgd;
var OgAKu=CONST_WA_GLOBAL_SETTINGS.list_extra_shipping_by_country_code
for(var NhHDs in OgAKu)
{
var iETHs=OgAKu[NhHDs];
var RwURi=iETHs.c
for(var jpQIj in RwURi)
{
var JNUfs=RwURi[jpQIj];Bxlgd[JNUfs]=iETHs.p;
}
}
}
var TbxBb=Bxlgd[SFapY]
if(TbxBb==undefined) return 0;
var extra_val=0;
for(var i=0;i<TbxBb.length;i++)
{
var mxWoa=TbxBb[i];
if(mxWoa.v<tZgMH)extra_val=mxWoa.p
}
if(isNaN(extra_val)) extra_val=0;
return extra_val;
}
this.RCtlT=function(SFapY)
{
var Bxlgd=CONST_WA_GLOBAL_SETTINGS.TftSX_list_tva_by_country_code
if(Bxlgd==undefined)
{
Bxlgd=new Array()
CONST_WA_GLOBAL_SETTINGS.TftSX_list_tva_by_country_code=Bxlgd;
var OgAKu=CONST_WA_GLOBAL_SETTINGS.list_tva_by_country_code
for(var NhHDs in OgAKu)
{
var iETHs=OgAKu[NhHDs];
var RwURi=iETHs.c;
for(var jpQIj in RwURi)
{
var JNUfs=RwURi[jpQIj];Bxlgd[JNUfs]=iETHs.p;
}
}
}
return Bxlgd[SFapY];
}
this.dPrDo=function()
{
var ojmHX=CONST_WA_GLOBAL_SETTINGS.shipping_type
var dcSQo=this.ZjxCe()
var Lpgkl=0;
for(var i=0;i<dcSQo.length;i++)
{
var IqBOg=dcSQo[i];
if(ojmHX==FWxRT)
{
Lpgkl+=(IqBOg.PMUNR*IqBOg.TjbXk());
}
if(ojmHX==KearR)
{
Lpgkl+=(IqBOg.PMUNR*IqBOg.hZVQE);
}
}
if(ojmHX==FWxRT)
{
Lpgkl-=this.OEvHd()
}
var pmdUW=this.wmSwk.pmdUW;
var wxvGg=0;
wxvGg+=this.eJuFV(Lpgkl);
wxvGg+=this.WTNwi(pmdUW,Lpgkl);
return this.NYTPJ(wxvGg);
}
this.aHFeX=function()
{
return CONST_WA_GLOBAL_SETTINGS.tva_type==RWtvb
}
this.pUjYP=function()
{
return CONST_WA_GLOBAL_SETTINGS.tva_type==brDQt
}
this.FBXvu=function()
{
return CONST_WA_GLOBAL_SETTINGS.tva_type==pdPrf
}
this.sOXvT=function()
{
if(this.FBXvu())return 0;
var tax=0;
var country_code=this.wmSwk.pmdUW;
if(country_code.length>0)
{
tax=this.RCtlT(country_code);
if(isNaN(tax))tax=0;
}
return tax;
}
this.QMrQE=function(TwSQq)
{
if(this.aHFeX())
{
var n0=this.sOXvT()/100;
return TwSQq*(n0/(1+n0));
}
if(this.pUjYP())
{
return TwSQq*this.sOXvT()/100;
}
return TwSQq;
}
this.nohap=function()
{
if(this.FBXvu())return 0;
var dcSQo=this.ZjxCe()
var rRfKt=0;
var LwOmc=0;
for(var i=0;i<dcSQo.length;i++)
{
var IqBOg=dcSQo[i];
rRfKt+=(IqBOg.TjbXk()*IqBOg.PMUNR);
}
rRfKt+=this.dPrDo();
LwOmc=this.NYTPJ(this.QMrQE(rRfKt));
return LwOmc;
}
this.TulcI=function()
{
var TwSQq=0;
TwSQq+=this.uLFri()
if(this.pUjYP())TwSQq+=this.nohap()
TwSQq+=this.dPrDo()
TwSQq-=this.OEvHd()
return TwSQq;
}
}
function LcaQt(qafZF,IWEug)
{
if(qafZF.lab<IWEug.lab) return-1;
if(qafZF.lab>IWEug.lab) return 1;
return 0
}
function WA_marketWatchQuantity()
{
var FDIMs=WA_Dialog.getCurrent()
FDIMs.AdiZV()
}
function WA_displayDialogMarketCart()
{
var FDIMs=new WA_Dialog();
FDIMs.eLUaY=false;
FDIMs.rDGVJ=function()
{
this.uwjPM()
this.eLUaY=setInterval("WA_marketWatchQuantity()",400)
}
FDIMs.uwjPM=function()
{
if(this.eLUaY)clearInterval(this.eLUaY)
}
FDIMs.AdiZV=function()
{
var ZXjVw=vjSPV();
var snsdB=ZXjVw.ZjxCe();
for(var n=0;n<snsdB.length;n++)
{
var IqBOg=snsdB[n]
var qapdv=document.getElementById("wa-cart-quantity-"+n)
var girlJ=qapdv.value
var VnRBb=parseInt(girlJ)
if(isNaN(VnRBb))VnRBb=0;
if((girlJ!='')&&(VnRBb+""!=girlJ))
{
qapdv.value=""+VnRBb
}
if(VnRBb!=IqBOg.PMUNR)
{
IqBOg.PMUNR=VnRBb
ZXjVw.cFroD()
this.iXvUt()
}
}
var kKBfw=document.getElementById("wa-promo-code")
if(kKBfw)
{
if(kKBfw.value!=ZXjVw.wmSwk.afnoN)
{
ZXjVw.wmSwk.afnoN=kKBfw.value
this.iXvUt()
}
}
}
FDIMs.onCustomKeypress=function(MVLHp)
{
if(MVLHp==13)
{
wa_timeout(Delegate.create(this,this.UwOJB),0);
}
return false;
}
FDIMs.closeWin=function()
{
this.uwjPM()
this.intern_closeWin()
}
FDIMs.iXvUt=function()
{
var ZXjVw=vjSPV();
var snsdB=ZXjVw.ZjxCe();
if(snsdB.length==0) return;
for(var n=0;n<snsdB.length;n++)
{
var IqBOg=snsdB[n]
var iepwQ=document.getElementById("wa-cart-total-"+n)
var TwSQq=IqBOg.TjbXk() 
var fHWIC=IqBOg.PMUNR*TwSQq
var DsQGd="<span style='"
DsQGd+=(fHWIC>0)?"color:"+WA_GLOBAL_COLOR_THEME.color_text+";font-weight:normal;":"color:#ff0000;font-weight:bold;"
DsQGd+="'>"
DsQGd+=ZXjVw.ubHib(fHWIC)
DsQGd+="</span>"
iepwQ.innerHTML=DsQGd
}
var LIWLP=ZXjVw.uLFri()
var UCExi=ZXjVw.nohap()
var tkIsu=ZXjVw.dPrDo()
var WQwnU=ZXjVw.TulcI()
var Sejmv=ZXjVw.OEvHd()
var rDGrQ=""
var iepwQ=document.getElementById("wa-cart-amount-total")
rDGrQ+=Translator.tr("Sub total")+" : "+ZXjVw.ubHib(LIWLP)
rDGrQ+="<br>"
if(tkIsu>0)
{
rDGrQ+="<span>"+Translator.tr("Shipping amount")+" : "+ZXjVw.ubHib(tkIsu)+"</span>";
rDGrQ+="<br>"
}
if(ZXjVw.aHFeX()||ZXjVw.pUjYP())
{
if(ZXjVw.aHFeX())
{
rDGrQ+="<div style='width:100%;text-align:left;'>"
rDGrQ+=Translator.tr("Tax included");
}
if(ZXjVw.pUjYP())
{
rDGrQ+="<div>"
rDGrQ+=Translator.tr("Extra Tax");
}
rDGrQ+=" : ";
rDGrQ+=ZXjVw.ubHib(UCExi)+"</div>";
}
if(Sejmv>0)
{
rDGrQ+="<span>"+Translator.tr("Promotion")+" : - "+ZXjVw.ubHib(Sejmv)+"</span><br>";
}
rDGrQ+="<span><b>"+Translator.tr("Total")+" : "+ZXjVw.ubHib(WQwnU)+"</b></span>";
iepwQ.innerHTML=rDGrQ
}
FDIMs.IPVRW=function()
{
WA_displayDialogMarketCart()
}
FDIMs.HaZsD=function()
{
this.closeWin()
}
FDIMs.UwOJB=function()
{
var ZXjVw=vjSPV();
if(WA_getNumberMarketItemsInCart()==0)return;
var ZYiGf=document.getElementById("wa-market-select-country")
if(ZYiGf)
{
ZXjVw.wmSwk.pmdUW=ZYiGf.value
}
if(ZXjVw.wmSwk.pmdUW=="")
{
var ZYiGf=document.getElementById("wa-market-select-country")
if(ZYiGf)
{
ZYiGf.focus()
ZYiGf.style.backgroundColor="#ff0000"
return;
}
}
if(CONST_WA_GLOBAL_SETTINGS.link_sale_condition)
{
if(ZXjVw.wmSwk.SUJlQ!=true)
{
var vLhUT=document.getElementById("wa-sales-condition")
if(vLhUT)
{
vLhUT.focus()
var CjDXX=document.getElementById("wa-sales-condition-label")
CjDXX.style.backgroundColor="#ff0000"
return;
}
}
}
var sZkDm=CONST_WA_GLOBAL_SETTINGS.list_type_payment
if(sZkDm.length==1)
{
ZXjVw.wmSwk.oQUEu=sZkDm[0]
}
var ZYiGf=document.getElementById("wa-market-select-payment")
if(ZYiGf)
{
ZXjVw.wmSwk.oQUEu=ZYiGf.value
if(ZXjVw.wmSwk.oQUEu=="")
{
ZYiGf.focus()
ZYiGf.style.backgroundColor="#ff0000"
return;
}
}
wJxvC()
}
FDIMs.nXlgC=function()
{
WA_exec_callback_opera_compliant(this,this.mVwKW)
}
FDIMs.mVwKW=function()
{
var ZXjVw=vjSPV();

var KFbeB=document.getElementById("wa-market-select-country")
if(KFbeB)
{
ZXjVw.wmSwk.pmdUW=KFbeB.value
}
ZXjVw.wmSwk.AXWCo()
var xOuwi=html_getLayer("market-cart-content")
var GaqHs=html_getLayer("wa-market-payment-form") 
var DsQGd=""
var snsdB=ZXjVw.ZjxCe();
html_SetVisibility(GaqHs,(snsdB.length>0))
if(snsdB.length==0)
{
DsQGd+="<span style='font-family:Arial;font-size:16px;'>"
DsQGd+=Translator.tr("No articles in Card !")
DsQGd+="</span>"
}
else
{
var TeeLT="border:1px solid "+WA_GLOBAL_COLOR_THEME.color0+";font-weight:normal;"
var SvUlm=new RGBColor(WA_GLOBAL_COLOR_THEME.color0);
var JtdkY=SvUlm.toHsl();
SvUlm.fromHsl(JtdkY[0],JtdkY[1],JtdkY[2]+0.2)
var xYUlA="border:1px solid "+WA_GLOBAL_COLOR_THEME.color0+";font-weight:normal;color:"+WA_GLOBAL_COLOR_THEME.color_text+";background-color:"+SvUlm.toRGB()+";"
var KfUSc="border:1px solid "+WA_GLOBAL_COLOR_THEME.color0+";color:#ff0000;font-weight:bold;"
var CdArM="color:#222222;font-size:12px;"
DsQGd+="<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+";'>"
DsQGd+="<thead style='font-size:13px;border:1px solid;'>"
DsQGd+="<tr>"
DsQGd+="<th  colspan=2 style='"+xYUlA+"'></th>"
DsQGd+="<th style='"+xYUlA+"'  width=70px><b>"+Translator.tr("Price")+"</b></th>"
DsQGd+="<th style='"+xYUlA+"'  width=70px><b>"+Translator.tr("Quantity")+"</b></th>"
DsQGd+="<th style='"+xYUlA+"'  width=70px><b>"+Translator.tr("Total")+"</b></th>"
DsQGd+="<th style='"+xYUlA+"'  width=90px></th>"
DsQGd+="</tr>"
var KccSN=new RGBColor(WA_GLOBAL_COLOR_THEME.color2);
var rBJJT=KccSN.toHsl();
KccSN.fromHsl(rBJJT[0],rBJJT[1],rBJJT[2]-0.1) 
for(var n=0;n<snsdB.length;n++)
{
var CJCEh="";
if(n%2==0)
{
CJCEh="background-color:"+KccSN.toRGB()+";"
}
var KaQLN=TeeLT+CJCEh;
var IqBOg=snsdB[n]
DsQGd+="<tr>"
DsQGd+="<th style='"+KaQLN+"' >"
var cUmRq=wa_global_market.markets[IqBOg.GYTif]
var PBgUa=new Size(30,30)
var NEDFc=PBgUa
if(cUmRq.info.design.crop_thumb==false)
{
NEDFc=IqBOg.oFgwf.size_thumb.clone()
NEDFc.scale(PBgUa)
}
else
{
}
if(IqBOg.oFgwf.img_thumb.length>0)
DsQGd+="<img border=0 src='"+IqBOg.oFgwf.img_thumb+"' width="+NEDFc.width+"px height="+NEDFc.height+"px>"
DsQGd+="</th>" 
DsQGd+="<th style='"+KaQLN+"text-align:left;padding:5px;' >"
DsQGd+="<b>"+IqBOg.dgSaT+"</b>"
if(IqBOg.TbEMW.length>0)
{
DsQGd+="<span style='"+CdArM+"'>";
DsQGd+=" ["+IqBOg.TbEMW+"]";
DsQGd+="</span>";
}
if(IqBOg.m_opt_vals)
{
DsQGd+="<br>"
DsQGd+="<span style='"+CdArM+"'>";
for(var i_opt=0;i_opt<IqBOg.oFgwf.options.length;i_opt++)
{
var vchnU=IqBOg.oFgwf.options[i_opt]
if(vchnU)
{
var MoWGM=IqBOg.m_opt_vals[i_opt];
var nwAHH=vchnU.title;
if(nwAHH.length>0)
{
DsQGd+=nwAHH;
DsQGd+=":"
}
DsQGd+=vchnU.vals[MoWGM];
DsQGd+=" "
}
}
DsQGd+="</span>";
}
DsQGd+="</th>"
var TwSQq=IqBOg.TjbXk()
DsQGd+="<th style='"+KaQLN+"' >"+ZXjVw.ubHib(TwSQq)+"</th>"
DsQGd+="<th style='"+KaQLN+"'  align=center><input type=text id='wa-cart-quantity-"+n+"' style='width:45px;' maxlength=3 value='"+IqBOg.PMUNR+"' type=text/></th>"
DsQGd+="<th style='"
var fHWIC=IqBOg.PMUNR*TwSQq
DsQGd+=(fHWIC>0)?KaQLN:(KfUSc+CJCEh);
DsQGd+="' ><span id='wa-cart-total-"+n+"'>"
DsQGd+=ZXjVw.ubHib(fHWIC)
DsQGd+="</span></th>"
DsQGd+="<th style='"+KaQLN+"' ><a href=\"javascript:WA_marketRemoveItem("+n+")\">"+Translator.tr("Remove card item")+"</a></th>"
DsQGd+="</tr>"
}
DsQGd+="<tr>"
DsQGd+="<th style='"+TeeLT+"text-align:right;padding:5px;' id='wa-cart-amount-total'  colspan=5>&nbsp;</th>"
DsQGd+="<th style='"+TeeLT+"' ></th>"
DsQGd+="</tr>"
DsQGd+="</thead>"
DsQGd+="</table>"
DsQGd+="<br>"
}
xOuwi.innerHTML=DsQGd
this.rDGVJ()
WA_exec_callback_opera_compliant(this,this.iXvUt) 
}
FDIMs.qFkMW=function()
{
var ZXjVw=vjSPV();
this.addButton(Translator.tr("Continue Shopping"),this.HaZsD,[""],this)
this.addButton(Translator.tr("Checkout order"),this.UwOJB,[""],this)
this.initializeWindow(670,700)
var isrrB="font-family:Arial;font-size:12px;color:#000000;"
var DsQGd=""
DsQGd+="<div id='market-cart-content' style='width:100%;"+isrrB+"' align=center>" 
DsQGd+="</div>"
DsQGd+="<br>"
DsQGd+="<div style='width:100%;"+isrrB+"' align=center id='wa-market-payment-form'>" 
var rAxTs=CONST_WA_GLOBAL_SETTINGS.list_favorite_country
var pnRnv=CONST_WA_GLOBAL_SETTINGS.list_country
var NqYDg=new Array()
for(var FfkFL=0;FfkFL<rAxTs.length;FfkFL++)
{
NqYDg[rAxTs[FfkFL]]=true
}
for(var FfkFL=0;FfkFL<pnRnv.length;FfkFL++)
{
NqYDg[pnRnv[FfkFL]]=true
}
var MTlWE=0;
var WcXpI=""
for(var c in NqYDg)
{
MTlWE++;
WcXpI=c
}
if(MTlWE>1)
{
DsQGd+="<span style='font-weight:bold;'>"
DsQGd+=Translator.tr("Please choose a country to deliver your order")
DsQGd+="</span>"
DsQGd+="<br>"
DsQGd+="<select onchange=\"WA_marketChangeCountry(this)\" id='wa-market-select-country'>"
if(CONST_WA_GLOBAL_SETTINGS.default_selected_country.length==0)
{
DsQGd+="<option value=\"\">...</option>"
}
var lCtOn=new Array()
for(var FfkFL=0;FfkFL<rAxTs.length;FfkFL++)
{
var AFqJn=rAxTs[FfkFL]
lCtOn.push({code:AFqJn,lab:Translator.country(AFqJn)})
}
for(var FfkFL=0;FfkFL<lCtOn.length;FfkFL++)
{
var dsxbX=lCtOn[FfkFL]
var AFqJn=dsxbX.code
DsQGd+="<option "
if(ZXjVw.wmSwk.qxxnO()==AFqJn)DsQGd+="selected "
DsQGd+="value=\""+AFqJn+"\">"+Translator.country(AFqJn)+"</option>"
}
if((rAxTs.length>0)&&(pnRnv.length>0))
{
DsQGd+="<option value=\"\">-----</option>"
}
var uuEvC=new Array()
for(var FfkFL=0;FfkFL<pnRnv.length;FfkFL++)
{
var AFqJn=pnRnv[FfkFL]
uuEvC.push({code:AFqJn,lab:Translator.country(AFqJn)})
}
if((rAxTs.length==0)&&(pnRnv.length==0))
{
var dcSQo=CONST_WA_COUNTRIES.codes
for(var FfkFL=0;FfkFL<dcSQo.length;FfkFL++)
{
var AFqJn=dcSQo[FfkFL]
uuEvC.push({code:AFqJn,lab:Translator.country(AFqJn)})
}
}
uuEvC.sort(LcaQt)
for(var FfkFL=0;FfkFL<uuEvC.length;FfkFL++)
{
var dsxbX=uuEvC[FfkFL]
var AFqJn=dsxbX.code
DsQGd+="<option "
if(ZXjVw.wmSwk.qxxnO()==AFqJn)DsQGd+="selected "
DsQGd+="value=\""+AFqJn+"\">"+Translator.country(AFqJn)+"</option>"
}
DsQGd+="</select>"
DsQGd+="<br>"
DsQGd+="<br>"
}
var sZkDm=CONST_WA_GLOBAL_SETTINGS.list_type_payment
if(sZkDm.length>1)
{
DsQGd+="<span style='font-weight:bold;'>"
DsQGd+=Translator.tr("Choose a type of payment")
DsQGd+="</span>"
DsQGd+="<br>"
DsQGd+="<select onchange=\"WA_marketChangeTypePayment(this)\" id='wa-market-select-payment'>"
if((sZkDm.length>1)||(sZkDm.length==0))
{
DsQGd+="<option value=\"\">...</option>"
}
for(var FfkFL=0;FfkFL<sZkDm.length;FfkFL++)
{
var oQUEu=sZkDm[FfkFL]
DsQGd+="<option "
if(ZXjVw.wmSwk.oQUEu==oQUEu)DsQGd+="selected "
DsQGd+="value=\""+oQUEu+"\">"+Translator.tr("label_market_"+oQUEu)+"</option>"
}
DsQGd+="</select>"
DsQGd+="<br>"
DsQGd+="<br>"
}
if(CONST_WA_GLOBAL_SETTINGS.list_promo_codes)
{
var dcSQo=CONST_WA_GLOBAL_SETTINGS.list_promo_codes
DsQGd+="<span id='wa-promo-code-label'  style='font-weight:bold;'>"
DsQGd+=Translator.tr("form-label-code_promo")
DsQGd+="</span><br>"
DsQGd+="<input id='wa-promo-code' onchange=\"WA_marketChangePromoCode(this)\" " 
DsQGd+=" value='"+ZXjVw.wmSwk.afnoN+"' "
DsQGd+="/>"
DsQGd+="<br>"
DsQGd+="<br>"
}
if(CONST_WA_GLOBAL_SETTINGS.link_sale_condition)
{
DsQGd+="<a "+WA_LinkToHref(CONST_WA_GLOBAL_SETTINGS.link_sale_condition)+" style='color:#0000ff'>"
DsQGd+=Translator.tr("Terms of sell")
DsQGd+="</a>"
DsQGd+="<br>" 
DsQGd+="<span id='wa-sales-condition-label'  style='font-weight:bold;'>"
DsQGd+=Translator.tr("label_market_accept_terms")
DsQGd+="</span>"
DsQGd+="<input id='wa-sales-condition' onchange=\"WA_marketChangeSalesCondition(this)\" "
DsQGd+=(ZXjVw.wmSwk.SUJlQ)?"checked ":""
DsQGd+="type='checkbox' value='1'/>" 
DsQGd+="<br>"
DsQGd+="<br>" 
}
if((MTlWE==1)||(sZkDm.length==1))
{
DsQGd+="<hr width=80%>"
DsQGd+="<br>"
if(MTlWE==1)
{
ZXjVw.wmSwk.pmdUW=WcXpI
DsQGd+="<span style='font-weight:bold;'>"
DsQGd+=Translator.tr("form-label-country")+" : "+Translator.country(ZXjVw.wmSwk.pmdUW)
DsQGd+="</span>"
DsQGd+="<br>"
DsQGd+="<br>"
}
if(sZkDm.length==1)
{
var oQUEu=sZkDm[0]
DsQGd+="<span style='font-weight:bold;'>"
DsQGd+=Translator.tr("PRINT_FORM_LABEL_TYPE_PAYMENT")+" : "+Translator.tr("label_market_"+oQUEu)
DsQGd+="</span>"
DsQGd+="<br>"
DsQGd+="<br>"
}
}
DsQGd+="</div>"
this.writeContent(DsQGd)
var xOuwi=html_getLayer("market-cart-content")
xOuwi.innerHTML="<div width=100% align=center><img src='wa_loading.gif'></div>" 

ZXjVw.JCdvh(this,this.nXlgC)
}
FDIMs.qFkMW() 
}
function WA_marketChangeCountry(ZYiGf)
{
ZYiGf.style.backgroundColor=""
var FDIMs=WA_Dialog.getCurrent()
FDIMs.nXlgC()
}
function WA_marketChangeTypePayment(ZYiGf)
{
var ZXjVw=vjSPV();
ZXjVw.wmSwk.oQUEu=ZYiGf.value
ZXjVw.wmSwk.AXWCo()
ZYiGf.style.backgroundColor=""
}
function WA_marketChangeSalesCondition(cEdAq)
{
var ZXjVw=vjSPV();
ZXjVw.wmSwk.SUJlQ=cEdAq.checked
ZXjVw.wmSwk.AXWCo() 
var CjDXX=document.getElementById("wa-sales-condition-label")
CjDXX.style.backgroundColor="" 
}
function WA_marketChangePromoCode(cEdAq)
{
var ZXjVw=vjSPV();
ZXjVw.wmSwk.afnoN=cEdAq.value
ZXjVw.wmSwk.AXWCo() 


}
function WA_LinkToHref(fkojs)
{
var DsQGd=""
var FZAhN=fkojs.url
var SLxji=Translator.m_lang_for_filename
if(SLxji.length>0)SLxji="_"+SLxji
FZAhN=FZAhN.replace(/@lng@/g,SLxji)
DsQGd+="href=\""+FZAhN+"\" "
if(fkojs.open==1)
{
DsQGd+="target="
DsQGd+="_blank"
}
return DsQGd;
}
function WA_displayDialogMarketProduct(VauIA,NhHDs)
{
var FHKKw=wa_global_market.markets[VauIA]
var melhX=FHKKw.obj
var pwkxd=melhX.info.products
var oFgwf=pwkxd[NhHDs] 

var FDIMs=new WA_Dialog();

FDIMs.oFgwf=oFgwf
FDIMs.XuFrk=VauIA
FDIMs.IPVRW=function()
{
WA_displayDialogMarketCart()
}
FDIMs.CBMgl=function()
{
var ZXjVw=vjSPV();
ZXjVw.JCdvh(this,this.Rwhge) 
}
FDIMs.Rwhge=function()
{
var oFgwf=this.oFgwf;
var ZXjVw=vjSPV();
var flkRY=new Array();
var EMvbZ=oFgwf.obj.id;
for(var i=0;i<3;i++)
{
var JjaRQ=-1;
var rtqEw=EMvbZ+"-select-opt"
var ZYiGf=document.getElementById(rtqEw+i)
if(ZYiGf)
{
if(ZYiGf.value.length==0)
{
ZYiGf.style.backgroundColor="#ff0000";
ZYiGf.focus()
return;
}
JjaRQ=parseInt(ZYiGf.value)
}
flkRY.push(JjaRQ)
}
if(ZXjVw.addProductToShoppingCard(oFgwf,flkRY))
{
ZXjVw.cFroD()
WA_displayDialogMarketCart()
}
}
FDIMs.qFkMW=function()
{
var VauIA=this.XuFrk
var oFgwf=this.oFgwf
var DsQGd=""
this.addButton(Translator.tr("Go to my card"),this.IPVRW,[""],this)
if(oFgwf.unavail==false)
{
this.addButton(Translator.tr("Add to card"),this.CBMgl,[""],this)
}
this.initializeWindow(670,this.idealHeight())
DsQGd+="<table border=0 width=100% cellpadding=4>"
DsQGd+="<tr>" 
if(oFgwf.img_big.length>0)
{
DsQGd+="<td width='100px' align=center valign=top>"
var NEDFc=oFgwf.size_thumb.clone() 
NEDFc.scale(new Size(200,200))
DsQGd+="<a href=\""+oFgwf.img_big+"\" target=_blank>"
DsQGd+="<img border=0 src=\""+oFgwf.img_big+"\" width='"+NEDFc.width+"px' height='"+NEDFc.height+"px'>"
DsQGd+="</a>"
DsQGd+="</td>"
}
var aTsMI="color:"+WA_GLOBAL_COLOR_THEME.color_text+";";
DsQGd+="<td valign=top style='font-family:Arial;'>"
DsQGd+="<span style='font-weight:bold;font-size:16px;"+aTsMI+"'>"
DsQGd+=oFgwf.title
DsQGd+="</span>"
DsQGd+="<br>"
if(oFgwf.sub_title.length>0)
{
DsQGd+="<span style='color:#333333;font-size:14px;'>"
DsQGd+=oFgwf.sub_title
DsQGd+="</span>"
DsQGd+="<br>"
}
DsQGd+="<br>"
DsQGd+="<table border=0 width=100% cellspacing=0 cellpadding=0><tr><td>"
DsQGd+="<span style='"+aTsMI+";font-size:14px;'>"
DsQGd+=Translator.tr("Price")+" : "
DsQGd+="</span>"
DsQGd+="<span style='"+aTsMI+";font-size:18px;font-weight:bold;' id='"+oFgwf.obj.id+"-price'>"
if(oFgwf.unavail)
{
DsQGd+=Translator.tr("Unavailable")
}
DsQGd+="</span>"
if(oFgwf.more_info)
{
DsQGd+="</td><td align=right>"
var fkojs=oFgwf.more_info
var OWvat=WA_LinkToHref(fkojs)
DsQGd+="<a "+OWvat+" style='font-family:Arial;text-decoration:underline;font-weight:bold;font-size:12px;color:0000ff;'>"+Translator.tr("More product info link")+"</a>"
}
DsQGd+="</td></tr></table>"
DsQGd+="<br>"
var uFXwe=oFgwf.obj.index
if(oFgwf.unavail==false)
if(oFgwf.options.length>0)
{
DsQGd+="<table border=0 cellspacing=0 cellpadding=0>"
for(var n=0;n<oFgwf.options.length;n++)
{
var vchnU=oFgwf.options[n]
if(vchnU)
{
DsQGd+="<tr><td align=right>"
DsQGd+="<span style='font-family:Arial;font-weight:bold;font-size:12px;"+aTsMI+"'>"
DsQGd+=vchnU.title+" :&nbsp;"
DsQGd+="</span>"
DsQGd+="</td><td align=left>"
DsQGd+="<select id='"+oFgwf.obj.id+"-select-opt"+n+"' onchange=\"WA_market_changeCustomPrice('"+VauIA+"',"+uFXwe+")\">"
DsQGd+="<option value=\"\">...</option>"
for(var FfkFL=0;FfkFL<vchnU.vals.length;FfkFL++)
{
var qYQLt=vchnU.vals[FfkFL]
DsQGd+="<option value=\""+FfkFL+"\">"+qYQLt+"</option>"
}
DsQGd+="</select>"
DsQGd+="</td></tr>";
}
}
DsQGd+="</table>"
}
DsQGd+="</td>"
DsQGd+="</tr>"
DsQGd+="</table>"
if(oFgwf.description.length>0)
{
DsQGd+="<table border=0 width=100% cellpadding=4>"
DsQGd+="<tr><td colspan=2>"
DsQGd+="<span style='font-family:Arial;font-size:13px;"+aTsMI+"'>"
DsQGd+="<hr>"
DsQGd+=oFgwf.description
DsQGd+="</span>"
DsQGd+="</td></tr>"
DsQGd+="</table>"
}
this.writeContent(DsQGd)
WA_market_changeCustomPrice(VauIA,uFXwe)
}
FDIMs.displayWindowWithAutoResize(300,FDIMs.qFkMW) 
}
function cnEPW(oFgwf,EMvbZ)
{
var Gebhq=new Array()
for(var i=0;i<3;i++)
{
var rtqEw=EMvbZ+"-select-opt"
var ZYiGf=document.getElementById(rtqEw+i)
Gebhq[i]=-1
if(ZYiGf)
{
ZYiGf.style.backgroundColor="";
var qYQLt=parseInt(ZYiGf.value)
if(isNaN(qYQLt)==false)
Gebhq[i]=qYQLt
}
}
return iwXsI(oFgwf,Gebhq)
}
function iwXsI(oFgwf,Gebhq)
{
if(oFgwf.unavail)return;
var lhlJZ=false;
for(var i=0;i<oFgwf.custom_prices.length;i++)
{
var PHIdJ=oFgwf.custom_prices[i]
var RaPlk=true;
for(var n=0;n<3;n++)
{
if(PHIdJ.tab[n]!=Gebhq[n])RaPlk=false
}
if(RaPlk)
{
lhlJZ=PHIdJ;
break;
}
}
var TwSQq=oFgwf.price
if(lhlJZ)
{
TwSQq=lhlJZ.pr
}
return TwSQq;
}
function WA_market_changeCustomPrice(VauIA,uFXwe)
{
var ZXjVw=vjSPV();
var FHKKw=wa_global_market.markets[VauIA]
var pwkxd=FHKKw.info.products;
var oFgwf=pwkxd[uFXwe]
if(oFgwf.unavail)return;
var EMvbZ=oFgwf.obj.id
var TwSQq=cnEPW(oFgwf,EMvbZ)
var dFIAi=html_getLayer(EMvbZ+"-price")
if(dFIAi)
{
dFIAi.innerHTML=ZXjVw.ubHib(TwSQq)
}
}
function wJxvC()
{
var ZXjVw=vjSPV();
if(WA_getNumberMarketItemsInCart()==0)return;
var IqBOg=ZXjVw.wmSwk
if((ZXjVw.vwUfk)&&(IqBOg.oQUEu=="paypal"))
{
KmqVY();
return;
}
HUWiG(OXUZJ)
}
function HUWiG(sdTNA)
{
var ZXjVw=vjSPV();
var IqBOg=ZXjVw.wmSwk
IqBOg.eOmaP()
var FDIMs=new WA_Dialog();
FDIMs.sdTNA=sdTNA
FDIMs.PKioC=function(MVLHp)
{
return Translator.tr("form-label-"+MVLHp)
}
FDIMs.onCustomKeypress=function(MVLHp)
{
if(MVLHp==13)
{
wa_timeout(Delegate.create(this,this.TgxSW),0);
}
return false;
}
FDIMs.jEbKm=function()
{
if(this.sdTNA==OXUZJ)
{
WA_displayDialogMarketCart()
}
else
{
HUWiG(OXUZJ)
}
}
FDIMs.KOpBH=function()
{
KmqVY()
}
FDIMs.TgxSW=function()
{
var ZXjVw=vjSPV();
var IqBOg=ZXjVw.wmSwk
if(IqBOg.JoLRp(this.sdTNA)==false) return;
IqBOg.AXWCo()
if(this.sdTNA==OXUZJ)
{
if(IqBOg.nawfp==true)
{
HUWiG(glCGH)
}
else
{
this.KOpBH()
}
}
else
{
this.KOpBH()
}
}
FDIMs.nPdLr=function(MVLHp,bVQRQ)
{
if(bVQRQ==undefined) bVQRQ=""
if(bVQRQ)bVQRQ=" size="+bVQRQ
return "<input name='"+MVLHp+"' value=\""+IqBOg.xOcVe(MVLHp,this.sdTNA)+"\" type=text "+bVQRQ+">"
}
FDIMs.UAPRK=function(YSMwb)
{
return "<td width=150px align=right valign=top>"+Translator.tr(YSMwb)+" :</td>"
}
FDIMs.qFkMW=function()
{
var ZXjVw=vjSPV();
var IqBOg=ZXjVw.wmSwk 
this.addButton("< "+Translator.tr('Back'),this.jEbKm,[""],this)
this.addButton(Translator.tr('Continue')+" >",this.TgxSW,[""],this)
this.initializeWindow(600,600)
var pdHVZ="form-label-"
var NVoNB=CONST_WA_GLOBAL_SETTINGS.list_form_fields 
var DsQGd=""
DsQGd+="<form id='wa-market-form' onSubmit='return false'>"
DsQGd+="<table border=0 width=100% cellspacing=5 style='font-family:Arial;font-size:15px;'>"
DsQGd+="<tr><td colspan=2 align=center style='font-size:18px;'>"
DsQGd+=Translator.tr((this.sdTNA==OXUZJ)?"Fill Deliver information below":"Fill Billing information below")
DsQGd+="<br><br></td></tr>"
for(var n=0;n<NVoNB.length;n++)
{
var YqLMb=NVoNB[n]
if(YqLMb=="address")
{
DsQGd+="<tr>"+this.UAPRK("Address");
DsQGd+="<td>"
DsQGd+=this.nPdLr("address_1",30)
DsQGd+="</td></tr>"
DsQGd+="<tr><td></td><td>"
DsQGd+=this.nPdLr("address_2",30)
DsQGd+="</td></tr>"
DsQGd+="<tr>"+this.UAPRK("form-label-city");
DsQGd+="<td>"
DsQGd+=this.nPdLr("city")+"&nbsp;"+this.PKioC("zip")+" : "+this.nPdLr("zip",10)
DsQGd+="</td></tr>" 
DsQGd+="<tr>"+this.UAPRK("form-label-country");
DsQGd+="<td>"
if(this.sdTNA==glCGH)
{
DsQGd+="<select id='wa-select-form-country' onchange='WA_marketChangeFormCountry("+this.sdTNA+")'>"
var uuEvC=new Array();
var dcSQo=CONST_WA_COUNTRIES.codes
for(var FfkFL=0;FfkFL<dcSQo.length;FfkFL++)
{
var AFqJn=dcSQo[FfkFL]
uuEvC.push({code:AFqJn,lab:Translator.country(AFqJn)})
}
uuEvC.sort(LcaQt)
var WEbhV=IqBOg.qxxnO()
WEbhV=IqBOg.xOcVe('countryCode',this.sdTNA,WEbhV)
for(var FfkFL=0;FfkFL<uuEvC.length;FfkFL++)
{
var dsxbX=uuEvC[FfkFL]
var AFqJn=dsxbX.code
DsQGd+="<option "
if(WEbhV==AFqJn)DsQGd+="selected "
DsQGd+="value=\""+AFqJn+"\">"+Translator.country(AFqJn)+"</option>"
}
DsQGd+="</select>"
}
else
{
DsQGd+=Translator.country(ZXjVw.wmSwk.pmdUW);
}
DsQGd+="<br><span id='wa-market-state'>"
DsQGd+="<select id='wa-select-state'></select>"
DsQGd+="</span>" 
DsQGd+="</td></tr>"
}
else
{
DsQGd+="<tr>"+this.UAPRK("form-label-"+YqLMb);
DsQGd+="<td>"
DsQGd+=this.nPdLr(YqLMb,30) 
DsQGd+="</td></tr>"
}
}
if(this.sdTNA==OXUZJ)
{
DsQGd+="<tr><td colspan=2 align=center >"
DsQGd+=Translator.tr("Billing adress is different")+" <input type=checkbox "
if(ZXjVw.wmSwk.nawfp)DsQGd+="checked "
DsQGd+="onchange='WA_marketCheckBillingAdress(this)'>"
DsQGd+="</td></tr>"
}
DsQGd+="</table>"
DsQGd+="</form>"
this.writeContent(DsQGd)
WA_exec_callback_opera_compliant(this,this.cmjHB) 
}
FDIMs.cmjHB=function()
{
WA_marketChangeFormCountry(this.sdTNA)
}
FDIMs.qFkMW()
}
function fBZIU(sdTNA,ZYiGf,Bxlgd)
{
var ZXjVw=vjSPV();
var IqBOg=ZXjVw.wmSwk
var SgQRC=IqBOg.xOcVe("stateCode",sdTNA) 
ZYiGf.options.length=0
for(var n=0;n<Bxlgd.length;n++)
{
var val=Bxlgd[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==SgQRC)elOptNew.selected=true
try{
ZYiGf.add(elOptNew,null);
}
catch(ex){
ZYiGf.add(elOptNew);
}
}
}
function WA_marketChangeFormCountry(sdTNA)
{
var ZXjVw=vjSPV();
var IqBOg=ZXjVw.wmSwk
var SFapY=IqBOg.pmdUW
var ZYiGf=document.getElementById("wa-select-form-country");
if(ZYiGf) SFapY=ZYiGf.value;
html_SetDisplay("wa-market-state",(SFapY=="US")||(SFapY=="CA")||(SFapY=="BR"))
var URdHi=document.getElementById("wa-select-state");
if(URdHi)
{
if(SFapY=="US") fBZIU(sdTNA,URdHi,["","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(SFapY=="CA") fBZIU(sdTNA,URdHi,["","Alberta","British Columbia","Manitoba","New Brunswick","Newfoundland and Labrador","Northwest Territories","Nova Scotia","Nunavut","Ontario","Prince Edward Isl.","Quebec","Saskatchewan","Yukon Territory"])
if(SFapY=="BR") fBZIU(sdTNA,URdHi,["","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(cEdAq)
{
var ZXjVw=vjSPV();
var IqBOg=ZXjVw.wmSwk
IqBOg.nawfp=cEdAq.checked
IqBOg.AXWCo()
}
function KmqVY()
{
var ZXjVw=vjSPV();
var vPlti=CONST_WA_GLOBAL_SETTINGS.currency_info 

var FDIMs=new WA_Dialog();
FDIMs.jEbKm=function()
{
if(ZXjVw.wmSwk.oQUEu=="paypal")
{
WA_displayDialogMarketCart();return;
}
if(ZXjVw.wmSwk.nawfp)
HUWiG(glCGH)
else
HUWiG(OXUZJ)
}
FDIMs.tgreE=function(cXHeU,qYQLt)
{
qYQLt=""+qYQLt
qYQLt=qYQLt.replace(/'/g,"&lsquo;")
return "<input type=hidden name='"+cXHeU+"' value=\""+qYQLt+"\">"
}
FDIMs.OvjgL=function()
{
var ZXjVw=vjSPV();
var DsQGd=""
if(vPlti.charCodeAt(3)>=100) return""
DsQGd+="<form id='wa-http-sender' method=POST action='https://www.paypal.com/cgi-bin/webscr' target='_blank'>"
DsQGd+=this.tgreE("cmd","_cart")
DsQGd+=this.tgreE("business",CONST_WA_GLOBAL_SETTINGS.email_paypal_account)
DsQGd+=this.tgreE("upload","1")
DsQGd+=this.tgreE("charset","utf-8")
DsQGd+=this.tgreE("no_note","0")
DsQGd+=this.tgreE("currency_code",CONST_WA_GLOBAL_SETTINGS.currency_code)
DsQGd+=this.tgreE("no_shipping","2")
var JfREB=ZXjVw.ZjxCe()
for(var i=0;i<JfREB.length;i++)
{
var info=JfREB[i];
var index=i+1;
var uinuk=info.TjbXk();
if(ZXjVw.aHFeX())
{
var qTDUh=ZXjVw.NYTPJ(ZXjVw.QMrQE(uinuk));
uinuk=uinuk-qTDUh;
}
DsQGd+=this.tgreE("amount_"+index,""+uinuk)
DsQGd+=this.tgreE("quantity_"+index,info.PMUNR)
var gtBmH=0;
if(info.TbEMW.length>0)
{
DsQGd+=this.tgreE("on"+gtBmH+"_"+index,"ref")
DsQGd+=this.tgreE("os"+gtBmH+"_"+index,info.TbEMW)
gtBmH++;
}
var DWnpt=""
if(info.m_opt_vals)
{
for(var i_opt=0;i_opt<info.oFgwf.options.length;i_opt++)
{
var vchnU=info.oFgwf.options[i_opt]
if(vchnU)
{
var MoWGM=info.m_opt_vals[i_opt];
var ocron=vchnU.vals[MoWGM]
var nwAHH=vchnU.title;
if(nwAHH.length==0) nwAHH="opt"+(i_opt+1);
DsQGd+=this.tgreE("on"+gtBmH+"_"+index,nwAHH)
DsQGd+=this.tgreE("os"+gtBmH+"_"+index,ocron)
if(DWnpt.length>0)DWnpt=DWnpt+", "
DWnpt+=ocron
gtBmH++;
}
}
}
var HpAAD=info.dgSaT;
if(DWnpt.length>0)HpAAD=HpAAD+"("+DWnpt+")"
DsQGd+=this.tgreE("item_name_"+index,HpAAD) 
}
var wxvGg=ZXjVw.dPrDo()
if(ZXjVw.aHFeX())
{
wxvGg=wxvGg-ZXjVw.NYTPJ(ZXjVw.QMrQE(wxvGg));
}
if(ZXjVw.aHFeX())
{
var qRZiU=ZXjVw.uLFri();
var FOLEe=ZXjVw.dPrDo()
var rRfKt=qRZiU+FOLEe;
var eKVbW=ZXjVw.NYTPJ(ZXjVw.QMrQE(rRfKt));
var wLUTw=rRfKt-eKVbW;
wLUTw=wLUTw-wxvGg;
var wFJtg=0;
for(var i=0;i<JfREB.length;i++)
{
var info=JfREB[i];
var index=i+1;
var XPPDv=0;
var cOUaJ=0;
var uinuk=info.PMUNR*info.TjbXk();
var n0=ZXjVw.sOXvT()/100;
var tax=uinuk*(n0/(1+n0));
uinuk=uinuk-tax;
XPPDv=uinuk;
var jcbOF=info.TjbXk();
var qTDUh=ZXjVw.NYTPJ(ZXjVw.QMrQE(jcbOF));
jcbOF=jcbOF-qTDUh;
cOUaJ=info.PMUNR*jcbOF;
if(cOUaJ>XPPDv)
{
jcbOF=info.m_price;
jcbOF=jcbOF-qTDUh;
var bpsVH=jcbOF;
if((bpsVH>0)&&(bpsVH!=info.TjbXk()))
{
bpsVH=bpsVH-0.01;
}
DsQGd+=this.tgreE("amount_"+index,bpsVH) 
cOUaJ=info.m_quantity*bpsVH;
}
wFJtg+=cOUaJ;
}
var TLMOq=ZXjVw.NYTPJ(wLUTw-wFJtg);
if(TLMOq>0)
{
var index=JfREB.length+1;
DsQGd+=this.tgreE("item_name_"+index,Translator.tr("TVA correction"))
DsQGd+=this.tgreE("quantity_"+index,1)
DsQGd+=this.tgreE("amount_"+index,TLMOq)
}
DsQGd+=this.tgreE("tax_cart",eKVbW)
}
else
{
DsQGd+=this.tgreE("tax_cart",ZXjVw.nohap())
}
DsQGd+=this.tgreE("handling_cart",wxvGg) 
DsQGd+="</form>"
return DsQGd;
}
FDIMs.Xxbox=function()
{
var MjLVr=this.tdvHs(OXUZJ);
var DsQGd="";
if(MjLVr.length>0)
{
DsQGd+=""+Translator.tr("Shipping information")+":\n";
DsQGd+=MjLVr;
}
return DsQGd;
}
FDIMs.LdYLC=function()
{
var MjLVr=this.tdvHs(glCGH);
var DsQGd="";
if(MjLVr.length>0)
{
DsQGd+=Translator.tr("Billing information")+":\n";
DsQGd+=MjLVr;
}
return DsQGd;
}
FDIMs.tdvHs=function(sdTNA)
{
var ZXjVw=vjSPV();
var IqBOg=ZXjVw.wmSwk
var DsQGd="";
var tcPKg=new Array();
var NVoNB=TBXxB(CONST_WA_GLOBAL_SETTINGS.list_form_fields)
NVoNB.push("country")
NVoNB.push("state")
for(var i=0;i<NVoNB.length;i++)
{
var DoRDx=NVoNB[i];
tcPKg[DoRDx]=IqBOg.xOcVe(DoRDx,sdTNA)
}
if(tcPKg["firstname"])DsQGd+=tcPKg["firstname"]+"\n"
if(tcPKg["lastname"])DsQGd+=tcPKg["lastname"]+"\n"
if(tcPKg["company"])
{
DsQGd+=Translator.tr("form-label-company")+" : "+tcPKg["company"]+"\n"
}
if(tcPKg["fiscal_code"]) DsQGd+=Translator.tr("form-label-fiscal_code")+" : "+tcPKg["fiscal_code"]+"\n"
if(tcPKg["tva"]) DsQGd+=Translator.tr("form-label-tva")+" : "+tcPKg["tva"]+"\n"
if(tcPKg["address_1"]) DsQGd+=tcPKg["address_1"]+"\n"
if(tcPKg["address_2"]) DsQGd+=tcPKg["address_2"]+"\n"
if(tcPKg["zip"]) DsQGd+=tcPKg["zip"]+" "
if(tcPKg["city"]) DsQGd+=tcPKg["city"]+"\n"
if(tcPKg["country"])DsQGd+=Translator.country(tcPKg["country"])
if(tcPKg["state"]&&tcPKg["state"].length>0) DsQGd+=" "+tcPKg["state"];
DsQGd+="\n"
if(tcPKg["phone"]) DsQGd+=Translator.tr("form-label-phone")+" : "+tcPKg["phone"]+"\n"
if(tcPKg["fax"]) DsQGd+=Translator.tr("form-label-fax")+" : "+tcPKg["fax"]+"\n"
if(tcPKg["email"]) DsQGd+=tcPKg["email"]+"\n" 
if(tcPKg["comment"])
{
DsQGd+=Translator.tr("form-label-comment")+" : \n";
DsQGd+=tcPKg["comment"]+"\n"
}
return DsQGd;
}
FDIMs.rroTh=function()
{
var ZXjVw=vjSPV();
var DsQGd="";
var JfREB=ZXjVw.ZjxCe();
DsQGd+="**************\n"
for(var i=0;i<JfREB.length;i++)
{
var IqBOg=JfREB[i];
var index=i+1;
var HpAAD=IqBOg.dgSaT;
if(IqBOg.TbEMW.length>0)
{
HpAAD+=" ["+IqBOg.TbEMW+"]";
}
var DWnpt=""
if(IqBOg.m_opt_vals)
{
for(var i_opt=0;i_opt<IqBOg.oFgwf.options.length;i_opt++)
{
var vchnU=IqBOg.oFgwf.options[i_opt]
if(vchnU)
{
if(DWnpt.length>0)DWnpt=DWnpt+", "
var MoWGM=IqBOg.m_opt_vals[i_opt];
var ocron=vchnU.vals[MoWGM]
var nwAHH=vchnU.title;
if(nwAHH.length>0) DWnpt+=nwAHH+" : "
DWnpt+=ocron
}
}
}
if(DWnpt.length>0)HpAAD=HpAAD+"\n("+DWnpt+")"
DsQGd+=HpAAD;
DsQGd+="\n"
DsQGd+=Translator.tr("Price")+" : "+ZXjVw.vunhW(IqBOg.TjbXk())+"\n"
DsQGd+=Translator.tr("Quantity")+" : "+IqBOg.PMUNR+"\n"
DsQGd+=Translator.tr("Total")+" : "+ZXjVw.vunhW(IqBOg.TjbXk()*IqBOg.PMUNR);
DsQGd+="\n"
DsQGd+="**************\n"
}
var LIWLP=ZXjVw.uLFri()
var UCExi=ZXjVw.nohap()
var tkIsu=ZXjVw.dPrDo()
var WQwnU=ZXjVw.TulcI()
var Sejmv=ZXjVw.OEvHd() 
DsQGd+=Translator.tr("Sub total")+" : "+ZXjVw.vunhW(LIWLP)+"\n";
if(CONST_WA_GLOBAL_SETTINGS.shipping_type!=tlHBd)
{
DsQGd+=Translator.tr("Shipping amount")+" : "+ZXjVw.vunhW(tkIsu)+"\n";
}
if(ZXjVw.aHFeX()||ZXjVw.pUjYP())
{
if(ZXjVw.aHFeX())
{
DsQGd+=Translator.tr("Tax included");
}
if(ZXjVw.pUjYP())
{
DsQGd+=Translator.tr("Extra Tax");
}
DsQGd+=" : ";
DsQGd+=ZXjVw.vunhW(UCExi)+"\n";
}
if(Sejmv>0)
{
DsQGd+=Translator.tr("Promotion")+" : - "+ZXjVw.vunhW(Sejmv)+"\n";
}
DsQGd+=Translator.tr("Total")+" : "+ZXjVw.vunhW(WQwnU)+"\n";
return DsQGd;
}
FDIMs.csrSr=function()
{
var ZXjVw=vjSPV();
var DsQGd="";
var JfREB=ZXjVw.ZjxCe()
DsQGd+="<table class=wa-cart-global-table >"
DsQGd+="<tr class=wa-cart-title >"
DsQGd+="<td>&nbsp;</td>"
DsQGd+="<td>"+Translator.tr("Price")+"</td>"
DsQGd+="<td>"+Translator.tr("Quantity")+"</td>"
DsQGd+="<td>"+Translator.tr("Total")+"</td>"
DsQGd+="</tr>"
for(var i=0;i<JfREB.length;i++)
{
DsQGd+="<tr>"
var IqBOg=JfREB[i];
var index=i+1;
DsQGd+="<td>"
var HpAAD=IqBOg.dgSaT;
if(IqBOg.TbEMW.length>0)
{
HpAAD+=" ["+IqBOg.TbEMW+"]";
}
HpAAD="<b>"+HpAAD+"</b>"
var DWnpt=""
if(IqBOg.m_opt_vals)
{
for(var i_opt=0;i_opt<IqBOg.oFgwf.options.length;i_opt++)
{
var vchnU=IqBOg.oFgwf.options[i_opt]
if(vchnU)
{
if(DWnpt.length>0)DWnpt=DWnpt+", "
var MoWGM=IqBOg.m_opt_vals[i_opt];
var ocron=vchnU.vals[MoWGM]
var nwAHH=vchnU.title;
if(nwAHH.length>0) DWnpt+=nwAHH+" : "
DWnpt+=ocron
}
}
}
if(DWnpt.length>0)HpAAD=HpAAD+"<br><span class=wa-cart-option >("+DWnpt+")</span>"
DsQGd+=HpAAD;
DsQGd+="</td>"
DsQGd+="<td>"+ZXjVw.ubHib(IqBOg.TjbXk())+"</td>"
DsQGd+="<td>"+IqBOg.PMUNR+"</td>"
DsQGd+="<td>"+ZXjVw.ubHib(IqBOg.TjbXk()*IqBOg.PMUNR)+"</td>"
DsQGd+="</tr>"
}
DsQGd+="<tr><td colspan=4>"
var LIWLP=ZXjVw.uLFri()
var UCExi=ZXjVw.nohap()
var tkIsu=ZXjVw.dPrDo()
var WQwnU=ZXjVw.TulcI()
var Sejmv=ZXjVw.OEvHd() 
DsQGd+="<table class=wa-cart-table-total >"
DsQGd+="<tr><td align=right >"+Translator.tr("Sub total")+" : "+ZXjVw.ubHib(LIWLP)+"</td></tr>";
if(CONST_WA_GLOBAL_SETTINGS.shipping_type!=tlHBd)
{
DsQGd+="<tr><td align=right>"+Translator.tr("Shipping amount")+" : "+ZXjVw.ubHib(tkIsu)+"</td></tr>";
}
if(ZXjVw.aHFeX()||ZXjVw.pUjYP())
{
if(ZXjVw.aHFeX())
{
DsQGd+="<tr><td align=left >"+Translator.tr("Tax included");
}
if(ZXjVw.pUjYP())
{
DsQGd+="<tr><td align=right >"+Translator.tr("Extra Tax");
}
DsQGd+=" : ";
DsQGd+=ZXjVw.ubHib(UCExi)+"</td></tr>";
}
if(Sejmv>0)
{
DsQGd+="<tr><td align=right class=wa-cart-promo >"+Translator.tr("Promotion")+" : - "+ZXjVw.ubHib(Sejmv)+"</td></tr>";
}
DsQGd+="<tr><td align=right class=wa-cart-total >"+Translator.tr("Total")+" : "+ZXjVw.ubHib(WQwnU)+"</td></tr>";
DsQGd+="</table>" 
DsQGd+="</td></tr>"
DsQGd+="</table>"
DsQGd=DsQGd.replace(/\"/g,"'")
return DsQGd;
}
FDIMs.GuBiZ=function(qYQLt)
{
if((""+qYQLt).length==1)qYQLt="0"+qYQLt;
return qYQLt
}
FDIMs.RnfGV=function()
{
var ZXjVw=vjSPV();
var IqBOg=ZXjVw.wmSwk
var DsQGd=""
if(vPlti.charCodeAt(3)>=100) return""
if(bnjvZ)
{
DsQGd+="<form id='wa-http-sender' method=POST action='"+bnjvZ_URL+"crbst_market_print_form.php' target='_blank'>"
}
else
{
DsQGd+="<form id='wa-http-sender' method=POST action='crbst_market_print_form.php' target='_blank'>"
}
DsQGd+=this.tgreE("type_payment",IqBOg.oQUEu)
DsQGd+=this.tgreE("MAIL_TITLE_PREFIXE",Translator.tr("title email Order notification"))
DsQGd+=this.tgreE("MAIN_TITLE",Translator.tr("PRINT_FORM_MAIN_TITLE"))
DsQGd+=this.tgreE("PREFIXE_ORDER",Translator.tr("PRINT_FORM_PREFIXE_ORDER"))
var ndxmI=""
var JBdEo=new Date()
ndxmI+="wa-"+this.GuBiZ(JBdEo.getYear()-100)+this.GuBiZ(JBdEo.getMonth()+1)+this.GuBiZ(JBdEo.getDate())
ndxmI+=JBdEo.getHours()+this.GuBiZ(JBdEo.getMinutes())+this.GuBiZ(JBdEo.getSeconds())
ndxmI+="-"+Math.round(Math.random()*100) 
DsQGd+=this.tgreE("ID_ORDER",ndxmI)
DsQGd+=this.tgreE("CARD_TITLE",Translator.tr("PRINT_FORM_CARD_TITLE"))
DsQGd+=this.tgreE("LABEL_TYPE_PAYMENT",Translator.tr("PRINT_FORM_LABEL_TYPE_PAYMENT"))
DsQGd+=this.tgreE("send_copy_email_to_buyer",(ZXjVw.send_copy_email_to_buyer)?"1":"0") 

var tcPKg=new Array();
var NVoNB=TBXxB(CONST_WA_GLOBAL_SETTINGS.list_form_fields)
NVoNB.push("country")
NVoNB.push("state")
for(var i=0;i<NVoNB.length;i++)
{
var DoRDx=NVoNB[i];
tcPKg[DoRDx]=ZXjVw.wmSwk.xOcVe(DoRDx,OXUZJ)
}
DsQGd+=this.tgreE("form_first_name",tcPKg["firstname"]);
DsQGd+=this.tgreE("form_last_name",tcPKg["lastname"]);
DsQGd+=this.tgreE("form_address1",tcPKg["address_1"]);
DsQGd+=this.tgreE("form_address2",tcPKg["address_2"]);
DsQGd+=this.tgreE("form_city",tcPKg["address_2"]);
DsQGd+=this.tgreE("form_zip",tcPKg["zip"]);
DsQGd+=this.tgreE("form_state",tcPKg["state"]);
DsQGd+=this.tgreE("form_country",tcPKg["country"]);
DsQGd+=this.tgreE("form_company",tcPKg["company"]);
DsQGd+=this.tgreE("form_fiscal_code",tcPKg["fiscal_code"]);
DsQGd+=this.tgreE("form_tva",tcPKg["tva"]);
DsQGd+=this.tgreE("form_phone",tcPKg["phone"]);
DsQGd+=this.tgreE("form_fax",tcPKg["fax"]);
DsQGd+=this.tgreE("CARD_TOTAL_PRICE",ZXjVw.TulcI());
DsQGd+=this.tgreE("CARD_CURRENCY",CONST_WA_GLOBAL_SETTINGS.currency_code);
DsQGd+=this.tgreE("CARD_LANG",Translator.m_lang);
DsQGd+=this.tgreE("LABEL_PROCESS_ORDER",Translator.tr("PRINT_FORM_PROCESS_ORDER"));
DsQGd+=this.tgreE("wa_promo_code",ZXjVw.wmSwk.afnoN);
DsQGd+=this.tgreE("email_buyer",IqBOg.xOcVe("email",OXUZJ))
if(IqBOg.oQUEu=="custom")
{
DsQGd+=this.tgreE("TYPE_PAYMENT",Translator.tr("PRINT_FORM_TYPE_CUSTOM"))
}
if(IqBOg.oQUEu=="check")
{
DsQGd+=this.tgreE("TYPE_PAYMENT",Translator.tr("PRINT_FORM_TYPE_CHECK"))
DsQGd+=this.tgreE("MESSAGE_CHECK",Translator.tr("PRINT_FORM_MESSAGE_CHECK"))
}
if(IqBOg.oQUEu=="wire")
{
DsQGd+=this.tgreE("TYPE_PAYMENT",Translator.tr("PRINT_FORM_TYPE_WIRE"))
DsQGd+=this.tgreE("MESSAGE_WIRE",Translator.tr("PRINT_FORM_MESSAGE_WIRE"))
}
if(IqBOg.oQUEu=="paypal")
{
DsQGd+=this.tgreE("LABEL_PAYPAL_CART_TITLE",Translator.tr("PRINT_FORM_PAYPAL_CART_TITLE"));
DsQGd+=this.tgreE("TYPE_PAYMENT","Paypal")
DsQGd+=this.tgreE("MESSAGE_PAYPAL",Translator.tr("PRINT_FORM_MESSAGE_PAYPAL"))
}
DsQGd+=this.tgreE("LABEL_PRINT",Translator.tr("PRINT_FORM_LABEL_PRINT"))
DsQGd+=this.tgreE("card_html",this.csrSr())
DsQGd+=this.tgreE("card_plain_text",this.rroTh())
DsQGd+=this.tgreE("LABEL_SELLER_INFORMATION",Translator.tr("Seller information"))
DsQGd+=this.tgreE("LABEL_BANK_ACCOUNT",Translator.tr("Bank account information"))
DsQGd+=this.tgreE("LABEL_ADDRESS",Translator.tr("Address"))
DsQGd+=this.tgreE("seller_address",CONST_WA_GLOBAL_SETTINGS.seller_address)
DsQGd+=this.tgreE("bank_account_informations",CONST_WA_GLOBAL_SETTINGS.bank_account_informations)
DsQGd+=this.tgreE("buyer_info_shipping",this.Xxbox())
var CQtYh=""
if(IqBOg.nawfp)
{
CQtYh=this.LdYLC();
};
DsQGd+=this.tgreE("buyer_info_billing",CQtYh)
DsQGd+="</form>"
return DsQGd;
}
FDIMs.sGUaV=function()
{
var ZXjVw=vjSPV();
ZXjVw.TjCkG()
this.closeWin()
}
FDIMs.qFkMW=function()
{
var ZXjVw=vjSPV();
var bQcCs=true;
var IqBOg=ZXjVw.wmSwk 
if(IqBOg.oQUEu=="paypal")
if((ZXjVw.vwUfk==true)&&(CONST_WA_GLOBAL_SETTINGS.list_promo_codes==false))
{
bQcCs=true;
}
if((bQcCs==false)&&(IqBOg.oQUEu=="paypal"))
{
this.addButton(Translator.tr('Clear cart'),this.sGUaV,[""],this)
this.initializeWindow(400,200)
}
else
{
this.initializeWindow(400,150)
}
var DsQGd=""
if((bQcCs==false)&&(IqBOg.oQUEu=="paypal"))
{
DsQGd+=this.OvjgL()
}
if(bQcCs)
{
DsQGd+=this.RnfGV()
if((bnjvZ==false)&&(document.webaca_is_preview))
{
WA_Dialog.alert(Translator.tr("Operation not allowed in preview mode"))
return
}
}
DsQGd+="<table border=0 style='width:100%;'><tr>";
DsQGd+="<td align=center style='"+this.cssText1()+"'>"
DsQGd+=Translator.tr("You have been redirected to the payment page")
if((bQcCs==false)&&(IqBOg.oQUEu=="paypal"))
{
DsQGd+="<br><br>"
DsQGd+=Translator.tr("You can clear your cart")
}
DsQGd+="</td></tr></table>"
this.writeContent(DsQGd) 
if(vPlti.charCodeAt(3)>=100)
{
WA_Dialog.alert(Translator.tr("This cariboost edition can't support ebusiness features !'"))
return;
}
var BEBtE=document.getElementById("wa-http-sender")
BEBtE.submit()
if(bQcCs)
{
ZXjVw.TjCkG()
}
}
FDIMs.qFkMW()
}

-->
