<!--

var kqotb=0
var JiTBj=1
var wpFcF=2
var NZFMv=0;
var MmAal=1;
var JwsHh=2;
var tmDPq=0
var GgeZx=1
var eoqKB=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(fxdqa)
{
VtUNI().ErkCq(fxdqa)
var beHjF=WA_Dialog.getCurrent();
beHjF.lTlFQ()
}
function VtUNI()
{
if(document.wa_global_settings_market==undefined)document.wa_global_settings_market=new QjNDP()
return document.wa_global_settings_market;
}
function aTWkK()
{
this.jtvWx=function()
{
return this.bwkNi+"-"+this.oQVDY_index
}
this.TnPuG=function(PCWXa,BoEjb)
{
this.oQVDY=PCWXa.obj.market.info.folder.substring(13);
this.oQVDY_index=PCWXa.obj.index;
this.oQVDY_modif=PCWXa.obj.market.info.critical_id_modif
this.bwkNi=PCWXa.obj.market.id 

this.Ztpeb=1;
this.VLvGC=PCWXa.title;
this.dNOoh=PCWXa.price;
this.SJdOG=PCWXa.weight;
this.sZaGH=PCWXa.code_product;
}
this.hXrxR=function(PCWXa,BoEjb)
{

this.VLvGC=PCWXa.title;
this.dNOoh=PCWXa.price;
this.SJdOG=PCWXa.weight;
this.sZaGH=PCWXa.code_product;
}
this.KgGlb=function()
{
var s="";
s+=this.jtvWx();
if(this.m_opt_vals)
for(var i=0;i<this.m_opt_vals.length;i++)
{
var cPwOd=this.m_opt_vals[i]
if(cPwOd!=-1) s+="/"+cPwOd;
}
return s;
}
this.ptrPp=function()
{
var val="";
val+="j="+this.oQVDY+",";
val+="i="+this.oQVDY_index+",";
val+="m="+this.oQVDY_modif+",";
val+="q="+this.Ztpeb+",";
if(this.m_opt_vals)
{
for(var i=0;i<this.m_opt_vals.length;i++)
{
val+="o"+i+"=";
var FSLdm=this.m_opt_vals[i]
if(FSLdm>-1)
val+=FSLdm
else
val+=""
val+=","
}
}
return val;
}
this.YVUfY=function(map,k)
{
var v=map[k];
if(v=="undefined") return "";
return v;
}
this.uBXDW=function(map)
{
this.oQVDY=this.YVUfY(map,"j");
if(this.oQVDY=="") return false;
this.oQVDY_index=this.YVUfY(map,"i");
this.oQVDY_modif=this.YVUfY(map,"m");
this.Ztpeb=parseInt(map["q"]);
this.m_opt_vals=new Array();
for(var i=0;i<3;i++)
{
var TChYH=parseInt(map["o"+i]);
if(isNaN(TChYH))TChYH=-1;
this.m_opt_vals.push(TChYH)
}
return true;
}
this.LJrXv=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.XAxpb=function(TGqhP)
{
var CQpnX=this.LJrXv(TGqhP)
return this.uBXDW(CQpnX) 
}
this.PWipX=function()
{
return KqwvB(this.PCWXa,this.m_opt_vals)
}
}
function RnoUg(wJmYZ,KJPEb)
{
var RmLnI=wJmYZ[0]
var UoxFY=wJmYZ[1]
var AYQAm=wJmYZ[2]
if(RmLnI.length==0)
{
AYQAm.call(UoxFY)
return;
}
var js=RmLnI.pop()
WA_loadScript(js.src,RnoUg,[RmLnI,UoxFY,AYQAm]);
}
function WA_arrayContains(BgrgN,TGqhP)
{
for(var n=0;n<BgrgN.length;n++){if(BgrgN[n]==TGqhP)return true;}
return false;
}
function aBgfg(BgrgN)
{
var CQpnX=new Array()
for(var n=0;n<BgrgN.length;n++)
{
var jMKWj=BgrgN[n]
if(jMKWj=="address") CQpnX=CQpnX.concat(["address_1","address_2","city","zip"])
else CQpnX.push(jMKWj)
}
return CQpnX;
}
function rxtYu()
{
this.aOFpk=function()
{
if(this.bQLqf.length==0)return CONST_WA_GLOBAL_SETTINGS.default_selected_country;
return this.bQLqf;
}
this.COqGw=function()
{
this.KgPIk()
}
this.LJrXv=function(s)
{
var cKDeD=new Array();
var tab=s.split(",");
for(var i=0;i<tab.length;i++)
{
var tab3=tab[i].split("=");
if(tab3.length==2)cKDeD[tab3[0]]=tab3[1];
}
return cKDeD;
}
this.OrUqK=function(nniZR)
{
if(nniZR==undefined) return ""
return(nniZR==tmDPq)?"deliv-":"bill-"
}
this.BqUIV=function(Wdkxi,nniZR,xSURC)
{
if(!xSURC)xSURC=""
var gXHwb=this.OrUqK(nniZR)
if(Wdkxi=="country")
{
if(nniZR==tmDPq) return this.bQLqf
if(nniZR==GgeZx) Wdkxi="countryCode"
}
if(Wdkxi=="state")
{
Wdkxi="stateCode"
}
var cPwOd=this.cSGeb[gXHwb+Wdkxi]
if(!cPwOd) return xSURC
cPwOd=cPwOd.replace(/\"/g,"'")
return cPwOd
}
this.ZrPWV=function(cPwOd)
{
if(cPwOd==undefined)return ""
return cPwOd
}
this.jaeYW=function(key,val)
{
if((val==null)||(val==undefined)) val="";
WA_SetCookie("crbst-card-"+key,val)
}
this.umtgq=function(key)
{
var UoxFY=WA_GetCookie("crbst-card-"+key)
if(UoxFY=="null")UoxFY="";
return ""+UoxFY
}
this.ADFBD=function()
{
this.cSGeb=new Array()
var TGqhP=this.umtgq("order-infos")
var CQpnX=this.LJrXv(TGqhP)
for(var k1 in CQpnX)
{
var cPwOd=CQpnX[k1]
if((k1.indexOf("deliv-")==0)||(k1.indexOf("bill-")==0))
this.cSGeb[k1]=unescape(cPwOd)
}
this.bQLqf=this.ZrPWV(CQpnX["countryCode"])
this.pMSQG=this.ZrPWV(CQpnX["typePayment"])
this.URhlA=(this.ZrPWV(CQpnX["differentBillingAddressChecked"])=="true")
this.oXLVP=(this.ZrPWV(CQpnX["salesConditionChecked"])=="true")
}
this.KgPIk=function()
{
var TGqhP=""
for(var k1 in this.cSGeb)
{
var cPwOd=this.cSGeb[k1]
TGqhP+=k1+"="+escape(cPwOd)+","
}
var WTJAr=""
WTJAr+="countryCode="+escape(this.bQLqf)+","
WTJAr+="typePayment="+escape(this.pMSQG)+","
WTJAr+="differentBillingAddressChecked="+(this.URhlA)+","
WTJAr+="salesConditionChecked="+(this.oXLVP)+","
TGqhP+=WTJAr 
this.jaeYW("order-infos",TGqhP)
}
this.PFMnf=function(tVWKc)
{
if(trimString(tVWKc.value).length==0)
{
tVWKc.style.backgroundColor="#ff0000"
tVWKc.focus()
return false;;
}
tVWKc.style.backgroundColor=""
return true;
}
this.GcqIo=function(nniZR)
{
var MijTJ=aBgfg(CONST_WA_GLOBAL_SETTINGS.list_form_fields)
var EtkST=aBgfg(CONST_WA_GLOBAL_SETTINGS.list_mandatory_form_fields) 
var CZpvl=this.cSGeb;
var gXHwb=this.OrUqK(nniZR) 
var BJErH=document.getElementById("wa-market-form")
for(var n=0;n<MijTJ.length;n++)
{
var iSDtS=MijTJ[n]
var uJFel=BJErH[iSDtS]
var cPwOd=trimString(uJFel.value)
if(iSDtS!="address_2")
if(WA_arrayContains(EtkST,iSDtS))
{
if(this.PFMnf(uJFel)==false)return false;
}
CZpvl[gXHwb+iSDtS]=cPwOd
}
var GdZLJ=document.getElementById("wa-select-state");
var KnqHx=document.getElementById("wa-market-state");
if(GdZLJ&&(KnqHx.style.display!="none"))
{
if(this.PFMnf(GdZLJ)==false)return false;
CZpvl[gXHwb+"stateCode"]=GdZLJ.value
}
else
{
CZpvl[gXHwb+"stateCode"]=""
}
if(nniZR==GgeZx)
{
var aivIO=document.getElementById("wa-select-form-country");
if(aivIO)
{
CZpvl[gXHwb+"countryCode"]=aivIO.value
}
}
this.KgPIk()
return true;
}
this.HDbRm=""
this.bQLqf=""
this.pMSQG=""
this.URhlA=false;
this.oXLVP=false
this.ADFBD()
}
function QjNDP()
{
this.LJgbj=new Array();
this.UoxFY_callback=false;
this.Kwmwn=false;
this.QhJlQ=false;
this.tfTxo=new rxtYu()
this.hgUXV=CONST_WA_GLOBAL_SETTINGS.use_native_paypal_cart;
this.iDLpd=function(UoxFY,AYQAm)
{
this.UoxFY_callback=UoxFY
this.Kwmwn=AYQAm 
var ZSkoZ=this.umtgq("data")
this.gfqWT(ZSkoZ) 
var RmLnI=new Array()
var BgrgN=this.LJgbj;
for(var i=0;i<BgrgN.length;i++)
{
var Peoqp=BgrgN[i];
var wBtPf=Translator.m_lang_for_filename
if(wBtPf.length>0)wBtPf="_"+wBtPf;
var vUqAG=Peoqp.oQVDY;
var n=vUqAG.indexOf("_")
if(n>-1)vUqAG=vUqAG.substring(n+1)
Peoqp.bwkNi="wa-id-"+vUqAG 
var LHCPQ=wa_global_market.markets[Peoqp.bwkNi]
if(this.QhJlQ==false)
if(!LHCPQ)
{
var PxFou="crbst_market_"+Peoqp.oQVDY+'/'
WA_declareMarket(Peoqp.bwkNi,PxFou,Peoqp.oQVDY_modif) 
var YmnVT=PxFou+'market-definition'+wBtPf+'.js?v='+Peoqp.oQVDY_modif
RmLnI.push({id:vUqAG,src:YmnVT})
}
}
RnoUg([RmLnI,this,this.pYgPr],true)
}
this.xoNOi=function()
{
this.jaeYW("data","")
this.tfTxo.jaeYW("order-infos","")
this.tfTxo.ADFBD()
this.gfqWT("")
}
this.pYgPr=function()
{
this.QhJlQ=true;
var BgrgN=this.LJgbj;
var XdIgK=new Array();
for(var i=0;i<BgrgN.length;i++)
{
var Peoqp=BgrgN[i];
var vUqAG=Peoqp.bwkNi
var FBFZL=wa_global_market.markets[vUqAG] 

if(FBFZL.info)
{
var JatIk=FBFZL.info.products 
var BoEjb=Peoqp.oQVDY_index
var PCWXa=JatIk[BoEjb]
Peoqp.PCWXa=PCWXa
Peoqp.hXrxR(Peoqp.PCWXa,BoEjb)
if((PCWXa.unavail==false)&&(Peoqp.oQVDY_modif==FBFZL.info.critical_id_modif))
{
XdIgK.push(Peoqp)
}
}
else
{
}
}
this.LJgbj=XdIgK
this.OgbfJ() 

this.Kwmwn.call(this.UoxFY_callback)
}
this.gfqWT=function(hbmAX)
{
var BgrgN=new Array();
var list_string_products=hbmAX.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 Peoqp=new aTWkK();
if(Peoqp.XAxpb(s_data))
{
BgrgN.push(Peoqp);
}
}
}
this.LJgbj=BgrgN;
var sVxBk=this.RbVBU()
if(WA_getNumberMarketItemsInCart()!=sVxBk)
{
this.OgXUn()
this.drjJS()
}
}
this.wSUwH=function()
{
var wVFjq=''
try{wVFjq=CONST_WA_GLOBAL_SETTINGS.currency_mnemonic}catch(e){}
return wVFjq
}
this.ErkCq=function(fxdqa)
{
var list2=new Array();
var BgrgN=this.LJgbj
for(var i=0;i<BgrgN.length;i++)
{
var Peoqp=BgrgN[i];
if(i!=fxdqa)
{
list2.push(Peoqp);
}
}
this.LJgbj=list2;
this.OgbfJ()
}
this.addProductToShoppingCard=function(PCWXa,optionsValues)
{
if(this.IQJoJ()==false)
{
WA_Dialog.alert(Translator.tr("You can't use shopping card Your browser doesnt accept cookies !"));
return false;
}
var aPOMV=PCWXa.obj
var BgrgN=this.wgRbm();
var n=BgrgN.length
var kBWha=new aTWkK()
kBWha.TnPuG(PCWXa,n);
kBWha.m_opt_vals=optionsValues
var b_match=false;
for(var i=0;i<BgrgN.length;i++)
{
var Peoqp=BgrgN[i];
if(Peoqp.KgGlb()==kBWha.KgGlb())
{
b_match=true;
Peoqp.Ztpeb++;
}
}
if(b_match==false)
{
var ZSkoZ=this.umtgq("data")
var ZGtAG=kBWha.ptrPp()
var ZokqQ=ZSkoZ.length+ZGtAG.length 
if(ZokqQ>4000)
{
WA_Dialog.alert(Translator.tr("Cookies cart contains max data !"));
return false;
}
BgrgN.push(kBWha);
}
return true
}
this.fTidP=function()
{
var BgrgN=this.LJgbj
var ZSkoZ="";
for(var i=0;i<BgrgN.length;i++)
{
var info=BgrgN[i];
ZSkoZ+=info.ptrPp()+";";
}
return ZSkoZ;
}
this.RbVBU=function()
{
var DWMAB=0;
var BgrgN=this.LJgbj;
for(var i=0;i<BgrgN.length;i++)
{
var Peoqp=BgrgN[i];
DWMAB+=Peoqp.Ztpeb
}
return DWMAB;
}
this.OgXUn=function()
{
this.jaeYW("nb_items",this.RbVBU())
}
this.OgbfJ=function()
{
var BgrgN=this.LJgbj
var ZSkoZ=this.fTidP()
this.jaeYW("data",ZSkoZ)
this.OgXUn()
this.drjJS();
}
this.drjJS=function()
{
WA_refreshNumberMarketItemsInCart()
}
this.wgRbm=function()
{
return this.LJgbj;
}
this.IQJoJ=function()
{
this.jaeYW("watestcookies","test")
return(this.umtgq("watestcookies")=="test");
}
this.jaeYW=function(key,val)
{
if((val==null)||(val==undefined)) val="";
WA_SetCookie("crbst-card-"+key,val)
}
this.umtgq=function(key)
{
var UoxFY=WA_GetCookie("crbst-card-"+key)
if(UoxFY=="null")UoxFY="";
return ""+UoxFY
}
this.OvCQb=function(v)
{
v=this.cJoBg(v)
var result="";
if(Math.ceil(v)==v)result=""+v;
else
{
var s=v+"";
var n=s.indexOf(".");
if(n==-1)n=s.indexOf(",");
if(n>-1)
{
s=s+"00";
s=s.substring(0,n+3);
}
result=s;
}
return result;
}
this.ItmNS=function(v)
{
var result=this.OvCQb(v);
if(CONST_WA_GLOBAL_SETTINGS.currency_code=="GBP")
{
result=this.wSUwH()+result;
}
else
{
result=result+" "+this.wSUwH();
}
return result;
}
this.Nqnqn=function(v)
{
return this.OvCQb(v)+" "+CONST_WA_GLOBAL_SETTINGS.currency_code;
}
this.cJoBg=function(MadCB)
{
return Math.round(MadCB*100)/100
}
this.gFaGs=function()
{
var BgrgN=this.wgRbm()
var price=0;
for(var i=0;i<BgrgN.length;i++)
{
var Peoqp=BgrgN[i];
price+=(Peoqp.PWipX()*Peoqp.Ztpeb);
}
return price;
}
this.atBDV=function()
{
var MadCB=this.gFaGs()
var fZhhb=0;
var BgrgN=CONST_WA_GLOBAL_SETTINGS.list_promo_codes
for(var i=0;i<BgrgN.length;i++)
{
var WqIfl=BgrgN[i];
if(MD5(trimString(this.tfTxo.HDbRm.toUpperCase()))==WqIfl.c)
{
fZhhb=WqIfl.v/100;
break;
}
}
return MadCB*fZhhb;
}
this.computeShippingForValue=function(val)
{
var EAOYQ=CONST_WA_GLOBAL_SETTINGS.shipping_type
if(EAOYQ==kqotb)return 0;
var ship_val=0;
var DYLBi=CONST_WA_GLOBAL_SETTINGS.shipping_intervals
for(var i=0;i<DYLBi.length;i++)
{
var XmKDI=DYLBi[i];
if(XmKDI.v<val)ship_val=XmKDI.p
}
return ship_val;
}
this.iFgwT=function(CGEoB)
{
var CQpnX=CONST_WA_GLOBAL_SETTINGS.cKDeD_list_extra_shipping_by_country_code
if(CQpnX==undefined)
{
CQpnX=new Array()
CONST_WA_GLOBAL_SETTINGS.cKDeD_list_extra_shipping_by_country_code=CQpnX;
var THhuO=CONST_WA_GLOBAL_SETTINGS.list_extra_shipping_by_country_code
for(var fxdqa in THhuO)
{
var AOfCm=THhuO[fxdqa];
var uSDVG=AOfCm.c
for(var CpVGK in uSDVG)
{
var DvSFp=uSDVG[CpVGK];CQpnX[DvSFp]=AOfCm.p;
}
}
}
return CQpnX[CGEoB];
}
this.sDBXk=function(CGEoB)
{
var CQpnX=CONST_WA_GLOBAL_SETTINGS.cKDeD_list_tva_by_country_code
if(CQpnX==undefined)
{
CQpnX=new Array()
CONST_WA_GLOBAL_SETTINGS.cKDeD_list_tva_by_country_code=CQpnX;
var THhuO=CONST_WA_GLOBAL_SETTINGS.list_tva_by_country_code
for(var fxdqa in THhuO)
{
var AOfCm=THhuO[fxdqa];
var uSDVG=AOfCm.c;
for(var CpVGK in uSDVG)
{
var DvSFp=uSDVG[CpVGK];CQpnX[DvSFp]=AOfCm.p;
}
}
}
return CQpnX[CGEoB];
}
this.uuoMj=function()
{
var EAOYQ=CONST_WA_GLOBAL_SETTINGS.shipping_type
var BgrgN=this.wgRbm()
var global_ref_for_shipping=0;
var EPnAh=0;
var bQLqf=this.tfTxo.bQLqf;
if(bQLqf.length>0)
{
EPnAh=this.iFgwT(bQLqf);
if(isNaN(EPnAh)) EPnAh=0;
}
for(var i=0;i<BgrgN.length;i++)
{
var Peoqp=BgrgN[i];
if(EAOYQ==JiTBj)
{
global_ref_for_shipping+=(Peoqp.Ztpeb*Peoqp.PWipX());
}
if(EAOYQ==wpFcF)
{
global_ref_for_shipping+=(Peoqp.Ztpeb*Peoqp.SJdOG);
}
}
return EPnAh+this.cJoBg(this.computeShippingForValue(global_ref_for_shipping));
}
this.WouTO=function()
{
return CONST_WA_GLOBAL_SETTINGS.tva_type==MmAal
}
this.oGosH=function()
{
return CONST_WA_GLOBAL_SETTINGS.tva_type==JwsHh
}
this.rusaE=function()
{
return CONST_WA_GLOBAL_SETTINGS.tva_type==NZFMv
}
this.RdilR=function()
{
if(this.rusaE())return 0;
var tax=0;
var country_code=this.tfTxo.bQLqf;
if(country_code.length>0)
{
tax=this.sDBXk(country_code);
if(isNaN(tax))tax=0;
}
return tax;
}
this.qDYsA=function(MadCB)
{
if(this.WouTO())
{
var n0=this.RdilR()/100;
return MadCB*(n0/(1+n0));
}
if(this.oGosH())
{
return MadCB*this.RdilR()/100;
}
return MadCB;
}
this.MorET=function()
{
if(this.rusaE())return 0;
var BgrgN=this.wgRbm()
var aiYRc=0;
var HbwNI=0;
for(var i=0;i<BgrgN.length;i++)
{
var Peoqp=BgrgN[i];
aiYRc+=(Peoqp.PWipX()*Peoqp.Ztpeb);
}
aiYRc+=this.uuoMj();
HbwNI=this.cJoBg(this.qDYsA(aiYRc));
return HbwNI;
}
this.aNQtm=function()
{
var MadCB=0;
MadCB+=this.gFaGs()
if(this.oGosH())MadCB+=this.MorET()
MadCB+=this.uuoMj()
MadCB-=this.atBDV()
return MadCB;
}
}
function PZXxH(kCbYb,KFHNC)
{
if(kCbYb.lab<KFHNC.lab) return-1;
if(kCbYb.lab>KFHNC.lab) return 1;
return 0
}
function WA_marketWatchQuantity()
{
var beHjF=WA_Dialog.getCurrent()
beHjF.gdWrW()
}
function WA_displayDialogMarketCart()
{
var beHjF=new WA_Dialog();
beHjF.vptSC=false;
beHjF.vphMs=function()
{
this.uKRRs()
this.vptSC=setInterval("WA_marketWatchQuantity()",400)
}
beHjF.uKRRs=function()
{
if(this.vptSC)clearInterval(this.vptSC)
}
beHjF.gdWrW=function()
{
var kwXIR=VtUNI();
var MUftQ=kwXIR.wgRbm();
for(var n=0;n<MUftQ.length;n++)
{
var Peoqp=MUftQ[n]
var ldnCb=document.getElementById("wa-cart-quantity-"+n)
var IAIEJ=ldnCb.value
var fASmK=parseInt(IAIEJ)
if(isNaN(fASmK))fASmK=0;
if((IAIEJ!='')&&(fASmK+""!=IAIEJ))
{
ldnCb.value=""+fASmK
}
if(fASmK!=Peoqp.Ztpeb)
{
Peoqp.Ztpeb=fASmK
kwXIR.OgbfJ()
this.KUvtG()
}
}
var wZjNZ=document.getElementById("wa-promo-code")
if(wZjNZ)
{
if(wZjNZ.value!=Peoqp.HDbRm)
{
kwXIR.tfTxo.HDbRm=wZjNZ.value
this.KUvtG()
}
}
}
beHjF.onCustomKeypress=function(XHAlG)
{
if(XHAlG==13)
{
wa_timeout(Delegate.create(this,this.aBpuC),0);
}
return false;
}
beHjF.closeWin=function()
{
this.uKRRs()
this.intern_closeWin()
}
beHjF.KUvtG=function()
{
var kwXIR=VtUNI();
var MUftQ=kwXIR.wgRbm();
if(MUftQ.length==0) return;
for(var n=0;n<MUftQ.length;n++)
{
var Peoqp=MUftQ[n]
var XCMeP=document.getElementById("wa-cart-total-"+n)
var MadCB=Peoqp.PWipX() 
var ZudIj=Peoqp.Ztpeb*MadCB
var TGqhP="<span style='"
TGqhP+=(ZudIj>0)?"color:"+WA_GLOBAL_COLOR_THEME.color_text+";font-weight:normal;":"color:#ff0000;font-weight:bold;"
TGqhP+="'>"
TGqhP+=kwXIR.ItmNS(ZudIj)
TGqhP+="</span>"
XCMeP.innerHTML=TGqhP
}
var TnCas=kwXIR.gFaGs()
var uqjXR=kwXIR.MorET()
var FcrSi=kwXIR.uuoMj()
var EfBZl=kwXIR.aNQtm()
var LUlwb=kwXIR.atBDV()
var vclDU=""
var XCMeP=document.getElementById("wa-cart-amount-total")
vclDU+=Translator.tr("Sub total")+" : "+kwXIR.ItmNS(TnCas)
vclDU+="<br>"
if(FcrSi>0)
{
vclDU+="<span>"+Translator.tr("Shipping amount")+" : "+kwXIR.ItmNS(FcrSi)+"</span>";
vclDU+="<br>"
}
if(kwXIR.WouTO()||kwXIR.oGosH())
{
if(kwXIR.WouTO())
{
vclDU+="<div style='width:100%;text-align:left;'>"
vclDU+=Translator.tr("Tax included");
}
if(kwXIR.oGosH())
{
vclDU+="<div>"
vclDU+=Translator.tr("Extra Tax");
}
vclDU+=" : ";
vclDU+=kwXIR.ItmNS(uqjXR)+"</div>";
}
if(LUlwb>0)
{
vclDU+="<span>"+Translator.tr("Promotion")+" : - "+kwXIR.ItmNS(LUlwb)+"</span><br>";
}
vclDU+="<span><b>"+Translator.tr("Total")+" : "+kwXIR.ItmNS(EfBZl)+"</b></span>";
XCMeP.innerHTML=vclDU
}
beHjF.WrufY=function()
{
WA_displayDialogMarketCart()
}
beHjF.liqCs=function()
{
this.closeWin()
}
beHjF.aBpuC=function()
{
var kwXIR=VtUNI();
if(WA_getNumberMarketItemsInCart()==0)return;
var YCfEV=document.getElementById("wa-market-select-country")
kwXIR.tfTxo.bQLqf=YCfEV.value
if(kwXIR.tfTxo.bQLqf=="")
{
var YCfEV=document.getElementById("wa-market-select-country")
if(YCfEV)
{
YCfEV.focus()
YCfEV.style.backgroundColor="#ff0000"
return;
}
}
if(CONST_WA_GLOBAL_SETTINGS.link_sale_condition)
{
if(kwXIR.tfTxo.oXLVP!=true)
{
var DLBWh=document.getElementById("wa-sales-condition")
if(DLBWh)
{
DLBWh.focus()
var JHebB=document.getElementById("wa-sales-condition-label")
JHebB.style.backgroundColor="#ff0000"
return;
}
}
}
if(kwXIR.tfTxo.pMSQG=="")
{
var YCfEV=document.getElementById("wa-market-select-payment")
if(YCfEV)
{
}
YCfEV.focus()
YCfEV.style.backgroundColor="#ff0000"
return;
}
TVWom()
}
beHjF.lTlFQ=function()
{
WA_exec_callback_opera_compliant(this,this.kBJoI)
}
beHjF.kBJoI=function()
{
var kwXIR=VtUNI();

var aivIO=document.getElementById("wa-market-select-country")
kwXIR.tfTxo.bQLqf=aivIO.value
kwXIR.tfTxo.COqGw()
var PBlov=html_getLayer("market-cart-content")
var XWAML=html_getLayer("wa-market-payment-form") 
var TGqhP=""
var MUftQ=kwXIR.wgRbm();
html_SetVisibility(XWAML,(MUftQ.length>0))
if(MUftQ.length==0)
{
TGqhP+="<span style='font-family:Arial;font-size:16px;'>"
TGqhP+=Translator.tr("No articles in Card !")
TGqhP+="</span>"
}
else
{
var acODj="border:1px solid "+WA_GLOBAL_COLOR_THEME.color0+";font-weight:normal;"
var uMdDm="border:1px solid "+WA_GLOBAL_COLOR_THEME.color0+";color:#ff0000;font-weight:bold;"
var RlWew="color:#222222;font-size:12px;"
TGqhP+="<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+";'>"
TGqhP+="<thead style='font-size:13px;border:1px solid;'>"
TGqhP+="<tr>"
TGqhP+="<th  colspan=2 style='"+acODj+"'></th>" 
TGqhP+="<th style='"+acODj+"'  width=70px><b>"+Translator.tr("Price")+"</b></th>"
TGqhP+="<th style='"+acODj+"'  width=70px><b>"+Translator.tr("Quantity")+"</b></th>"
TGqhP+="<th style='"+acODj+"'  width=70px><b>"+Translator.tr("Total")+"</b></th>"
TGqhP+="<th style='"+acODj+"'  width=90px></th>"
TGqhP+="</tr>"
for(var n=0;n<MUftQ.length;n++)
{
var Peoqp=MUftQ[n]
TGqhP+="<tr>"
TGqhP+="<th style='"+acODj+"' >"
var FBFZL=wa_global_market.markets[Peoqp.bwkNi]
var ggUJs=new Size(30,30)
var sfBTv=ggUJs
if(FBFZL.info.design.crop_thumb==false)
{
sfBTv=Peoqp.PCWXa.size_thumb.clone()
sfBTv.scale(ggUJs)
}
else
{
}
if(Peoqp.PCWXa.img_thumb.length>0)
TGqhP+="<img border=0 src='"+Peoqp.PCWXa.img_thumb+"' width="+sfBTv.width+"px height="+sfBTv.height+"px>"
TGqhP+="</th>"
TGqhP+="<th style='"+acODj+"text-align:left;padding:5px;background-color:"+WA_GLOBAL_COLOR_THEME.color1+";' >"
TGqhP+="<b>"+Peoqp.VLvGC+"</b>"
if(Peoqp.sZaGH.length>0)
{
TGqhP+="<span style='"+RlWew+"'>";
TGqhP+=" ["+Peoqp.sZaGH+"]";
TGqhP+="</span>";
}
if(Peoqp.m_opt_vals)
{
TGqhP+="<br>"
TGqhP+="<span style='"+RlWew+"'>";
for(var i_opt=0;i_opt<Peoqp.PCWXa.options.length;i_opt++)
{
var fHFtU=Peoqp.PCWXa.options[i_opt]
if(fHFtU)
{
var HJvxF=Peoqp.m_opt_vals[i_opt];
var aAhZt=fHFtU.title;
if(aAhZt.length>0)
{
TGqhP+=aAhZt;
TGqhP+=":"
}
TGqhP+=fHFtU.vals[HJvxF];
TGqhP+=" "
}
}
TGqhP+="</span>";
}
TGqhP+="</th>"
var MadCB=Peoqp.PWipX()
TGqhP+="<th style='"+acODj+"' >"+kwXIR.ItmNS(MadCB)+"</th>"
TGqhP+="<th style='"+acODj+"'  align=center><input type=text id='wa-cart-quantity-"+n+"' style='width:45px;' maxlength=3 value='"+Peoqp.Ztpeb+"' type=text/></th>"
TGqhP+="<th style='"
var ZudIj=Peoqp.Ztpeb*MadCB
TGqhP+=(ZudIj>0)?acODj:uMdDm;
TGqhP+="' ><span id='wa-cart-total-"+n+"'>"
TGqhP+=kwXIR.ItmNS(ZudIj)
TGqhP+="</span></th>"
TGqhP+="<th style='"+acODj+"' ><a href=\"javascript:WA_marketRemoveItem("+n+")\">"+Translator.tr("Remove card item")+"</a></th>"
TGqhP+="</tr>"
}
TGqhP+="<tr>"
TGqhP+="<th style='"+acODj+"text-align:right;padding:5px;' id='wa-cart-amount-total'  colspan=5>&nbsp;</th>"
TGqhP+="<th style='"+acODj+"' ></th>"
TGqhP+="</tr>"
TGqhP+="</thead>"
TGqhP+="</table>"
TGqhP+="<br>"
}
PBlov.innerHTML=TGqhP
this.vphMs()
WA_exec_callback_opera_compliant(this,this.KUvtG) 
}
beHjF.LgKSa=function()
{
var kwXIR=VtUNI();
this.addButton(Translator.tr("Continue Shopping"),this.liqCs,[""],this)
this.addButton(Translator.tr("Checkout order"),this.aBpuC,[""],this)
this.initializeWindow(670,700)
var PXclt="font-family:Arial;font-size:12px;color:#000000;"
var TGqhP=""
TGqhP+="<div id='market-cart-content' style='width:100%;"+PXclt+"' align=center>" 
TGqhP+="</div>"
TGqhP+="<br>"
TGqhP+="<div style='width:100%;"+PXclt+"' align=center id='wa-market-payment-form'>"
TGqhP+="<br>"
TGqhP+="<span style='font-weight:bold;'>"
TGqhP+=Translator.tr("Please choose a country to deliver your order")
TGqhP+="</span>"
TGqhP+="<br>"
TGqhP+="<select onchange=\"WA_marketChangeCountry(this)\" id='wa-market-select-country'>"
if(CONST_WA_GLOBAL_SETTINGS.default_selected_country.length==0)
{
TGqhP+="<option value=\"\">...</option>"
}
var LERnj=CONST_WA_GLOBAL_SETTINGS.list_favorite_country
var quFww=CONST_WA_GLOBAL_SETTINGS.list_country 
var aFhku=new Array()
for(var OisfA=0;OisfA<LERnj.length;OisfA++)
{
var ALbQp=LERnj[OisfA]
aFhku.push({code:ALbQp,lab:Translator.country(ALbQp)})
}
for(var OisfA=0;OisfA<aFhku.length;OisfA++)
{
var UoxFY=aFhku[OisfA]
var ALbQp=UoxFY.code
TGqhP+="<option "
if(kwXIR.tfTxo.aOFpk()==ALbQp)TGqhP+="selected "
TGqhP+="value=\""+ALbQp+"\">"+Translator.country(ALbQp)+"</option>"
}
if((LERnj.length>0)&&(quFww.length>0))
{
TGqhP+="<option value=\"\">-----</option>"
}
var lhgYh=new Array()
for(var OisfA=0;OisfA<quFww.length;OisfA++)
{
var ALbQp=quFww[OisfA]
lhgYh.push({code:ALbQp,lab:Translator.country(ALbQp)})
}
if((LERnj.length==0)&&(quFww.length==0))
{
var BgrgN=CONST_WA_COUNTRIES.codes
for(var OisfA=0;OisfA<BgrgN.length;OisfA++)
{
var ALbQp=BgrgN[OisfA]
lhgYh.push({code:ALbQp,lab:Translator.country(ALbQp)})
}
}
lhgYh.sort(PZXxH)
for(var OisfA=0;OisfA<lhgYh.length;OisfA++)
{
var UoxFY=lhgYh[OisfA]
var ALbQp=UoxFY.code
TGqhP+="<option "
if(kwXIR.tfTxo.aOFpk()==ALbQp)TGqhP+="selected "
TGqhP+="value=\""+ALbQp+"\">"+Translator.country(ALbQp)+"</option>"
}
TGqhP+="</select>"
TGqhP+="<br>"
TGqhP+="<br>"
if(CONST_WA_GLOBAL_SETTINGS.link_sale_condition)
{
TGqhP+="<a "+WA_LinkToHref(CONST_WA_GLOBAL_SETTINGS.link_sale_condition)+" style='color:#0000ff'>"
TGqhP+=Translator.tr("Terms of sell")
TGqhP+="</a>"
TGqhP+="<br>" 
TGqhP+="<span id='wa-sales-condition-label'  style='font-weight:bold;'>"
TGqhP+=Translator.tr("label_market_accept_terms")
TGqhP+="</span>"
TGqhP+="<input id='wa-sales-condition' onchange=\"WA_marketChangeSalesCondition(this)\" "
TGqhP+=(kwXIR.tfTxo.oXLVP)?"checked ":""
TGqhP+="type='checkbox' value='1'/>" 
TGqhP+="<br>"
TGqhP+="<br>"
}
TGqhP+="<span style='font-weight:bold;'>"
TGqhP+=Translator.tr("Choose a type of payment")
TGqhP+="</span>"
TGqhP+="<br>"
TGqhP+="<select onchange=\"WA_marketChangeTypePayment(this)\" id='wa-market-select-payment'>"
var NRVXV=CONST_WA_GLOBAL_SETTINGS.list_type_payment
if((NRVXV.length>1)||(NRVXV.length==0))
{
TGqhP+="<option value=\"\">...</option>"
}
for(var OisfA=0;OisfA<NRVXV.length;OisfA++)
{
var pMSQG=NRVXV[OisfA]
TGqhP+="<option "
if(kwXIR.tfTxo.pMSQG==pMSQG)TGqhP+="selected "
TGqhP+="value=\""+pMSQG+"\">"+Translator.tr("label_market_"+pMSQG)+"</option>"
}
TGqhP+="</select>"
if(CONST_WA_GLOBAL_SETTINGS.list_promo_codes)
{
var BgrgN=CONST_WA_GLOBAL_SETTINGS.list_promo_codes
TGqhP+="<br>"
TGqhP+="<br>"
TGqhP+="<span id='wa-promo-code-label'  style='font-weight:bold;'>"
TGqhP+=Translator.tr("form-label-code_promo")
TGqhP+="</span><br>"
TGqhP+="<input id='wa-promo-code' onchange=\"WA_marketChangePromoCode(this)\" " 
TGqhP+=" value='"+kwXIR.tfTxo.HDbRm+"' "
TGqhP+="/>"
TGqhP+="<br>" 
}
TGqhP+="</div>"
this.writeContent(TGqhP)
var PBlov=html_getLayer("market-cart-content")
PBlov.innerHTML="<div width=100% align=center><img src='wa_loading.gif'></div>" 

kwXIR.iDLpd(this,this.lTlFQ)
}
beHjF.LgKSa() 
}
function WA_marketChangeCountry(YCfEV)
{
YCfEV.style.backgroundColor=""
var beHjF=WA_Dialog.getCurrent()
beHjF.lTlFQ()
}
function WA_marketChangeTypePayment(YCfEV)
{
var kwXIR=VtUNI();
kwXIR.tfTxo.pMSQG=YCfEV.value
kwXIR.tfTxo.COqGw()
YCfEV.style.backgroundColor=""
}
function WA_marketChangeSalesCondition(tVWKc)
{
var kwXIR=VtUNI();
kwXIR.tfTxo.oXLVP=tVWKc.checked
kwXIR.tfTxo.COqGw() 
var JHebB=document.getElementById("wa-sales-condition-label")
JHebB.style.backgroundColor="" 
}
function WA_marketChangePromoCode(tVWKc)
{
var kwXIR=VtUNI();
kwXIR.tfTxo.HDbRm=tVWKc.value
kwXIR.tfTxo.COqGw() 


}
function WA_LinkToHref(ZAcKe)
{
var TGqhP=""
var ePHJT=ZAcKe.url
var JJNhX=Translator.m_lang_for_filename
if(JJNhX.length>0)JJNhX="_"+JJNhX
ePHJT=ePHJT.replace(/@lng@/g,JJNhX)
TGqhP+="href=\""+ePHJT+"\" "
if(ZAcKe.open==1)
{
TGqhP+="target="
TGqhP+="_blank"
}
return TGqhP;
}
function WA_displayDialogMarketProduct(vUqAG,fxdqa)
{
var LHCPQ=wa_global_market.markets[vUqAG]
var diTLd=LHCPQ.obj
var JatIk=diTLd.info.products
var PCWXa=JatIk[fxdqa] 

var beHjF=new WA_Dialog();

beHjF.PCWXa=PCWXa
beHjF.XQEOs=vUqAG
beHjF.WrufY=function()
{
WA_displayDialogMarketCart()
}
beHjF.OSXkE=function()
{
var kwXIR=VtUNI();
kwXIR.iDLpd(this,this.GoBeY) 
}
beHjF.GoBeY=function()
{
var PCWXa=this.PCWXa;
var kwXIR=VtUNI();
var JFNKI=new Array();
var PAFUW=PCWXa.obj.id;
for(var i=0;i<3;i++)
{
var FsBGi=-1;
var gXHwb=PAFUW+"-select-opt"
var YCfEV=document.getElementById(gXHwb+i)
if(YCfEV)
{
if(YCfEV.value.length==0)
{
YCfEV.style.backgroundColor="#ff0000";
YCfEV.focus()
return;
}
FsBGi=parseInt(YCfEV.value)
}
JFNKI.push(FsBGi)
}
if(kwXIR.addProductToShoppingCard(PCWXa,JFNKI))
{
kwXIR.OgbfJ()
WA_displayDialogMarketCart()
}
}
beHjF.LgKSa=function()
{
var vUqAG=this.XQEOs
var PCWXa=this.PCWXa
var TGqhP=""
this.addButton(Translator.tr("Go to my card"),this.WrufY,[""],this)
if(PCWXa.unavail==false)
{
this.addButton(Translator.tr("Add to card"),this.OSXkE,[""],this)
}
this.initializeWindow(670,this.idealHeight())
TGqhP+="<table border=0 width=100% cellpadding=4>"
TGqhP+="<tr>" 
if(PCWXa.img_big.length>0)
{
TGqhP+="<td width='100px' align=center valign=top>"
var sfBTv=PCWXa.size_thumb.clone() 
sfBTv.scale(new Size(200,200))
TGqhP+="<a href=\""+PCWXa.img_big+"\" target=_blank>"
TGqhP+="<img border=0 src=\""+PCWXa.img_big+"\" width='"+sfBTv.width+"px' height='"+sfBTv.height+"px'>"
TGqhP+="</a>"
TGqhP+="</td>"
}
var oYhYX="color:"+WA_GLOBAL_COLOR_THEME.color_text+";";
TGqhP+="<td valign=top style='font-family:Arial;'>"
TGqhP+="<span style='font-weight:bold;font-size:16px;"+oYhYX+"'>"
TGqhP+=PCWXa.title
TGqhP+="</span>"
TGqhP+="<br>"
if(PCWXa.sub_title.length>0)
{
TGqhP+="<span style='color:#333333;font-size:14px;'>"
TGqhP+=PCWXa.sub_title
TGqhP+="</span>"
TGqhP+="<br>"
}
TGqhP+="<br>"
TGqhP+="<table border=0 width=100% cellspacing=0 cellpadding=0><tr><td>"
TGqhP+="<span style='"+oYhYX+";font-size:14px;'>"
TGqhP+=Translator.tr("Price")+" : "
TGqhP+="</span>"
TGqhP+="<span style='"+oYhYX+";font-size:18px;font-weight:bold;' id='"+PCWXa.obj.id+"-price'>"
if(PCWXa.unavail)
{
TGqhP+=Translator.tr("Unavailable")
}
TGqhP+="</span>"
if(PCWXa.more_info)
{
TGqhP+="</td><td align=right>"
var ZAcKe=PCWXa.more_info
var slwUV=WA_LinkToHref(ZAcKe)
TGqhP+="<a "+slwUV+" style='font-family:Arial;text-decoration:underline;font-weight:bold;font-size:12px;color:0000ff;'>"+Translator.tr("More product info link")+"</a>"
}
TGqhP+="</td></tr></table>"
TGqhP+="<br>"
var xOEcs=PCWXa.obj.index
if(PCWXa.unavail==false)
if(PCWXa.options.length>0)
{
TGqhP+="<table border=0 cellspacing=0 cellpadding=0>"
for(var n=0;n<PCWXa.options.length;n++)
{
var fHFtU=PCWXa.options[n]
if(fHFtU)
{
TGqhP+="<tr><td align=right>"
TGqhP+="<span style='font-family:Arial;font-weight:bold;font-size:12px;"+oYhYX+"'>"
TGqhP+=fHFtU.title+" :&nbsp;"
TGqhP+="</span>"
TGqhP+="</td><td align=left>"
TGqhP+="<select id='"+PCWXa.obj.id+"-select-opt"+n+"' onchange=\"WA_market_changeCustomPrice('"+vUqAG+"',"+xOEcs+")\">"
TGqhP+="<option value=\"\">...</option>"
for(var OisfA=0;OisfA<fHFtU.vals.length;OisfA++)
{
var cPwOd=fHFtU.vals[OisfA]
TGqhP+="<option value=\""+OisfA+"\">"+cPwOd+"</option>"
}
TGqhP+="</select>"
TGqhP+="</td></tr>";
}
}
TGqhP+="</table>"
}
TGqhP+="</td>"
TGqhP+="</tr>"
TGqhP+="</table>"
if(PCWXa.description.length>0)
{
TGqhP+="<table border=0 width=100% cellpadding=4>"
TGqhP+="<tr><td colspan=2>"
TGqhP+="<span style='font-family:Arial;font-size:13px;"+oYhYX+"'>"
TGqhP+="<hr>"
TGqhP+=PCWXa.description
TGqhP+="</span>"
TGqhP+="</td></tr>"
TGqhP+="</table>"
}
this.writeContent(TGqhP)
WA_market_changeCustomPrice(vUqAG,xOEcs)
}
beHjF.displayWindowWithAutoResize(300,beHjF.LgKSa) 
}
function DdSGt(PCWXa,PAFUW)
{
var SJjDn=new Array()
for(var i=0;i<3;i++)
{
var gXHwb=PAFUW+"-select-opt"
var YCfEV=document.getElementById(gXHwb+i)
SJjDn[i]=-1
if(YCfEV)
{
YCfEV.style.backgroundColor="";
var cPwOd=parseInt(YCfEV.value)
if(isNaN(cPwOd)==false)
SJjDn[i]=cPwOd
}
}
return KqwvB(PCWXa,SJjDn)
}
function KqwvB(PCWXa,SJjDn)
{
if(PCWXa.unavail)return;
var VYSmP=false;
for(var i=0;i<PCWXa.custom_prices.length;i++)
{
var ttMMX=PCWXa.custom_prices[i]
var VliUO=true;
for(var n=0;n<3;n++)
{
if(ttMMX.tab[n]!=SJjDn[n])VliUO=false
}
if(VliUO)
{
VYSmP=ttMMX;
break;
}
}
var MadCB=PCWXa.price
if(VYSmP)
{
MadCB=VYSmP.pr
}
return MadCB;
}
function WA_market_changeCustomPrice(vUqAG,xOEcs)
{
var kwXIR=VtUNI();
var LHCPQ=wa_global_market.markets[vUqAG]
var JatIk=LHCPQ.info.products;
var PCWXa=JatIk[xOEcs]
if(PCWXa.unavail)return;
var PAFUW=PCWXa.obj.id
var MadCB=DdSGt(PCWXa,PAFUW)
var wxJPq=html_getLayer(PAFUW+"-price")
if(wxJPq)
{
wxJPq.innerHTML=kwXIR.ItmNS(MadCB)
}
}
function TVWom()
{
var kwXIR=VtUNI();
if(WA_getNumberMarketItemsInCart()==0)return;
var Peoqp=kwXIR.tfTxo
if((kwXIR.hgUXV)&&(Peoqp.pMSQG=="paypal"))
{
YFZAP();
return;
}
UxltQ(tmDPq)
}
function UxltQ(nniZR)
{
var kwXIR=VtUNI();
var Peoqp=kwXIR.tfTxo
Peoqp.ADFBD()
var beHjF=new WA_Dialog();
beHjF.nniZR=nniZR
beHjF.JdUWe=function(XHAlG)
{
return Translator.tr("form-label-"+XHAlG)
}
beHjF.onCustomKeypress=function(XHAlG)
{
if(XHAlG==13)
{
wa_timeout(Delegate.create(this,this.KYnha),0);
}
return false;
}
beHjF.BVbPq=function()
{
if(this.nniZR==tmDPq)
{
WA_displayDialogMarketCart()
}
else
{
UxltQ(tmDPq)
}
}
beHjF.Fsfcg=function()
{
YFZAP()
}
beHjF.KYnha=function()
{
var kwXIR=VtUNI();
var Peoqp=kwXIR.tfTxo
if(Peoqp.GcqIo(this.nniZR)==false) return;
Peoqp.COqGw()
if(this.nniZR==tmDPq)
{
if(Peoqp.URhlA==true)
{
UxltQ(GgeZx)
}
else
{
this.Fsfcg()
}
}
else
{
this.Fsfcg()
}
}
beHjF.kcVBe=function(XHAlG,GbQub)
{
if(GbQub==undefined) GbQub=""
if(GbQub)GbQub=" size="+GbQub
return "<input name='"+XHAlG+"' value=\""+Peoqp.BqUIV(XHAlG,this.nniZR)+"\" type=text "+GbQub+">"
}
beHjF.osQCA=function(IjLPf)
{
return "<td width=150px align=right valign=top>"+Translator.tr(IjLPf)+" :</td>"
}
beHjF.LgKSa=function()
{
var kwXIR=VtUNI();
var Peoqp=kwXIR.tfTxo
this.addButton("< "+Translator.tr('Back'),this.BVbPq,[""],this)
this.addButton(Translator.tr('Continue')+" >",this.KYnha,[""],this)
this.initializeWindow(600,600)
var xiuAG="form-label-"
var MijTJ=CONST_WA_GLOBAL_SETTINGS.list_form_fields 
var TGqhP=""
TGqhP+="<form id='wa-market-form' onSubmit='return false'>"
TGqhP+="<table border=0 width=100% cellspacing=5 style='font-family:Arial;font-size:15px;'>"
TGqhP+="<tr><td colspan=2 align=center style='font-size:18px;'>"
TGqhP+=Translator.tr((this.nniZR==tmDPq)?"Fill Deliver information below":"Fill Billing information below")
TGqhP+="<br><br></td></tr>"
for(var n=0;n<MijTJ.length;n++)
{
var uJFel=MijTJ[n]
if(uJFel=="address")
{
TGqhP+="<tr>"+this.osQCA("Address");
TGqhP+="<td>"
TGqhP+=this.kcVBe("address_1",30)
TGqhP+="</td></tr>"
TGqhP+="<tr><td></td><td>"
TGqhP+=this.kcVBe("address_2",30)
TGqhP+="</td></tr>"
TGqhP+="<tr>"+this.osQCA("form-label-city");
TGqhP+="<td>"
TGqhP+=this.kcVBe("city")+"&nbsp;"+this.JdUWe("zip")+" : "+this.kcVBe("zip",10)
TGqhP+="</td></tr>"
TGqhP+="<tr>"+this.osQCA("form-label-country");
TGqhP+="<td>"
if(this.nniZR==GgeZx)
{
TGqhP+="<select id='wa-select-form-country' onchange='WA_marketChangeFormCountry("+this.nniZR+")'>"
var lhgYh=new Array();
var BgrgN=CONST_WA_COUNTRIES.codes
for(var OisfA=0;OisfA<BgrgN.length;OisfA++)
{
var ALbQp=BgrgN[OisfA]
lhgYh.push({code:ALbQp,lab:Translator.country(ALbQp)})
}
lhgYh.sort(PZXxH)
var iEiwi=Peoqp.aOFpk()
iEiwi=Peoqp.BqUIV('countryCode',this.nniZR,iEiwi)
for(var OisfA=0;OisfA<lhgYh.length;OisfA++)
{
var UoxFY=lhgYh[OisfA]
var ALbQp=UoxFY.code
TGqhP+="<option "
if(iEiwi==ALbQp)TGqhP+="selected "
TGqhP+="value=\""+ALbQp+"\">"+Translator.country(ALbQp)+"</option>"
}
TGqhP+="</select>"
}
else
{
TGqhP+=Translator.country(kwXIR.tfTxo.bQLqf);
}
TGqhP+="<br><span id='wa-market-state'>"
TGqhP+="<select id='wa-select-state'></select>"
TGqhP+="</span>" 
TGqhP+="</td></tr>"
}
else
{
TGqhP+="<tr>"+this.osQCA("form-label-"+uJFel);
TGqhP+="<td>"
TGqhP+=this.kcVBe(uJFel,30) 
TGqhP+="</td></tr>"
}
}
if(this.nniZR==tmDPq)
{
TGqhP+="<tr><td colspan=2 align=center >"
TGqhP+=Translator.tr("Billing adress is different")+" <input type=checkbox "
if(kwXIR.tfTxo.URhlA)TGqhP+="checked "
TGqhP+="onchange='WA_marketCheckBillingAdress(this)'>"
TGqhP+="</td></tr>"
}
TGqhP+="</table>"
TGqhP+="</form>"
this.writeContent(TGqhP)
WA_exec_callback_opera_compliant(this,this.GHwdm) 
}
beHjF.GHwdm=function()
{
WA_marketChangeFormCountry(this.nniZR)
}
beHjF.LgKSa()
}
function QTkqS(nniZR,YCfEV,CQpnX)
{
var kwXIR=VtUNI();
var Peoqp=kwXIR.tfTxo
var JdwQA=Peoqp.BqUIV("stateCode",nniZR) 
YCfEV.options.length=0
for(var n=0;n<CQpnX.length;n++)
{
var val=CQpnX[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==JdwQA)elOptNew.selected=true
try{
YCfEV.add(elOptNew,null);
}
catch(ex){
YCfEV.add(elOptNew);
}
}
}
function WA_marketChangeFormCountry(nniZR)
{
var kwXIR=VtUNI();
var Peoqp=kwXIR.tfTxo
var CGEoB=Peoqp.bQLqf
var YCfEV=document.getElementById("wa-select-form-country");
if(YCfEV) CGEoB=YCfEV.value;
html_SetDisplay("wa-market-state",(CGEoB=="US")||(CGEoB=="CA"))
var GdZLJ=document.getElementById("wa-select-state");
if(GdZLJ)
{
if(CGEoB=="US") QTkqS(nniZR,GdZLJ,["","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(CGEoB=="CA") QTkqS(nniZR,GdZLJ,["","Alberta","British Columbia","Manitoba","New Brunswick","Newfoundland and Labrador","Northwest Territories","Nova Scotia","Nunavut","Ontario","Prince Edward Isl.","Quebec","Saskatchewan","Yukon Territory"])
}
}
function WA_marketCheckBillingAdress(tVWKc)
{
var kwXIR=VtUNI();
var Peoqp=kwXIR.tfTxo
Peoqp.URhlA=tVWKc.checked
Peoqp.COqGw()
}
function YFZAP()
{
var kwXIR=VtUNI();
var Peoqp=kwXIR.tfTxo
var ohlYD=CONST_WA_GLOBAL_SETTINGS.currency_info 

var beHjF=new WA_Dialog();
beHjF.BVbPq=function()
{
if(this.Peoqp.pMSQG=="paypal")
{
WA_displayDialogMarketCart();return;
}
if(this.Peoqp.URhlA)
UxltQ(GgeZx)
else
UxltQ(tmDPq)
}
beHjF.LcdZc=function(Wdkxi,cPwOd)
{
cPwOd=""+cPwOd
cPwOd=cPwOd.replace(/'/g,"&lsquo;")
return "<input type=hidden name='"+Wdkxi+"' value=\""+cPwOd+"\">"
}
beHjF.UsAVD=function()
{
var kwXIR=VtUNI();
var TGqhP=""
if(ohlYD.charCodeAt(3)>=100) return""
TGqhP+="<form id='wa-http-sender' method=POST action='https://www.paypal.com/cgi-bin/webscr' target='_blank'>"
TGqhP+=this.LcdZc("cmd","_cart")
TGqhP+=this.LcdZc("business",CONST_WA_GLOBAL_SETTINGS.email_paypal_account)
TGqhP+=this.LcdZc("upload","1")
TGqhP+=this.LcdZc("charset","utf-8")
TGqhP+=this.LcdZc("no_note","0")
TGqhP+=this.LcdZc("currency_code",CONST_WA_GLOBAL_SETTINGS.currency_code)
TGqhP+=this.LcdZc("no_shipping","2")
var opUQp=kwXIR.wgRbm()
for(var i=0;i<opUQp.length;i++)
{
var info=opUQp[i];
var index=i+1;
var YJbtv=info.PWipX();
if(kwXIR.WouTO())
{
var bcXpP=kwXIR.cJoBg(kwXIR.qDYsA(YJbtv));
YJbtv=YJbtv-bcXpP;
}
TGqhP+=this.LcdZc("amount_"+index,""+YJbtv)
TGqhP+=this.LcdZc("quantity_"+index,info.Ztpeb)
var eAQgF=0;
if(info.sZaGH.length>0)
{
TGqhP+=this.LcdZc("on"+eAQgF+"_"+index,"ref")
TGqhP+=this.LcdZc("os"+eAQgF+"_"+index,info.sZaGH)
eAQgF++;
}
var NMcqF=""
if(info.m_opt_vals)
{
for(var i_opt=0;i_opt<info.PCWXa.options.length;i_opt++)
{
var fHFtU=info.PCWXa.options[i_opt]
if(fHFtU)
{
var HJvxF=info.m_opt_vals[i_opt];
var ZWKIp=fHFtU.vals[HJvxF]
var aAhZt=fHFtU.title;
if(aAhZt.length==0) aAhZt="opt"+(i_opt+1);
TGqhP+=this.LcdZc("on"+eAQgF+"_"+index,aAhZt)
TGqhP+=this.LcdZc("os"+eAQgF+"_"+index,ZWKIp)
if(NMcqF.length>0)NMcqF=NMcqF+", "
NMcqF+=ZWKIp
eAQgF++;
}
}
}
var WcVlf=info.VLvGC;
if(NMcqF.length>0)WcVlf=WcVlf+"("+NMcqF+")"
TGqhP+=this.LcdZc("item_name_"+index,WcVlf) 
}
var awHtM=kwXIR.uuoMj()
if(kwXIR.WouTO())
{
awHtM=awHtM-kwXIR.cJoBg(kwXIR.qDYsA(awHtM));
}
if(kwXIR.WouTO())
{
var VKPYN=kwXIR.gFaGs();
var iMTxV=kwXIR.uuoMj()
var aiYRc=VKPYN+iMTxV;
var KiUxH=kwXIR.cJoBg(kwXIR.qDYsA(aiYRc));
var LxNCO=aiYRc-KiUxH;
LxNCO=LxNCO-awHtM;
var RUaPI=0;
for(var i=0;i<opUQp.length;i++)
{
var info=opUQp[i];
var index=i+1;
var DWuMQ=0;
var WdOLb=0;
var YJbtv=info.Ztpeb*info.PWipX();
var n0=kwXIR.RdilR()/100;
var tax=YJbtv*(n0/(1+n0));
YJbtv=YJbtv-tax;
DWuMQ=YJbtv;
var ZoKIu=info.PWipX();
var bcXpP=kwXIR.cJoBg(kwXIR.qDYsA(ZoKIu));
ZoKIu=ZoKIu-bcXpP;
WdOLb=info.Ztpeb*ZoKIu;
if(WdOLb>DWuMQ)
{
ZoKIu=info.m_price;
ZoKIu=ZoKIu-bcXpP;
var taBfK=ZoKIu;
if((taBfK>0)&&(taBfK!=info.PWipX()))
{
taBfK=taBfK-0.01;
}
TGqhP+=this.LcdZc("amount_"+index,taBfK) 
WdOLb=info.m_quantity*taBfK;
}
RUaPI+=WdOLb;
}
var ASkrV=kwXIR.cJoBg(LxNCO-RUaPI);
if(ASkrV>0)
{
var index=opUQp.length+1;
TGqhP+=this.LcdZc("item_name_"+index,Translator.tr("TVA correction"))
TGqhP+=this.LcdZc("quantity_"+index,1)
TGqhP+=this.LcdZc("amount_"+index,ASkrV)
}
TGqhP+=this.LcdZc("tax_cart",KiUxH)
}
else
{
TGqhP+=this.LcdZc("tax_cart",kwXIR.MorET())
}
TGqhP+=this.LcdZc("handling_cart",awHtM) 
TGqhP+="</form>"
return TGqhP;
}
beHjF.KIVwA=function()
{
var NSCTC=this.rBalp(tmDPq);
var TGqhP="";
if(NSCTC.length>0)
{
TGqhP+=""+Translator.tr("Shipping information")+":\n";
TGqhP+=NSCTC;
}
return TGqhP;
}
beHjF.dxpXN=function()
{
var NSCTC=this.rBalp(GgeZx);
var TGqhP="";
if(NSCTC.length>0)
{
TGqhP+=Translator.tr("Billing information")+":\n";
TGqhP+=NSCTC;
}
return TGqhP;
}
beHjF.rBalp=function(nniZR)
{
var kwXIR=VtUNI();
var TGqhP="";
var LAITG=new Array();
var MijTJ=aBgfg(CONST_WA_GLOBAL_SETTINGS.list_form_fields)
MijTJ.push("country")
MijTJ.push("state")
for(var i=0;i<MijTJ.length;i++)
{
var iSDtS=MijTJ[i];
LAITG[iSDtS]=this.Peoqp.BqUIV(iSDtS,nniZR)
}
if(LAITG["firstname"])TGqhP+=LAITG["firstname"]+"\n"
if(LAITG["lastname"])TGqhP+=LAITG["lastname"]+"\n"
if(LAITG["company"])
{
TGqhP+=Translator.tr("form-label-company")+" : "+LAITG["company"]+"\n"
}
if(LAITG["fiscal_code"]) TGqhP+=Translator.tr("form-label-fiscal_code")+" : "+LAITG["fiscal_code"]+"\n"
if(LAITG["tva"]) TGqhP+=Translator.tr("form-label-tva")+" : "+LAITG["tva"]+"\n"
if(LAITG["address_1"]) TGqhP+=LAITG["address_1"]+"\n"
if(LAITG["address_2"]) TGqhP+=LAITG["address_2"]+"\n"
if(LAITG["zip"]) TGqhP+=LAITG["zip"]+" "
if(LAITG["city"]) TGqhP+=LAITG["city"]+"\n"
if(LAITG["country"])TGqhP+=Translator.country(LAITG["country"])
if(LAITG["state"]&&LAITG["state"].length>0) TGqhP+=" "+LAITG["state"];
TGqhP+="\n"
if(LAITG["phone"]) TGqhP+=Translator.tr("form-label-phone")+" : "+LAITG["phone"]+"\n"
if(LAITG["fax"]) TGqhP+=Translator.tr("form-label-fax")+" : "+LAITG["fax"]+"\n"
if(LAITG["email"]) TGqhP+=LAITG["email"]+"\n" 
if(LAITG["comment"])
{
TGqhP+=Translator.tr("form-label-comment")+" : \n";
TGqhP+=LAITG["comment"]+"\n"
}
return TGqhP;
}
beHjF.LHcFX=function()
{
var kwXIR=VtUNI();
var TGqhP="";
var opUQp=kwXIR.wgRbm();
TGqhP+="**************\n"
for(var i=0;i<opUQp.length;i++)
{
var Peoqp=opUQp[i];
var index=i+1;
var WcVlf=Peoqp.VLvGC;
if(Peoqp.sZaGH.length>0)
{
WcVlf+=" ["+Peoqp.sZaGH+"]";
}
var NMcqF=""
if(Peoqp.m_opt_vals)
{
for(var i_opt=0;i_opt<Peoqp.PCWXa.options.length;i_opt++)
{
var fHFtU=Peoqp.PCWXa.options[i_opt]
if(fHFtU)
{
if(NMcqF.length>0)NMcqF=NMcqF+", "
var HJvxF=Peoqp.m_opt_vals[i_opt];
var ZWKIp=fHFtU.vals[HJvxF]
var aAhZt=fHFtU.title;
if(aAhZt.length>0) NMcqF+=aAhZt+" : "
NMcqF+=ZWKIp
}
}
}
if(NMcqF.length>0)WcVlf=WcVlf+"\n("+NMcqF+")"
TGqhP+=WcVlf;
TGqhP+="\n"
TGqhP+=Translator.tr("Price")+" : "+kwXIR.Nqnqn(Peoqp.PWipX())+"\n"
TGqhP+=Translator.tr("Quantity")+" : "+Peoqp.Ztpeb+"\n"
TGqhP+=Translator.tr("Total")+" : "+kwXIR.Nqnqn(Peoqp.PWipX()*Peoqp.Ztpeb);
TGqhP+="\n"
TGqhP+="**************\n"
}
var TnCas=kwXIR.gFaGs()
var uqjXR=kwXIR.MorET()
var FcrSi=kwXIR.uuoMj()
var EfBZl=kwXIR.aNQtm()
var LUlwb=kwXIR.atBDV() 
TGqhP+=Translator.tr("Sub total")+" : "+kwXIR.Nqnqn(TnCas)+"\n";
if(CONST_WA_GLOBAL_SETTINGS.shipping_type!=kqotb)
{
TGqhP+=Translator.tr("Shipping amount")+" : "+kwXIR.Nqnqn(FcrSi)+"\n";
}
if(kwXIR.WouTO()||kwXIR.oGosH())
{
if(kwXIR.WouTO())
{
TGqhP+=Translator.tr("Tax included");
}
if(kwXIR.oGosH())
{
TGqhP+=Translator.tr("Extra Tax");
}
TGqhP+=" : ";
TGqhP+=kwXIR.Nqnqn(uqjXR)+"\n";
}
if(LUlwb>0)
{
TGqhP+=Translator.tr("Promotion")+" : - "+kwXIR.Nqnqn(LUlwb)+"\n";
}
TGqhP+=Translator.tr("Total")+" : "+kwXIR.Nqnqn(EfBZl)+"\n";
return TGqhP;
}
beHjF.IxrhV=function()
{
var kwXIR=VtUNI();
var TGqhP="";
var opUQp=kwXIR.wgRbm()
TGqhP+="<table border=1 style=\"width:100%;text-align: left; margin-left: auto; margin-right: auto;\" cellpadding=2 cellspacing=2>"
TGqhP+="<tr class=\"crbst-table-title\">"
TGqhP+="<td>&nbsp;</td>"
TGqhP+="<td>"+Translator.tr("Price")+"</td>"
TGqhP+="<td>"+Translator.tr("Quantity")+"</td>"
TGqhP+="<td>"+Translator.tr("Total")+"</td>"
TGqhP+="</tr>"
for(var i=0;i<opUQp.length;i++)
{
TGqhP+="<tr>"
var Peoqp=opUQp[i];
var index=i+1;
TGqhP+="<td>"
var WcVlf=Peoqp.VLvGC;
if(Peoqp.sZaGH.length>0)
{
WcVlf+=" ["+Peoqp.sZaGH+"]";
}
WcVlf="<b>"+WcVlf+"</b>"
var NMcqF=""
if(Peoqp.m_opt_vals)
{
for(var i_opt=0;i_opt<Peoqp.PCWXa.options.length;i_opt++)
{
var fHFtU=Peoqp.PCWXa.options[i_opt]
if(fHFtU)
{
if(NMcqF.length>0)NMcqF=NMcqF+", "
var HJvxF=Peoqp.m_opt_vals[i_opt];
var ZWKIp=fHFtU.vals[HJvxF]
var aAhZt=fHFtU.title;
if(aAhZt.length>0) NMcqF+=aAhZt+" : "
NMcqF+=ZWKIp
}
}
}
if(NMcqF.length>0)WcVlf=WcVlf+"<br><span style='font-size:10px;'>("+NMcqF+")</span>"
TGqhP+=WcVlf;
TGqhP+="</td>"
TGqhP+="<td>"+kwXIR.ItmNS(Peoqp.PWipX())+"</td>"
TGqhP+="<td>"+Peoqp.Ztpeb+"</td>"
TGqhP+="<td>"+kwXIR.ItmNS(Peoqp.PWipX()*Peoqp.Ztpeb)+"</td>"
TGqhP+="</tr>"
}
TGqhP+="<tr><td colspan=4>"
var TnCas=kwXIR.gFaGs()
var uqjXR=kwXIR.MorET()
var FcrSi=kwXIR.uuoMj()
var EfBZl=kwXIR.aNQtm()
var LUlwb=kwXIR.atBDV() 
TGqhP+="<table border=0 width=100%>"
TGqhP+="<tr><td align=right >"+Translator.tr("Sub total")+" : "+kwXIR.ItmNS(TnCas)+"</td></tr>";
if(CONST_WA_GLOBAL_SETTINGS.shipping_type!=kqotb)
{
TGqhP+="<tr><td align=right>"+Translator.tr("Shipping amount")+" : "+kwXIR.ItmNS(FcrSi)+"</td></tr>";
}
if(kwXIR.WouTO()||kwXIR.oGosH())
{
if(kwXIR.WouTO())
{
TGqhP+="<tr><td align=left >"+Translator.tr("Tax included");
}
if(kwXIR.oGosH())
{
TGqhP+="<tr><td align=right >"+Translator.tr("Extra Tax");
}
TGqhP+=" : ";
TGqhP+=kwXIR.ItmNS(uqjXR)+"</td></tr>";
}
if(LUlwb>0)
{
TGqhP+="<tr><td align=right >"+Translator.tr("Promotion")+" : - "+kwXIR.ItmNS(LUlwb)+"</td></tr>";
}
TGqhP+="<tr><td align=right class=\"crbst-card-total\">"+Translator.tr("Total")+" : "+kwXIR.ItmNS(EfBZl)+"</td></tr>";
TGqhP+="</table>" 
TGqhP+="</td></tr>"
TGqhP+="</table>"
TGqhP=TGqhP.replace(/\"/g,"'")
return TGqhP;
}
beHjF.fNOgh=function(cPwOd)
{
if((""+cPwOd).length==1)cPwOd="0"+cPwOd;
return cPwOd
}
beHjF.lHhlQ=function()
{
var kwXIR=VtUNI();
var TGqhP=""
if(ohlYD.charCodeAt(3)>=100) return""
if(eoqKB)
{
TGqhP+="<form id='wa-http-sender' method=POST action='"+eoqKB_URL+"crbst_market_print_form.php' target='_blank'>"
}
else
{
TGqhP+="<form id='wa-http-sender' method=POST action='crbst_market_print_form.php' target='_blank'>"
}
TGqhP+=this.LcdZc("type_payment",this.Peoqp.pMSQG)
TGqhP+=this.LcdZc("MAIL_TITLE_PREFIXE",Translator.tr("title email Order notification"))
TGqhP+=this.LcdZc("MAIN_TITLE",Translator.tr("PRINT_FORM_MAIN_TITLE"))
TGqhP+=this.LcdZc("PREFIXE_ORDER",Translator.tr("PRINT_FORM_PREFIXE_ORDER"))
var GKPat=""
var hoomQ=new Date()
GKPat+="wa-"+this.fNOgh(hoomQ.getYear()-100)+this.fNOgh(hoomQ.getMonth()+1)+this.fNOgh(hoomQ.getDate())
GKPat+=hoomQ.getHours()+this.fNOgh(hoomQ.getMinutes())+this.fNOgh(hoomQ.getSeconds())
GKPat+="-"+Math.round(Math.random()*100) 
TGqhP+=this.LcdZc("ID_ORDER",GKPat)
TGqhP+=this.LcdZc("CARD_TITLE",Translator.tr("PRINT_FORM_CARD_TITLE"))
TGqhP+=this.LcdZc("LABEL_TYPE_PAYMENT",Translator.tr("PRINT_FORM_LABEL_TYPE_PAYMENT"))
TGqhP+=this.LcdZc("send_copy_email_to_buyer",(kwXIR.send_copy_email_to_buyer)?"1":"0") 

var LAITG=new Array();
var MijTJ=aBgfg(CONST_WA_GLOBAL_SETTINGS.list_form_fields)
MijTJ.push("country")
MijTJ.push("state")
for(var i=0;i<MijTJ.length;i++)
{
var iSDtS=MijTJ[i];
LAITG[iSDtS]=kwXIR.tfTxo.BqUIV(iSDtS,tmDPq)
}
TGqhP+=this.LcdZc("form_first_name",LAITG["firstname"]);
TGqhP+=this.LcdZc("form_last_name",LAITG["lastname"]);
TGqhP+=this.LcdZc("form_address1",LAITG["address_1"]);
TGqhP+=this.LcdZc("form_address2",LAITG["address_2"]);
TGqhP+=this.LcdZc("form_city",LAITG["address_2"]);
TGqhP+=this.LcdZc("form_zip",LAITG["zip"]);
TGqhP+=this.LcdZc("form_state",LAITG["state"]);
TGqhP+=this.LcdZc("form_country",LAITG["country"]);
TGqhP+=this.LcdZc("form_company",LAITG["company"]);
TGqhP+=this.LcdZc("form_fiscal_code",LAITG["fiscal_code"]);
TGqhP+=this.LcdZc("form_tva",LAITG["tva"]);
TGqhP+=this.LcdZc("form_phone",LAITG["phone"]);
TGqhP+=this.LcdZc("form_fax",LAITG["fax"]);
TGqhP+=this.LcdZc("CARD_TOTAL_PRICE",kwXIR.aNQtm());
TGqhP+=this.LcdZc("CARD_CURRENCY",CONST_WA_GLOBAL_SETTINGS.currency_code);
TGqhP+=this.LcdZc("CARD_LANG",Translator.m_lang);
TGqhP+=this.LcdZc("LABEL_PROCESS_ORDER",Translator.tr("PRINT_FORM_PROCESS_ORDER"));
TGqhP+=this.LcdZc("email_buyer",this.Peoqp.BqUIV("email",tmDPq))
if(this.Peoqp.pMSQG=="check")
{
TGqhP+=this.LcdZc("TYPE_PAYMENT",Translator.tr("PRINT_FORM_TYPE_CHECK"))
TGqhP+=this.LcdZc("MESSAGE_CHECK",Translator.tr("PRINT_FORM_MESSAGE_CHECK"))
}
if(this.Peoqp.pMSQG=="wire")
{
TGqhP+=this.LcdZc("TYPE_PAYMENT",Translator.tr("PRINT_FORM_TYPE_WIRE"))
TGqhP+=this.LcdZc("MESSAGE_CHECK",Translator.tr("PRINT_FORM_MESSAGE_WIRE"))
}
if(this.Peoqp.pMSQG=="paypal")
{
TGqhP+=this.LcdZc("LABEL_PAYPAL_CART_TITLE",Translator.tr("PRINT_FORM_PAYPAL_CART_TITLE"));
TGqhP+=this.LcdZc("TYPE_PAYMENT","Paypal")
TGqhP+=this.LcdZc("MESSAGE_PAYPAL",Translator.tr("PRINT_FORM_MESSAGE_PAYPAL"))
}
TGqhP+=this.LcdZc("LABEL_PRINT",Translator.tr("PRINT_FORM_LABEL_PRINT"))
TGqhP+=this.LcdZc("card_html",this.IxrhV())
TGqhP+=this.LcdZc("card_plain_text",this.LHcFX())
TGqhP+=this.LcdZc("LABEL_SELLER_INFORMATION",Translator.tr("Seller information"))
TGqhP+=this.LcdZc("LABEL_BANK_ACCOUNT",Translator.tr("Bank account information"))
TGqhP+=this.LcdZc("LABEL_ADDRESS",Translator.tr("Address"))
TGqhP+=this.LcdZc("seller_address",CONST_WA_GLOBAL_SETTINGS.seller_address)
TGqhP+=this.LcdZc("bank_account_informations",CONST_WA_GLOBAL_SETTINGS.bank_account_informations)
TGqhP+=this.LcdZc("buyer_info_shipping",this.KIVwA())
var YAXPm=""
if(Peoqp.URhlA)
{
YAXPm=this.dxpXN();
};
TGqhP+=this.LcdZc("buyer_info_billing",YAXPm)
TGqhP+="</form>"
return TGqhP;
}
beHjF.NdbXE=function()
{
var kwXIR=VtUNI();
kwXIR.xoNOi()
this.closeWin()
}
beHjF.LgKSa=function()
{
var kwXIR=VtUNI();
var LZJNJ=((this.Peoqp.pMSQG=="check")||(this.Peoqp.pMSQG=="wire"))
if(kwXIR.hgUXV==false)
{
if(this.Peoqp.pMSQG=="paypal")LZJNJ=true;
}
if((kwXIR.hgUXV)&&(this.Peoqp.pMSQG=="paypal"))
{
this.addButton(Translator.tr('Clear cart'),this.NdbXE,[""],this)
this.initializeWindow(400,200)
}
else
{
this.initializeWindow(400,150)
}
var TGqhP=""
if((kwXIR.hgUXV)&&(this.Peoqp.pMSQG=="paypal"))
{
TGqhP+=this.UsAVD()
}
if(LZJNJ)
{
TGqhP+=this.lHhlQ()
if((eoqKB==false)&&(document.webaca_is_preview))
{
WA_Dialog.alert(Translator.tr("Operation not allowed in preview mode"))
return
}
}
TGqhP+="<table border=0 style='width:100%;'><tr>";
TGqhP+="<td align=center style='"+this.cssText1()+"'>"
TGqhP+=Translator.tr("You have been redirected to the payment page")
if((kwXIR.hgUXV)&&(this.Peoqp.pMSQG=="paypal"))
{
TGqhP+="<br><br>"
TGqhP+=Translator.tr("You can clear your cart")
}
TGqhP+="</td></tr></table>"
this.writeContent(TGqhP) 
if(ohlYD.charCodeAt(3)>=100)
{
WA_Dialog.alert(Translator.tr("This cariboost edition can't support ebusiness features !'"))
return;
}
var BJErH=document.getElementById("wa-http-sender")
BJErH.submit()
if(LZJNJ)
{
kwXIR.xoNOi()
}
}
beHjF.Peoqp=Peoqp
beHjF.LgKSa()
}

-->
