<!--

var OwHQb=0
var TIgLq=1
var cLvNf=2
var ZxwVb=0;
var LEVcr=1;
var mKeag=2;
var NHNjQ=0
var nYNdG=1
var uItTH=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(XVFGg)
{
MdkSL().SJOro(XVFGg)
var AnIpV=WA_Dialog.getCurrent();
AnIpV.tfTGs()
}
function MdkSL()
{
if(document.wa_global_settings_market==undefined)document.wa_global_settings_market=new wZZhP()
return document.wa_global_settings_market;
}
function OflWj()
{
this.CCVLC=function()
{
return this.TAJhF+"-"+this.oTdXc_index
}
this.dKeQG=function(ZrLln,PQtLA)
{
this.oTdXc=ZrLln.obj.market.info.folder.substring(13);
this.oTdXc_index=ZrLln.obj.index;
this.oTdXc_modif=ZrLln.obj.market.info.critical_id_modif
this.TAJhF=ZrLln.obj.market.id 

this.LuJGx=1;
this.HpMER=ZrLln.title;
this.nvYiQ=ZrLln.price;
this.gNsVN=ZrLln.weight;
this.QENlj=ZrLln.code_product;
}
this.hmVnt=function(ZrLln,PQtLA)
{

this.HpMER=ZrLln.title;
this.nvYiQ=ZrLln.price;
this.gNsVN=ZrLln.weight;
this.QENlj=ZrLln.code_product;
}
this.COtGH=function()
{
var s="";
s+=this.CCVLC();
if(this.m_opt_vals)
for(var i=0;i<this.m_opt_vals.length;i++)
{
var GWvft=this.m_opt_vals[i]
if(GWvft!=-1) s+="/"+GWvft;
}
return s;
}
this.VEJmh=function()
{
var val="";
val+="j="+this.oTdXc+",";
val+="i="+this.oTdXc_index+",";
val+="m="+this.oTdXc_modif+",";
val+="q="+this.LuJGx+",";
if(this.m_opt_vals)
{
for(var i=0;i<this.m_opt_vals.length;i++)
{
val+="o"+i+"=";
var AoNpi=this.m_opt_vals[i]
if(AoNpi>-1)
val+=AoNpi
else
val+=""
val+=","
}
}
return val;
}
this.WaxPa=function(map,k)
{
var v=map[k];
if(v=="undefined") return "";
return v;
}
this.aXwGr=function(map)
{
this.oTdXc=this.WaxPa(map,"j");
if(this.oTdXc=="") return false;
this.oTdXc_index=this.WaxPa(map,"i");
this.oTdXc_modif=this.WaxPa(map,"m");
this.LuJGx=parseInt(map["q"]);
this.m_opt_vals=new Array();
for(var i=0;i<3;i++)
{
var bRppR=parseInt(map["o"+i]);
if(isNaN(bRppR))bRppR=-1;
this.m_opt_vals.push(bRppR)
}
return true;
}
this.njFDH=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.xhVML=function(MhtwY)
{
var EcWKF=this.njFDH(MhtwY)
return this.aXwGr(EcWKF) 
}
this.GIchq=function()
{
return JEDiG(this.ZrLln,this.m_opt_vals)
}
}
function MSDLG(UvATa,oscGq)
{
var EKhfh=UvATa[0]
var XSsXr=UvATa[1]
var GoqWp=UvATa[2]
if(EKhfh.length==0)
{
GoqWp.call(XSsXr)
return;
}
var js=EKhfh.pop()
WA_loadScript(js.src,MSDLG,[EKhfh,XSsXr,GoqWp]);
}
function WA_arrayContains(TURPE,MhtwY)
{
for(var n=0;n<TURPE.length;n++){if(TURPE[n]==MhtwY)return true;}
return false;
}
function Obnqw(TURPE)
{
var EcWKF=new Array()
for(var n=0;n<TURPE.length;n++)
{
var lupau=TURPE[n]
if(lupau=="address") EcWKF=EcWKF.concat(["address_1","address_2","city","zip"])
else EcWKF.push(lupau)
}
return EcWKF;
}
function DmsDW()
{
this.HbrGO=function()
{
if(this.Fvcnv.length==0)return CONST_WA_GLOBAL_SETTINGS.default_selected_country;
return this.Fvcnv;
}
this.rWpup=function()
{
this.JUbBQ()
}
this.njFDH=function(s)
{
var Anber=new Array();
var tab=s.split(",");
for(var i=0;i<tab.length;i++)
{
var tab3=tab[i].split("=");
if(tab3.length==2)Anber[tab3[0]]=tab3[1];
}
return Anber;
}
this.qabTP=function(iZrGI)
{
if(iZrGI==undefined) return ""
return(iZrGI==NHNjQ)?"deliv-":"bill-"
}
this.rDRBM=function(pEwDv,iZrGI,gbJaS)
{
if(!gbJaS)gbJaS=""
var pAfLf=this.qabTP(iZrGI)
if(pEwDv=="country")
{
if(iZrGI==NHNjQ) return this.Fvcnv
if(iZrGI==nYNdG) pEwDv="countryCode"
}
if(pEwDv=="state")
{
pEwDv="stateCode"
}
var GWvft=this.Koiqt[pAfLf+pEwDv]
if(!GWvft) return gbJaS
GWvft=GWvft.replace(/\"/g,"'")
return GWvft
}
this.GgASO=function(GWvft)
{
if(GWvft==undefined)return ""
return GWvft
}
this.edoCt=function(key,val)
{
if((val==null)||(val==undefined)) val="";
WA_SetCookie("crbst-card-"+key,val)
}
this.fsIuQ=function(key)
{
var XSsXr=WA_GetCookie("crbst-card-"+key)
if(XSsXr=="null")XSsXr="";
return ""+XSsXr
}
this.WwhFW=function()
{
this.Koiqt=new Array()
var MhtwY=this.fsIuQ("order-infos")
var EcWKF=this.njFDH(MhtwY)
for(var k1 in EcWKF)
{
var GWvft=EcWKF[k1]
if((k1.indexOf("deliv-")==0)||(k1.indexOf("bill-")==0))
this.Koiqt[k1]=unescape(GWvft)
}
this.Fvcnv=this.GgASO(EcWKF["countryCode"])
this.RuVJM=this.GgASO(EcWKF["typePayment"])
this.KaBQA=(this.GgASO(EcWKF["differentBillingAddressChecked"])=="true")
this.WhoVi=(this.GgASO(EcWKF["salesConditionChecked"])=="true")
}
this.JUbBQ=function()
{
var MhtwY=""
for(var k1 in this.Koiqt)
{
var GWvft=this.Koiqt[k1]
MhtwY+=k1+"="+escape(GWvft)+","
}
var ZWGxW=""
ZWGxW+="countryCode="+escape(this.Fvcnv)+","
ZWGxW+="typePayment="+escape(this.RuVJM)+","
ZWGxW+="differentBillingAddressChecked="+(this.KaBQA)+","
ZWGxW+="salesConditionChecked="+(this.WhoVi)+","
MhtwY+=ZWGxW 
this.edoCt("order-infos",MhtwY)
}
this.wHKcF=function(OXGtu)
{
if(trimString(OXGtu.value).length==0)
{
OXGtu.style.backgroundColor="#ff0000"
OXGtu.focus()
return false;;
}
OXGtu.style.backgroundColor=""
return true;
}
this.iAtui=function(iZrGI)
{
var aEFqS=Obnqw(CONST_WA_GLOBAL_SETTINGS.list_form_fields)
var HCNSg=Obnqw(CONST_WA_GLOBAL_SETTINGS.list_mandatory_form_fields) 
var wbZCL=this.Koiqt;
var pAfLf=this.qabTP(iZrGI) 
var mbXEa=document.getElementById("wa-market-form")
for(var n=0;n<aEFqS.length;n++)
{
var qihQm=aEFqS[n]
var qhHsc=mbXEa[qihQm]
var GWvft=trimString(qhHsc.value)
if(qihQm!="address_2")
if(WA_arrayContains(HCNSg,qihQm))
{
if(this.wHKcF(qhHsc)==false)return false;
}
wbZCL[pAfLf+qihQm]=GWvft
}
var EFPuQ=document.getElementById("wa-select-state");
var nVIiO=document.getElementById("wa-market-state");
if(EFPuQ&&(nVIiO.style.display!="none"))
{
if(this.wHKcF(EFPuQ)==false)return false;
wbZCL[pAfLf+"stateCode"]=EFPuQ.value
}
else
{
wbZCL[pAfLf+"stateCode"]=""
}
if(iZrGI==nYNdG)
{
var WtFHx=document.getElementById("wa-select-form-country");
if(WtFHx)
{
wbZCL[pAfLf+"countryCode"]=WtFHx.value
}
}
this.JUbBQ()
return true;
}
this.NojYp=""
this.Fvcnv=""
this.RuVJM=""
this.KaBQA=false;
this.WhoVi=false
this.WwhFW()
}
function wZZhP()
{
this.Xecxd=new Array();
this.XSsXr_callback=false;
this.Hiaqw=false;
this.EAaaZ=false;
this.JjrRD=new DmsDW()
this.sHirY=CONST_WA_GLOBAL_SETTINGS.use_native_paypal_cart;
this.GlaWl=function(XSsXr,GoqWp)
{
this.XSsXr_callback=XSsXr
this.Hiaqw=GoqWp 
var koOdZ=this.fsIuQ("data")
this.oeRSX(koOdZ) 
var EKhfh=new Array()
var TURPE=this.Xecxd;
for(var i=0;i<TURPE.length;i++)
{
var Cgiob=TURPE[i];
var QiBcm=Translator.m_lang_for_filename
if(QiBcm.length>0)QiBcm="_"+QiBcm;
var OSedg=Cgiob.oTdXc;
var n=OSedg.indexOf("_")
if(n>-1)OSedg=OSedg.substring(n+1)
Cgiob.TAJhF="wa-id-"+OSedg 
var xMQag=wa_global_market.markets[Cgiob.TAJhF]
if(this.EAaaZ==false)
if(!xMQag)
{
var wbwJx="crbst_market_"+Cgiob.oTdXc+'/'
WA_declareMarket(Cgiob.TAJhF,wbwJx,Cgiob.oTdXc_modif) 
var lskjs=wbwJx+'market-definition'+QiBcm+'.js?v='+Cgiob.oTdXc_modif
EKhfh.push({id:OSedg,src:lskjs})
}
}
MSDLG([EKhfh,this,this.BhncL],true)
}
this.FcShW=function()
{
this.edoCt("data","")
this.JjrRD.edoCt("order-infos","")
this.JjrRD.WwhFW()
this.oeRSX("")
}
this.BhncL=function()
{
this.EAaaZ=true;
var TURPE=this.Xecxd;
var GbFVc=new Array();
for(var i=0;i<TURPE.length;i++)
{
var Cgiob=TURPE[i];
var OSedg=Cgiob.TAJhF
var JXRPM=wa_global_market.markets[OSedg] 

if(JXRPM.info)
{
var fSTTE=JXRPM.info.products 
var PQtLA=Cgiob.oTdXc_index
var ZrLln=fSTTE[PQtLA]
Cgiob.ZrLln=ZrLln
Cgiob.hmVnt(Cgiob.ZrLln,PQtLA)
if((ZrLln.unavail==false)&&(Cgiob.oTdXc_modif==JXRPM.info.critical_id_modif))
{
GbFVc.push(Cgiob)
}
}
else
{
}
}
this.Xecxd=GbFVc
this.OIXqF() 

this.Hiaqw.call(this.XSsXr_callback)
}
this.oeRSX=function(XudLt)
{
var TURPE=new Array();
var list_string_products=XudLt.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 Cgiob=new OflWj();
if(Cgiob.xhVML(s_data))
{
TURPE.push(Cgiob);
}
}
}
this.Xecxd=TURPE;
var RNueD=this.wMhKE()
if(WA_getNumberMarketItemsInCart()!=RNueD)
{
this.uAPsc()
this.wmwRs()
}
}
this.Frxje=function()
{
var jCCsm=''
try{jCCsm=CONST_WA_GLOBAL_SETTINGS.currency_mnemonic}catch(e){}
return jCCsm
}
this.SJOro=function(XVFGg)
{
var list2=new Array();
var TURPE=this.Xecxd
for(var i=0;i<TURPE.length;i++)
{
var Cgiob=TURPE[i];
if(i!=XVFGg)
{
list2.push(Cgiob);
}
}
this.Xecxd=list2;
this.OIXqF()
}
this.addProductToShoppingCard=function(ZrLln,optionsValues)
{
if(this.WCFDa()==false)
{
WA_Dialog.alert(Translator.tr("You can't use shopping card Your browser doesnt accept cookies !"));
return false;
}
var DTmej=ZrLln.obj
var TURPE=this.mJQTF();
var n=TURPE.length
var djxCr=new OflWj()
djxCr.dKeQG(ZrLln,n);
djxCr.m_opt_vals=optionsValues
var b_match=false;
for(var i=0;i<TURPE.length;i++)
{
var Cgiob=TURPE[i];
if(Cgiob.COtGH()==djxCr.COtGH())
{
b_match=true;
Cgiob.LuJGx++;
}
}
if(b_match==false)
{
var koOdZ=this.fsIuQ("data")
var NNubN=djxCr.VEJmh()
var vKMCU=koOdZ.length+NNubN.length 
if(vKMCU>4000)
{
WA_Dialog.alert(Translator.tr("Cookies cart contains max data !"));
return false;
}
TURPE.push(djxCr);
}
return true
}
this.qAgcK=function()
{
var TURPE=this.Xecxd
var koOdZ="";
for(var i=0;i<TURPE.length;i++)
{
var info=TURPE[i];
koOdZ+=info.VEJmh()+";";
}
return koOdZ;
}
this.wMhKE=function()
{
var BklOC=0;
var TURPE=this.Xecxd;
for(var i=0;i<TURPE.length;i++)
{
var Cgiob=TURPE[i];
BklOC+=Cgiob.LuJGx
}
return BklOC;
}
this.uAPsc=function()
{
this.edoCt("nb_items",this.wMhKE())
}
this.OIXqF=function()
{
var TURPE=this.Xecxd
var koOdZ=this.qAgcK()
this.edoCt("data",koOdZ)
this.uAPsc()
this.wmwRs();
}
this.wmwRs=function()
{
WA_refreshNumberMarketItemsInCart()
}
this.mJQTF=function()
{
return this.Xecxd;
}
this.WCFDa=function()
{
this.edoCt("watestcookies","test")
return(this.fsIuQ("watestcookies")=="test");
}
this.edoCt=function(key,val)
{
if((val==null)||(val==undefined)) val="";
WA_SetCookie("crbst-card-"+key,val)
}
this.fsIuQ=function(key)
{
var XSsXr=WA_GetCookie("crbst-card-"+key)
if(XSsXr=="null")XSsXr="";
return ""+XSsXr
}
this.qCrux=function(v)
{
return WA_formatPrice(v) 
}
this.pdUBQ=function(v)
{
return WA_basicFormatPrice(v)+" "+CONST_WA_GLOBAL_SETTINGS.currency_code;
}
this.avjWJ=function(nIHkv)
{
return Math.round(nIHkv*100)/100
}
this.mrGgU=function()
{
var TURPE=this.mJQTF()
var price=0;
for(var i=0;i<TURPE.length;i++)
{
var Cgiob=TURPE[i];
price+=(Cgiob.GIchq()*Cgiob.LuJGx);
}
return price;
}
this.BIXYk=function()
{
var nIHkv=this.mrGgU()
var BHNFA=0;
var TURPE=CONST_WA_GLOBAL_SETTINGS.list_promo_codes
for(var i=0;i<TURPE.length;i++)
{
var DXRIW=TURPE[i];
if(MD5(trimString(this.JjrRD.NojYp.toUpperCase()))==DXRIW.c)
{
if(DXRIW.v.indexOf("%")>-1)
{
var BHNFA=parseFloat(DXRIW.v)/100;
return nIHkv*BHNFA;
}
else
{
return parseFloat(DXRIW.v);
}
break;
}
}
return 0;
}
this.computeShippingForValue=function(val)
{
var ISBJK=CONST_WA_GLOBAL_SETTINGS.shipping_type
if(ISBJK==OwHQb)return 0;
var ship_val=0;
var eWFhC=CONST_WA_GLOBAL_SETTINGS.shipping_intervals
for(var i=0;i<eWFhC.length;i++)
{
var gtWlm=eWFhC[i];
if(gtWlm.v<val)ship_val=gtWlm.p
}
return ship_val;
}
this.tXpLG=function(WgLiQ)
{
var EcWKF=CONST_WA_GLOBAL_SETTINGS.Anber_list_extra_shipping_by_country_code
if(EcWKF==undefined)
{
EcWKF=new Array()
CONST_WA_GLOBAL_SETTINGS.Anber_list_extra_shipping_by_country_code=EcWKF;
var PtCBO=CONST_WA_GLOBAL_SETTINGS.list_extra_shipping_by_country_code
for(var XVFGg in PtCBO)
{
var tlDxB=PtCBO[XVFGg];
var mNckn=tlDxB.c
for(var BUaWP in mNckn)
{
var UxKdi=mNckn[BUaWP];EcWKF[UxKdi]=tlDxB.p;
}
}
}
return EcWKF[WgLiQ];
}
this.UCbOH=function(WgLiQ)
{
var EcWKF=CONST_WA_GLOBAL_SETTINGS.Anber_list_tva_by_country_code
if(EcWKF==undefined)
{
EcWKF=new Array()
CONST_WA_GLOBAL_SETTINGS.Anber_list_tva_by_country_code=EcWKF;
var PtCBO=CONST_WA_GLOBAL_SETTINGS.list_tva_by_country_code
for(var XVFGg in PtCBO)
{
var tlDxB=PtCBO[XVFGg];
var mNckn=tlDxB.c;
for(var BUaWP in mNckn)
{
var UxKdi=mNckn[BUaWP];EcWKF[UxKdi]=tlDxB.p;
}
}
}
return EcWKF[WgLiQ];
}
this.DAIYB=function()
{
var ISBJK=CONST_WA_GLOBAL_SETTINGS.shipping_type
var TURPE=this.mJQTF()
var global_ref_for_shipping=0;
var jKlkS=0;
var Fvcnv=this.JjrRD.Fvcnv;
if(Fvcnv.length>0)
{
jKlkS=this.tXpLG(Fvcnv);
if(isNaN(jKlkS)) jKlkS=0;
}
for(var i=0;i<TURPE.length;i++)
{
var Cgiob=TURPE[i];
if(ISBJK==TIgLq)
{
global_ref_for_shipping+=(Cgiob.LuJGx*Cgiob.GIchq());
}
if(ISBJK==cLvNf)
{
global_ref_for_shipping+=(Cgiob.LuJGx*Cgiob.gNsVN);
}
}
return jKlkS+this.avjWJ(this.computeShippingForValue(global_ref_for_shipping));
}
this.HJSXs=function()
{
return CONST_WA_GLOBAL_SETTINGS.tva_type==LEVcr
}
this.MpBrp=function()
{
return CONST_WA_GLOBAL_SETTINGS.tva_type==mKeag
}
this.GPAcS=function()
{
return CONST_WA_GLOBAL_SETTINGS.tva_type==ZxwVb
}
this.QrgfN=function()
{
if(this.GPAcS())return 0;
var tax=0;
var country_code=this.JjrRD.Fvcnv;
if(country_code.length>0)
{
tax=this.UCbOH(country_code);
if(isNaN(tax))tax=0;
}
return tax;
}
this.ufWVt=function(nIHkv)
{
if(this.HJSXs())
{
var n0=this.QrgfN()/100;
return nIHkv*(n0/(1+n0));
}
if(this.MpBrp())
{
return nIHkv*this.QrgfN()/100;
}
return nIHkv;
}
this.lvstp=function()
{
if(this.GPAcS())return 0;
var TURPE=this.mJQTF()
var mtPbR=0;
var aQXYA=0;
for(var i=0;i<TURPE.length;i++)
{
var Cgiob=TURPE[i];
mtPbR+=(Cgiob.GIchq()*Cgiob.LuJGx);
}
mtPbR+=this.DAIYB();
aQXYA=this.avjWJ(this.ufWVt(mtPbR));
return aQXYA;
}
this.SaiMZ=function()
{
var nIHkv=0;
nIHkv+=this.mrGgU()
if(this.MpBrp())nIHkv+=this.lvstp()
nIHkv+=this.DAIYB()
nIHkv-=this.BIXYk()
return nIHkv;
}
}
function IbLcR(doCvT,VwJws)
{
if(doCvT.lab<VwJws.lab) return-1;
if(doCvT.lab>VwJws.lab) return 1;
return 0
}
function WA_marketWatchQuantity()
{
var AnIpV=WA_Dialog.getCurrent()
AnIpV.cZoFF()
}
function WA_displayDialogMarketCart()
{
var AnIpV=new WA_Dialog();
AnIpV.PmhRH=false;
AnIpV.dYJJE=function()
{
this.vPoHB()
this.PmhRH=setInterval("WA_marketWatchQuantity()",400)
}
AnIpV.vPoHB=function()
{
if(this.PmhRH)clearInterval(this.PmhRH)
}
AnIpV.cZoFF=function()
{
var ZgKlP=MdkSL();
var hNssq=ZgKlP.mJQTF();
for(var n=0;n<hNssq.length;n++)
{
var Cgiob=hNssq[n]
var sNqBq=document.getElementById("wa-cart-quantity-"+n)
var unnRl=sNqBq.value
var MANee=parseInt(unnRl)
if(isNaN(MANee))MANee=0;
if((unnRl!='')&&(MANee+""!=unnRl))
{
sNqBq.value=""+MANee
}
if(MANee!=Cgiob.LuJGx)
{
Cgiob.LuJGx=MANee
ZgKlP.OIXqF()
this.RUUEI()
}
}
var ijSUi=document.getElementById("wa-promo-code")
if(ijSUi)
{
if(ijSUi.value!=ZgKlP.JjrRD.NojYp)
{
ZgKlP.JjrRD.NojYp=ijSUi.value
this.RUUEI()
}
}
}
AnIpV.onCustomKeypress=function(SmOMH)
{
if(SmOMH==13)
{
wa_timeout(Delegate.create(this,this.KQOuj),0);
}
return false;
}
AnIpV.closeWin=function()
{
this.vPoHB()
this.intern_closeWin()
}
AnIpV.RUUEI=function()
{
var ZgKlP=MdkSL();
var hNssq=ZgKlP.mJQTF();
if(hNssq.length==0) return;
for(var n=0;n<hNssq.length;n++)
{
var Cgiob=hNssq[n]
var AjdNP=document.getElementById("wa-cart-total-"+n)
var nIHkv=Cgiob.GIchq() 
var VhJCg=Cgiob.LuJGx*nIHkv
var MhtwY="<span style='"
MhtwY+=(VhJCg>0)?"color:"+WA_GLOBAL_COLOR_THEME.color_text+";font-weight:normal;":"color:#ff0000;font-weight:bold;"
MhtwY+="'>"
MhtwY+=ZgKlP.qCrux(VhJCg)
MhtwY+="</span>"
AjdNP.innerHTML=MhtwY
}
var HJdJN=ZgKlP.mrGgU()
var mCnRj=ZgKlP.lvstp()
var Efslh=ZgKlP.DAIYB()
var Hteji=ZgKlP.SaiMZ()
var kbrfW=ZgKlP.BIXYk()
var LNvTC=""
var AjdNP=document.getElementById("wa-cart-amount-total")
LNvTC+=Translator.tr("Sub total")+" : "+ZgKlP.qCrux(HJdJN)
LNvTC+="<br>"
if(Efslh>0)
{
LNvTC+="<span>"+Translator.tr("Shipping amount")+" : "+ZgKlP.qCrux(Efslh)+"</span>";
LNvTC+="<br>"
}
if(ZgKlP.HJSXs()||ZgKlP.MpBrp())
{
if(ZgKlP.HJSXs())
{
LNvTC+="<div style='width:100%;text-align:left;'>"
LNvTC+=Translator.tr("Tax included");
}
if(ZgKlP.MpBrp())
{
LNvTC+="<div>"
LNvTC+=Translator.tr("Extra Tax");
}
LNvTC+=" : ";
LNvTC+=ZgKlP.qCrux(mCnRj)+"</div>";
}
if(kbrfW>0)
{
LNvTC+="<span>"+Translator.tr("Promotion")+" : - "+ZgKlP.qCrux(kbrfW)+"</span><br>";
}
LNvTC+="<span><b>"+Translator.tr("Total")+" : "+ZgKlP.qCrux(Hteji)+"</b></span>";
AjdNP.innerHTML=LNvTC
}
AnIpV.YVVjL=function()
{
WA_displayDialogMarketCart()
}
AnIpV.wHPZf=function()
{
this.closeWin()
}
AnIpV.KQOuj=function()
{
var ZgKlP=MdkSL();
if(WA_getNumberMarketItemsInCart()==0)return;
var LaAmk=document.getElementById("wa-market-select-country")
if(LaAmk)
{
ZgKlP.JjrRD.Fvcnv=LaAmk.value
}
if(ZgKlP.JjrRD.Fvcnv=="")
{
var LaAmk=document.getElementById("wa-market-select-country")
if(LaAmk)
{
LaAmk.focus()
LaAmk.style.backgroundColor="#ff0000"
return;
}
}
if(CONST_WA_GLOBAL_SETTINGS.link_sale_condition)
{
if(ZgKlP.JjrRD.WhoVi!=true)
{
var KHZtH=document.getElementById("wa-sales-condition")
if(KHZtH)
{
KHZtH.focus()
var LaFhd=document.getElementById("wa-sales-condition-label")
LaFhd.style.backgroundColor="#ff0000"
return;
}
}
}
var kLHFY=CONST_WA_GLOBAL_SETTINGS.list_type_payment
if(kLHFY.length==1)
{
ZgKlP.JjrRD.RuVJM=kLHFY[0]
}
var LaAmk=document.getElementById("wa-market-select-payment")
if(LaAmk)
{
ZgKlP.JjrRD.RuVJM=LaAmk.value
if(ZgKlP.JjrRD.RuVJM=="")
{
LaAmk.focus()
LaAmk.style.backgroundColor="#ff0000"
return;
}
}
oqlfg()
}
AnIpV.tfTGs=function()
{
WA_exec_callback_opera_compliant(this,this.gQjME)
}
AnIpV.gQjME=function()
{
var ZgKlP=MdkSL();

var WtFHx=document.getElementById("wa-market-select-country")
if(WtFHx)
{
ZgKlP.JjrRD.Fvcnv=WtFHx.value
}
ZgKlP.JjrRD.rWpup()
var GZpoC=html_getLayer("market-cart-content")
var UWamx=html_getLayer("wa-market-payment-form") 
var MhtwY=""
var hNssq=ZgKlP.mJQTF();
html_SetVisibility(UWamx,(hNssq.length>0))
if(hNssq.length==0)
{
MhtwY+="<span style='font-family:Arial;font-size:16px;'>"
MhtwY+=Translator.tr("No articles in Card !")
MhtwY+="</span>"
}
else
{
var HxEcK="border:1px solid "+WA_GLOBAL_COLOR_THEME.color0+";font-weight:normal;"
var Mkpfu="border:1px solid "+WA_GLOBAL_COLOR_THEME.color0+";color:#ff0000;font-weight:bold;"
var Ejorg="color:#222222;font-size:12px;"
MhtwY+="<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+";'>"
MhtwY+="<thead style='font-size:13px;border:1px solid;'>"
MhtwY+="<tr>"
MhtwY+="<th  colspan=2 style='"+HxEcK+"'></th>" 
MhtwY+="<th style='"+HxEcK+"'  width=70px><b>"+Translator.tr("Price")+"</b></th>"
MhtwY+="<th style='"+HxEcK+"'  width=70px><b>"+Translator.tr("Quantity")+"</b></th>"
MhtwY+="<th style='"+HxEcK+"'  width=70px><b>"+Translator.tr("Total")+"</b></th>"
MhtwY+="<th style='"+HxEcK+"'  width=90px></th>"
MhtwY+="</tr>"
for(var n=0;n<hNssq.length;n++)
{
var Cgiob=hNssq[n]
MhtwY+="<tr>"
MhtwY+="<th style='"+HxEcK+"' >"
var JXRPM=wa_global_market.markets[Cgiob.TAJhF]
var pEZjU=new Size(30,30)
var OwKBw=pEZjU
if(JXRPM.info.design.crop_thumb==false)
{
OwKBw=Cgiob.ZrLln.size_thumb.clone()
OwKBw.scale(pEZjU)
}
else
{
}
if(Cgiob.ZrLln.img_thumb.length>0)
MhtwY+="<img border=0 src='"+Cgiob.ZrLln.img_thumb+"' width="+OwKBw.width+"px height="+OwKBw.height+"px>"
MhtwY+="</th>"
MhtwY+="<th style='"+HxEcK+"text-align:left;padding:5px;background-color:"+WA_GLOBAL_COLOR_THEME.color1+";' >"
MhtwY+="<b>"+Cgiob.HpMER+"</b>"
if(Cgiob.QENlj.length>0)
{
MhtwY+="<span style='"+Ejorg+"'>";
MhtwY+=" ["+Cgiob.QENlj+"]";
MhtwY+="</span>";
}
if(Cgiob.m_opt_vals)
{
MhtwY+="<br>"
MhtwY+="<span style='"+Ejorg+"'>";
for(var i_opt=0;i_opt<Cgiob.ZrLln.options.length;i_opt++)
{
var lrGRd=Cgiob.ZrLln.options[i_opt]
if(lrGRd)
{
var tWVCO=Cgiob.m_opt_vals[i_opt];
var diFsp=lrGRd.title;
if(diFsp.length>0)
{
MhtwY+=diFsp;
MhtwY+=":"
}
MhtwY+=lrGRd.vals[tWVCO];
MhtwY+=" "
}
}
MhtwY+="</span>";
}
MhtwY+="</th>"
var nIHkv=Cgiob.GIchq()
MhtwY+="<th style='"+HxEcK+"' >"+ZgKlP.qCrux(nIHkv)+"</th>"
MhtwY+="<th style='"+HxEcK+"'  align=center><input type=text id='wa-cart-quantity-"+n+"' style='width:45px;' maxlength=3 value='"+Cgiob.LuJGx+"' type=text/></th>"
MhtwY+="<th style='"
var VhJCg=Cgiob.LuJGx*nIHkv
MhtwY+=(VhJCg>0)?HxEcK:Mkpfu;
MhtwY+="' ><span id='wa-cart-total-"+n+"'>"
MhtwY+=ZgKlP.qCrux(VhJCg)
MhtwY+="</span></th>"
MhtwY+="<th style='"+HxEcK+"' ><a href=\"javascript:WA_marketRemoveItem("+n+")\">"+Translator.tr("Remove card item")+"</a></th>"
MhtwY+="</tr>"
}
MhtwY+="<tr>"
MhtwY+="<th style='"+HxEcK+"text-align:right;padding:5px;' id='wa-cart-amount-total'  colspan=5>&nbsp;</th>"
MhtwY+="<th style='"+HxEcK+"' ></th>"
MhtwY+="</tr>"
MhtwY+="</thead>"
MhtwY+="</table>"
MhtwY+="<br>"
}
GZpoC.innerHTML=MhtwY
this.dYJJE()
WA_exec_callback_opera_compliant(this,this.RUUEI) 
}
AnIpV.HjAFm=function()
{
var ZgKlP=MdkSL();
this.addButton(Translator.tr("Continue Shopping"),this.wHPZf,[""],this)
this.addButton(Translator.tr("Checkout order"),this.KQOuj,[""],this)
this.initializeWindow(670,700)
var BpfHQ="font-family:Arial;font-size:12px;color:#000000;"
var MhtwY=""
MhtwY+="<div id='market-cart-content' style='width:100%;"+BpfHQ+"' align=center>" 
MhtwY+="</div>"
MhtwY+="<br>"
MhtwY+="<div style='width:100%;"+BpfHQ+"' align=center id='wa-market-payment-form'>"
MhtwY+="<br>"
var alAxE=CONST_WA_GLOBAL_SETTINGS.list_favorite_country
var GPAth=CONST_WA_GLOBAL_SETTINGS.list_country
var eIeiN=new Array()
for(var dMiKO=0;dMiKO<alAxE.length;dMiKO++)
{
eIeiN[alAxE[dMiKO]]=true
}
for(var dMiKO=0;dMiKO<GPAth.length;dMiKO++)
{
eIeiN[GPAth[dMiKO]]=true
}
var ETJXt=0;
var mYEgw=""
for(var c in eIeiN)
{
ETJXt++;
mYEgw=c
}
if(ETJXt==1)
{
ZgKlP.JjrRD.Fvcnv=mYEgw
}
if(ETJXt>1)
{
MhtwY+="<span style='font-weight:bold;'>"
MhtwY+=Translator.tr("Please choose a country to deliver your order")
MhtwY+="</span>"
MhtwY+="<br>"
MhtwY+="<select onchange=\"WA_marketChangeCountry(this)\" id='wa-market-select-country'>"
if(CONST_WA_GLOBAL_SETTINGS.default_selected_country.length==0)
{
MhtwY+="<option value=\"\">...</option>"
}
var hKMlZ=new Array()
for(var dMiKO=0;dMiKO<alAxE.length;dMiKO++)
{
var ApPBY=alAxE[dMiKO]
hKMlZ.push({code:ApPBY,lab:Translator.country(ApPBY)})
}
for(var dMiKO=0;dMiKO<hKMlZ.length;dMiKO++)
{
var XSsXr=hKMlZ[dMiKO]
var ApPBY=XSsXr.code
MhtwY+="<option "
if(ZgKlP.JjrRD.HbrGO()==ApPBY)MhtwY+="selected "
MhtwY+="value=\""+ApPBY+"\">"+Translator.country(ApPBY)+"</option>"
}
if((alAxE.length>0)&&(GPAth.length>0))
{
MhtwY+="<option value=\"\">-----</option>"
}
var gJlCb=new Array()
for(var dMiKO=0;dMiKO<GPAth.length;dMiKO++)
{
var ApPBY=GPAth[dMiKO]
gJlCb.push({code:ApPBY,lab:Translator.country(ApPBY)})
}
if((alAxE.length==0)&&(GPAth.length==0))
{
var TURPE=CONST_WA_COUNTRIES.codes
for(var dMiKO=0;dMiKO<TURPE.length;dMiKO++)
{
var ApPBY=TURPE[dMiKO]
gJlCb.push({code:ApPBY,lab:Translator.country(ApPBY)})
}
}
gJlCb.sort(IbLcR)
for(var dMiKO=0;dMiKO<gJlCb.length;dMiKO++)
{
var XSsXr=gJlCb[dMiKO]
var ApPBY=XSsXr.code
MhtwY+="<option "
if(ZgKlP.JjrRD.HbrGO()==ApPBY)MhtwY+="selected "
MhtwY+="value=\""+ApPBY+"\">"+Translator.country(ApPBY)+"</option>"
}
MhtwY+="</select>"
MhtwY+="<br>"
MhtwY+="<br>"
}
if(CONST_WA_GLOBAL_SETTINGS.link_sale_condition)
{
MhtwY+="<a "+WA_LinkToHref(CONST_WA_GLOBAL_SETTINGS.link_sale_condition)+" style='color:#0000ff'>"
MhtwY+=Translator.tr("Terms of sell")
MhtwY+="</a>"
MhtwY+="<br>" 
MhtwY+="<span id='wa-sales-condition-label'  style='font-weight:bold;'>"
MhtwY+=Translator.tr("label_market_accept_terms")
MhtwY+="</span>"
MhtwY+="<input id='wa-sales-condition' onchange=\"WA_marketChangeSalesCondition(this)\" "
MhtwY+=(ZgKlP.JjrRD.WhoVi)?"checked ":""
MhtwY+="type='checkbox' value='1'/>" 
MhtwY+="<br>"
}
var kLHFY=CONST_WA_GLOBAL_SETTINGS.list_type_payment
if(kLHFY.length>1)
{
MhtwY+="<span style='font-weight:bold;'>"
MhtwY+=Translator.tr("Choose a type of payment")
MhtwY+="</span>"
MhtwY+="<br>"
MhtwY+="<select onchange=\"WA_marketChangeTypePayment(this)\" id='wa-market-select-payment'>"
if((kLHFY.length>1)||(kLHFY.length==0))
{
MhtwY+="<option value=\"\">...</option>"
}
for(var dMiKO=0;dMiKO<kLHFY.length;dMiKO++)
{
var RuVJM=kLHFY[dMiKO]
MhtwY+="<option "
if(ZgKlP.JjrRD.RuVJM==RuVJM)MhtwY+="selected "
MhtwY+="value=\""+RuVJM+"\">"+Translator.tr("label_market_"+RuVJM)+"</option>" 
}
MhtwY+="</select>"
MhtwY+="<br>"
MhtwY+="<br>"
}
if(CONST_WA_GLOBAL_SETTINGS.list_promo_codes)
{
var TURPE=CONST_WA_GLOBAL_SETTINGS.list_promo_codes
MhtwY+="<span id='wa-promo-code-label'  style='font-weight:bold;'>"
MhtwY+=Translator.tr("form-label-code_promo")
MhtwY+="</span><br>"
MhtwY+="<input id='wa-promo-code' onchange=\"WA_marketChangePromoCode(this)\" " 
MhtwY+=" value='"+ZgKlP.JjrRD.NojYp+"' "
MhtwY+="/>"
MhtwY+="<br>" 
}
MhtwY+="</div>"
this.writeContent(MhtwY)
var GZpoC=html_getLayer("market-cart-content")
GZpoC.innerHTML="<div width=100% align=center><img src='wa_loading.gif'></div>" 

ZgKlP.GlaWl(this,this.tfTGs)
}
AnIpV.HjAFm() 
}
function WA_marketChangeCountry(LaAmk)
{
LaAmk.style.backgroundColor=""
var AnIpV=WA_Dialog.getCurrent()
AnIpV.tfTGs()
}
function WA_marketChangeTypePayment(LaAmk)
{
var ZgKlP=MdkSL();
ZgKlP.JjrRD.RuVJM=LaAmk.value
ZgKlP.JjrRD.rWpup()
LaAmk.style.backgroundColor=""
}
function WA_marketChangeSalesCondition(OXGtu)
{
var ZgKlP=MdkSL();
ZgKlP.JjrRD.WhoVi=OXGtu.checked
ZgKlP.JjrRD.rWpup() 
var LaFhd=document.getElementById("wa-sales-condition-label")
LaFhd.style.backgroundColor="" 
}
function WA_marketChangePromoCode(OXGtu)
{
var ZgKlP=MdkSL();
ZgKlP.JjrRD.NojYp=OXGtu.value
ZgKlP.JjrRD.rWpup() 


}
function WA_LinkToHref(fOWUf)
{
var MhtwY=""
var YulTq=fOWUf.url
var fcFjb=Translator.m_lang_for_filename
if(fcFjb.length>0)fcFjb="_"+fcFjb
YulTq=YulTq.replace(/@lng@/g,fcFjb)
MhtwY+="href=\""+YulTq+"\" "
if(fOWUf.open==1)
{
MhtwY+="target="
MhtwY+="_blank"
}
return MhtwY;
}
function WA_displayDialogMarketProduct(OSedg,XVFGg)
{
var xMQag=wa_global_market.markets[OSedg]
var RLvUv=xMQag.obj
var fSTTE=RLvUv.info.products
var ZrLln=fSTTE[XVFGg] 

var AnIpV=new WA_Dialog();

AnIpV.ZrLln=ZrLln
AnIpV.PFKrH=OSedg
AnIpV.YVVjL=function()
{
WA_displayDialogMarketCart()
}
AnIpV.KDesI=function()
{
var ZgKlP=MdkSL();
ZgKlP.GlaWl(this,this.qlKwF) 
}
AnIpV.qlKwF=function()
{
var ZrLln=this.ZrLln;
var ZgKlP=MdkSL();
var HrRqE=new Array();
var UMEGe=ZrLln.obj.id;
for(var i=0;i<3;i++)
{
var vfhpw=-1;
var pAfLf=UMEGe+"-select-opt"
var LaAmk=document.getElementById(pAfLf+i)
if(LaAmk)
{
if(LaAmk.value.length==0)
{
LaAmk.style.backgroundColor="#ff0000";
LaAmk.focus()
return;
}
vfhpw=parseInt(LaAmk.value)
}
HrRqE.push(vfhpw)
}
if(ZgKlP.addProductToShoppingCard(ZrLln,HrRqE))
{
ZgKlP.OIXqF()
WA_displayDialogMarketCart()
}
}
AnIpV.HjAFm=function()
{
var OSedg=this.PFKrH
var ZrLln=this.ZrLln
var MhtwY=""
this.addButton(Translator.tr("Go to my card"),this.YVVjL,[""],this)
if(ZrLln.unavail==false)
{
this.addButton(Translator.tr("Add to card"),this.KDesI,[""],this)
}
this.initializeWindow(670,this.idealHeight())
MhtwY+="<table border=0 width=100% cellpadding=4>"
MhtwY+="<tr>" 
if(ZrLln.img_big.length>0)
{
MhtwY+="<td width='100px' align=center valign=top>"
var OwKBw=ZrLln.size_thumb.clone() 
OwKBw.scale(new Size(200,200))
MhtwY+="<a href=\""+ZrLln.img_big+"\" target=_blank>"
MhtwY+="<img border=0 src=\""+ZrLln.img_big+"\" width='"+OwKBw.width+"px' height='"+OwKBw.height+"px'>"
MhtwY+="</a>"
MhtwY+="</td>"
}
var rKmhu="color:"+WA_GLOBAL_COLOR_THEME.color_text+";";
MhtwY+="<td valign=top style='font-family:Arial;'>"
MhtwY+="<span style='font-weight:bold;font-size:16px;"+rKmhu+"'>"
MhtwY+=ZrLln.title
MhtwY+="</span>"
MhtwY+="<br>"
if(ZrLln.sub_title.length>0)
{
MhtwY+="<span style='color:#333333;font-size:14px;'>"
MhtwY+=ZrLln.sub_title
MhtwY+="</span>"
MhtwY+="<br>"
}
MhtwY+="<br>"
MhtwY+="<table border=0 width=100% cellspacing=0 cellpadding=0><tr><td>"
MhtwY+="<span style='"+rKmhu+";font-size:14px;'>"
MhtwY+=Translator.tr("Price")+" : "
MhtwY+="</span>"
MhtwY+="<span style='"+rKmhu+";font-size:18px;font-weight:bold;' id='"+ZrLln.obj.id+"-price'>"
if(ZrLln.unavail)
{
MhtwY+=Translator.tr("Unavailable")
}
MhtwY+="</span>"
if(ZrLln.more_info)
{
MhtwY+="</td><td align=right>"
var fOWUf=ZrLln.more_info
var ISJWm=WA_LinkToHref(fOWUf)
MhtwY+="<a "+ISJWm+" style='font-family:Arial;text-decoration:underline;font-weight:bold;font-size:12px;color:0000ff;'>"+Translator.tr("More product info link")+"</a>"
}
MhtwY+="</td></tr></table>"
MhtwY+="<br>"
var RPowa=ZrLln.obj.index
if(ZrLln.unavail==false)
if(ZrLln.options.length>0)
{
MhtwY+="<table border=0 cellspacing=0 cellpadding=0>"
for(var n=0;n<ZrLln.options.length;n++)
{
var lrGRd=ZrLln.options[n]
if(lrGRd)
{
MhtwY+="<tr><td align=right>"
MhtwY+="<span style='font-family:Arial;font-weight:bold;font-size:12px;"+rKmhu+"'>"
MhtwY+=lrGRd.title+" :&nbsp;"
MhtwY+="</span>"
MhtwY+="</td><td align=left>"
MhtwY+="<select id='"+ZrLln.obj.id+"-select-opt"+n+"' onchange=\"WA_market_changeCustomPrice('"+OSedg+"',"+RPowa+")\">"
MhtwY+="<option value=\"\">...</option>"
for(var dMiKO=0;dMiKO<lrGRd.vals.length;dMiKO++)
{
var GWvft=lrGRd.vals[dMiKO]
MhtwY+="<option value=\""+dMiKO+"\">"+GWvft+"</option>"
}
MhtwY+="</select>"
MhtwY+="</td></tr>";
}
}
MhtwY+="</table>"
}
MhtwY+="</td>"
MhtwY+="</tr>"
MhtwY+="</table>"
if(ZrLln.description.length>0)
{
MhtwY+="<table border=0 width=100% cellpadding=4>"
MhtwY+="<tr><td colspan=2>"
MhtwY+="<span style='font-family:Arial;font-size:13px;"+rKmhu+"'>"
MhtwY+="<hr>"
MhtwY+=ZrLln.description
MhtwY+="</span>"
MhtwY+="</td></tr>"
MhtwY+="</table>"
}
this.writeContent(MhtwY)
WA_market_changeCustomPrice(OSedg,RPowa)
}
AnIpV.displayWindowWithAutoResize(300,AnIpV.HjAFm) 
}
function XJhQO(ZrLln,UMEGe)
{
var eSWZP=new Array()
for(var i=0;i<3;i++)
{
var pAfLf=UMEGe+"-select-opt"
var LaAmk=document.getElementById(pAfLf+i)
eSWZP[i]=-1
if(LaAmk)
{
LaAmk.style.backgroundColor="";
var GWvft=parseInt(LaAmk.value)
if(isNaN(GWvft)==false)
eSWZP[i]=GWvft
}
}
return JEDiG(ZrLln,eSWZP)
}
function JEDiG(ZrLln,eSWZP)
{
if(ZrLln.unavail)return;
var cPZee=false;
for(var i=0;i<ZrLln.custom_prices.length;i++)
{
var bFYPO=ZrLln.custom_prices[i]
var NxGTL=true;
for(var n=0;n<3;n++)
{
if(bFYPO.tab[n]!=eSWZP[n])NxGTL=false
}
if(NxGTL)
{
cPZee=bFYPO;
break;
}
}
var nIHkv=ZrLln.price
if(cPZee)
{
nIHkv=cPZee.pr
}
return nIHkv;
}
function WA_market_changeCustomPrice(OSedg,RPowa)
{
var ZgKlP=MdkSL();
var xMQag=wa_global_market.markets[OSedg]
var fSTTE=xMQag.info.products;
var ZrLln=fSTTE[RPowa]
if(ZrLln.unavail)return;
var UMEGe=ZrLln.obj.id
var nIHkv=XJhQO(ZrLln,UMEGe)
var roQbW=html_getLayer(UMEGe+"-price")
if(roQbW)
{
roQbW.innerHTML=ZgKlP.qCrux(nIHkv)
}
}
function oqlfg()
{
var ZgKlP=MdkSL();
if(WA_getNumberMarketItemsInCart()==0)return;
var Cgiob=ZgKlP.JjrRD
if((ZgKlP.sHirY)&&(Cgiob.RuVJM=="paypal"))
{
AtWnw();
return;
}
alZWY(NHNjQ)
}
function alZWY(iZrGI)
{
var ZgKlP=MdkSL();
var Cgiob=ZgKlP.JjrRD
Cgiob.WwhFW()
var AnIpV=new WA_Dialog();
AnIpV.iZrGI=iZrGI
AnIpV.mCMQm=function(SmOMH)
{
return Translator.tr("form-label-"+SmOMH)
}
AnIpV.onCustomKeypress=function(SmOMH)
{
if(SmOMH==13)
{
wa_timeout(Delegate.create(this,this.XkFZs),0);
}
return false;
}
AnIpV.RvLPR=function()
{
if(this.iZrGI==NHNjQ)
{
WA_displayDialogMarketCart()
}
else
{
alZWY(NHNjQ)
}
}
AnIpV.ekCIh=function()
{
AtWnw()
}
AnIpV.XkFZs=function()
{
var ZgKlP=MdkSL();
var Cgiob=ZgKlP.JjrRD
if(Cgiob.iAtui(this.iZrGI)==false) return;
Cgiob.rWpup()
if(this.iZrGI==NHNjQ)
{
if(Cgiob.KaBQA==true)
{
alZWY(nYNdG)
}
else
{
this.ekCIh()
}
}
else
{
this.ekCIh()
}
}
AnIpV.djECv=function(SmOMH,pVAiE)
{
if(pVAiE==undefined) pVAiE=""
if(pVAiE)pVAiE=" size="+pVAiE
return "<input name='"+SmOMH+"' value=\""+Cgiob.rDRBM(SmOMH,this.iZrGI)+"\" type=text "+pVAiE+">"
}
AnIpV.CoSvD=function(XnYUp)
{
return "<td width=150px align=right valign=top>"+Translator.tr(XnYUp)+" :</td>"
}
AnIpV.HjAFm=function()
{
var ZgKlP=MdkSL();
var Cgiob=ZgKlP.JjrRD
this.addButton("< "+Translator.tr('Back'),this.RvLPR,[""],this)
this.addButton(Translator.tr('Continue')+" >",this.XkFZs,[""],this)
this.initializeWindow(600,600)
var WZkJV="form-label-"
var aEFqS=CONST_WA_GLOBAL_SETTINGS.list_form_fields 
var MhtwY=""
MhtwY+="<form id='wa-market-form' onSubmit='return false'>"
MhtwY+="<table border=0 width=100% cellspacing=5 style='font-family:Arial;font-size:15px;'>"
MhtwY+="<tr><td colspan=2 align=center style='font-size:18px;'>"
MhtwY+=Translator.tr((this.iZrGI==NHNjQ)?"Fill Deliver information below":"Fill Billing information below")
MhtwY+="<br><br></td></tr>"
for(var n=0;n<aEFqS.length;n++)
{
var qhHsc=aEFqS[n]
if(qhHsc=="address")
{
MhtwY+="<tr>"+this.CoSvD("Address");
MhtwY+="<td>"
MhtwY+=this.djECv("address_1",30)
MhtwY+="</td></tr>"
MhtwY+="<tr><td></td><td>"
MhtwY+=this.djECv("address_2",30)
MhtwY+="</td></tr>"
MhtwY+="<tr>"+this.CoSvD("form-label-city");
MhtwY+="<td>"
MhtwY+=this.djECv("city")+"&nbsp;"+this.mCMQm("zip")+" : "+this.djECv("zip",10)
MhtwY+="</td></tr>" 
MhtwY+="<tr>"+this.CoSvD("form-label-country");
MhtwY+="<td>"
if(this.iZrGI==nYNdG)
{
MhtwY+="<select id='wa-select-form-country' onchange='WA_marketChangeFormCountry("+this.iZrGI+")'>"
var gJlCb=new Array();
var TURPE=CONST_WA_COUNTRIES.codes
for(var dMiKO=0;dMiKO<TURPE.length;dMiKO++)
{
var ApPBY=TURPE[dMiKO]
gJlCb.push({code:ApPBY,lab:Translator.country(ApPBY)})
}
gJlCb.sort(IbLcR)
var YeLJM=Cgiob.HbrGO()
YeLJM=Cgiob.rDRBM('countryCode',this.iZrGI,YeLJM)
for(var dMiKO=0;dMiKO<gJlCb.length;dMiKO++)
{
var XSsXr=gJlCb[dMiKO]
var ApPBY=XSsXr.code
MhtwY+="<option "
if(YeLJM==ApPBY)MhtwY+="selected "
MhtwY+="value=\""+ApPBY+"\">"+Translator.country(ApPBY)+"</option>"
}
MhtwY+="</select>"
}
else
{
MhtwY+=Translator.country(ZgKlP.JjrRD.Fvcnv);
}
MhtwY+="<br><span id='wa-market-state'>"
MhtwY+="<select id='wa-select-state'></select>"
MhtwY+="</span>" 
MhtwY+="</td></tr>"
}
else
{
MhtwY+="<tr>"+this.CoSvD("form-label-"+qhHsc);
MhtwY+="<td>"
MhtwY+=this.djECv(qhHsc,30) 
MhtwY+="</td></tr>"
}
}
if(this.iZrGI==NHNjQ)
{
MhtwY+="<tr><td colspan=2 align=center >"
MhtwY+=Translator.tr("Billing adress is different")+" <input type=checkbox "
if(ZgKlP.JjrRD.KaBQA)MhtwY+="checked "
MhtwY+="onchange='WA_marketCheckBillingAdress(this)'>"
MhtwY+="</td></tr>"
}
MhtwY+="</table>"
MhtwY+="</form>"
this.writeContent(MhtwY)
WA_exec_callback_opera_compliant(this,this.mRwVt) 
}
AnIpV.mRwVt=function()
{
WA_marketChangeFormCountry(this.iZrGI)
}
AnIpV.HjAFm()
}
function ClYHT(iZrGI,LaAmk,EcWKF)
{
var ZgKlP=MdkSL();
var Cgiob=ZgKlP.JjrRD
var uMufQ=Cgiob.rDRBM("stateCode",iZrGI) 
LaAmk.options.length=0
for(var n=0;n<EcWKF.length;n++)
{
var val=EcWKF[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==uMufQ)elOptNew.selected=true
try{
LaAmk.add(elOptNew,null);
}
catch(ex){
LaAmk.add(elOptNew);
}
}
}
function WA_marketChangeFormCountry(iZrGI)
{
var ZgKlP=MdkSL();
var Cgiob=ZgKlP.JjrRD
var WgLiQ=Cgiob.Fvcnv
var LaAmk=document.getElementById("wa-select-form-country");
if(LaAmk) WgLiQ=LaAmk.value;
html_SetDisplay("wa-market-state",(WgLiQ=="US")||(WgLiQ=="CA")||(WgLiQ=="BR"))
var EFPuQ=document.getElementById("wa-select-state");
if(EFPuQ)
{
if(WgLiQ=="US") ClYHT(iZrGI,EFPuQ,["","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(WgLiQ=="CA") ClYHT(iZrGI,EFPuQ,["","Alberta","British Columbia","Manitoba","New Brunswick","Newfoundland and Labrador","Northwest Territories","Nova Scotia","Nunavut","Ontario","Prince Edward Isl.","Quebec","Saskatchewan","Yukon Territory"])
if(WgLiQ=="BR") ClYHT(iZrGI,EFPuQ,["","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(OXGtu)
{
var ZgKlP=MdkSL();
var Cgiob=ZgKlP.JjrRD
Cgiob.KaBQA=OXGtu.checked
Cgiob.rWpup()
}
function AtWnw()
{
var ZgKlP=MdkSL();
var Cgiob=ZgKlP.JjrRD
var qlVXS=CONST_WA_GLOBAL_SETTINGS.currency_info 

var AnIpV=new WA_Dialog();
AnIpV.RvLPR=function()
{
if(this.Cgiob.RuVJM=="paypal")
{
WA_displayDialogMarketCart();return;
}
if(this.Cgiob.KaBQA)
alZWY(nYNdG)
else
alZWY(NHNjQ)
}
AnIpV.nWhkm=function(pEwDv,GWvft)
{
GWvft=""+GWvft
GWvft=GWvft.replace(/'/g,"&lsquo;")
return "<input type=hidden name='"+pEwDv+"' value=\""+GWvft+"\">"
}
AnIpV.LgHbq=function()
{
var ZgKlP=MdkSL();
var MhtwY=""
if(qlVXS.charCodeAt(3)>=100) return""
MhtwY+="<form id='wa-http-sender' method=POST action='https://www.paypal.com/cgi-bin/webscr' target='_blank'>"
MhtwY+=this.nWhkm("cmd","_cart")
MhtwY+=this.nWhkm("business",CONST_WA_GLOBAL_SETTINGS.email_paypal_account)
MhtwY+=this.nWhkm("upload","1")
MhtwY+=this.nWhkm("charset","utf-8")
MhtwY+=this.nWhkm("no_note","0")
MhtwY+=this.nWhkm("currency_code",CONST_WA_GLOBAL_SETTINGS.currency_code)
MhtwY+=this.nWhkm("no_shipping","2")
var AZZdN=ZgKlP.mJQTF()
for(var i=0;i<AZZdN.length;i++)
{
var info=AZZdN[i];
var index=i+1;
var oSYuC=info.GIchq();
if(ZgKlP.HJSXs())
{
var QuYST=ZgKlP.avjWJ(ZgKlP.ufWVt(oSYuC));
oSYuC=oSYuC-QuYST;
}
MhtwY+=this.nWhkm("amount_"+index,""+oSYuC)
MhtwY+=this.nWhkm("quantity_"+index,info.LuJGx)
var KjtiS=0;
if(info.QENlj.length>0)
{
MhtwY+=this.nWhkm("on"+KjtiS+"_"+index,"ref")
MhtwY+=this.nWhkm("os"+KjtiS+"_"+index,info.QENlj)
KjtiS++;
}
var NTwKS=""
if(info.m_opt_vals)
{
for(var i_opt=0;i_opt<info.ZrLln.options.length;i_opt++)
{
var lrGRd=info.ZrLln.options[i_opt]
if(lrGRd)
{
var tWVCO=info.m_opt_vals[i_opt];
var BXgkO=lrGRd.vals[tWVCO]
var diFsp=lrGRd.title;
if(diFsp.length==0) diFsp="opt"+(i_opt+1);
MhtwY+=this.nWhkm("on"+KjtiS+"_"+index,diFsp)
MhtwY+=this.nWhkm("os"+KjtiS+"_"+index,BXgkO)
if(NTwKS.length>0)NTwKS=NTwKS+", "
NTwKS+=BXgkO
KjtiS++;
}
}
}
var BmfcT=info.HpMER;
if(NTwKS.length>0)BmfcT=BmfcT+"("+NTwKS+")"
MhtwY+=this.nWhkm("item_name_"+index,BmfcT) 
}
var eGprU=ZgKlP.DAIYB()
if(ZgKlP.HJSXs())
{
eGprU=eGprU-ZgKlP.avjWJ(ZgKlP.ufWVt(eGprU));
}
if(ZgKlP.HJSXs())
{
var YPBxV=ZgKlP.mrGgU();
var HYawQ=ZgKlP.DAIYB()
var mtPbR=YPBxV+HYawQ;
var JkEFf=ZgKlP.avjWJ(ZgKlP.ufWVt(mtPbR));
var xnlwk=mtPbR-JkEFf;
xnlwk=xnlwk-eGprU;
var tEwcb=0;
for(var i=0;i<AZZdN.length;i++)
{
var info=AZZdN[i];
var index=i+1;
var Rtejs=0;
var YXUJE=0;
var oSYuC=info.LuJGx*info.GIchq();
var n0=ZgKlP.QrgfN()/100;
var tax=oSYuC*(n0/(1+n0));
oSYuC=oSYuC-tax;
Rtejs=oSYuC;
var bZLbL=info.GIchq();
var QuYST=ZgKlP.avjWJ(ZgKlP.ufWVt(bZLbL));
bZLbL=bZLbL-QuYST;
YXUJE=info.LuJGx*bZLbL;
if(YXUJE>Rtejs)
{
bZLbL=info.m_price;
bZLbL=bZLbL-QuYST;
var SJkfL=bZLbL;
if((SJkfL>0)&&(SJkfL!=info.GIchq()))
{
SJkfL=SJkfL-0.01;
}
MhtwY+=this.nWhkm("amount_"+index,SJkfL) 
YXUJE=info.m_quantity*SJkfL;
}
tEwcb+=YXUJE;
}
var tpNFp=ZgKlP.avjWJ(xnlwk-tEwcb);
if(tpNFp>0)
{
var index=AZZdN.length+1;
MhtwY+=this.nWhkm("item_name_"+index,Translator.tr("TVA correction"))
MhtwY+=this.nWhkm("quantity_"+index,1)
MhtwY+=this.nWhkm("amount_"+index,tpNFp)
}
MhtwY+=this.nWhkm("tax_cart",JkEFf)
}
else
{
MhtwY+=this.nWhkm("tax_cart",ZgKlP.lvstp())
}
MhtwY+=this.nWhkm("handling_cart",eGprU) 
MhtwY+="</form>"
return MhtwY;
}
AnIpV.AJTrR=function()
{
var XSukc=this.FhbLI(NHNjQ);
var MhtwY="";
if(XSukc.length>0)
{
MhtwY+=""+Translator.tr("Shipping information")+":\n";
MhtwY+=XSukc;
}
return MhtwY;
}
AnIpV.MRYMv=function()
{
var XSukc=this.FhbLI(nYNdG);
var MhtwY="";
if(XSukc.length>0)
{
MhtwY+=Translator.tr("Billing information")+":\n";
MhtwY+=XSukc;
}
return MhtwY;
}
AnIpV.FhbLI=function(iZrGI)
{
var ZgKlP=MdkSL();
var MhtwY="";
var jTrjb=new Array();
var aEFqS=Obnqw(CONST_WA_GLOBAL_SETTINGS.list_form_fields)
aEFqS.push("country")
aEFqS.push("state")
for(var i=0;i<aEFqS.length;i++)
{
var qihQm=aEFqS[i];
jTrjb[qihQm]=this.Cgiob.rDRBM(qihQm,iZrGI)
}
if(jTrjb["firstname"])MhtwY+=jTrjb["firstname"]+"\n"
if(jTrjb["lastname"])MhtwY+=jTrjb["lastname"]+"\n"
if(jTrjb["company"])
{
MhtwY+=Translator.tr("form-label-company")+" : "+jTrjb["company"]+"\n"
}
if(jTrjb["fiscal_code"]) MhtwY+=Translator.tr("form-label-fiscal_code")+" : "+jTrjb["fiscal_code"]+"\n"
if(jTrjb["tva"]) MhtwY+=Translator.tr("form-label-tva")+" : "+jTrjb["tva"]+"\n"
if(jTrjb["address_1"]) MhtwY+=jTrjb["address_1"]+"\n"
if(jTrjb["address_2"]) MhtwY+=jTrjb["address_2"]+"\n"
if(jTrjb["zip"]) MhtwY+=jTrjb["zip"]+" "
if(jTrjb["city"]) MhtwY+=jTrjb["city"]+"\n"
if(jTrjb["country"])MhtwY+=Translator.country(jTrjb["country"])
if(jTrjb["state"]&&jTrjb["state"].length>0) MhtwY+=" "+jTrjb["state"];
MhtwY+="\n"
if(jTrjb["phone"]) MhtwY+=Translator.tr("form-label-phone")+" : "+jTrjb["phone"]+"\n"
if(jTrjb["fax"]) MhtwY+=Translator.tr("form-label-fax")+" : "+jTrjb["fax"]+"\n"
if(jTrjb["email"]) MhtwY+=jTrjb["email"]+"\n" 
if(jTrjb["comment"])
{
MhtwY+=Translator.tr("form-label-comment")+" : \n";
MhtwY+=jTrjb["comment"]+"\n"
}
return MhtwY;
}
AnIpV.pouQD=function()
{
var ZgKlP=MdkSL();
var MhtwY="";
var AZZdN=ZgKlP.mJQTF();
MhtwY+="**************\n"
for(var i=0;i<AZZdN.length;i++)
{
var Cgiob=AZZdN[i];
var index=i+1;
var BmfcT=Cgiob.HpMER;
if(Cgiob.QENlj.length>0)
{
BmfcT+=" ["+Cgiob.QENlj+"]";
}
var NTwKS=""
if(Cgiob.m_opt_vals)
{
for(var i_opt=0;i_opt<Cgiob.ZrLln.options.length;i_opt++)
{
var lrGRd=Cgiob.ZrLln.options[i_opt]
if(lrGRd)
{
if(NTwKS.length>0)NTwKS=NTwKS+", "
var tWVCO=Cgiob.m_opt_vals[i_opt];
var BXgkO=lrGRd.vals[tWVCO]
var diFsp=lrGRd.title;
if(diFsp.length>0) NTwKS+=diFsp+" : "
NTwKS+=BXgkO
}
}
}
if(NTwKS.length>0)BmfcT=BmfcT+"\n("+NTwKS+")"
MhtwY+=BmfcT;
MhtwY+="\n"
MhtwY+=Translator.tr("Price")+" : "+ZgKlP.pdUBQ(Cgiob.GIchq())+"\n"
MhtwY+=Translator.tr("Quantity")+" : "+Cgiob.LuJGx+"\n"
MhtwY+=Translator.tr("Total")+" : "+ZgKlP.pdUBQ(Cgiob.GIchq()*Cgiob.LuJGx);
MhtwY+="\n"
MhtwY+="**************\n"
}
var HJdJN=ZgKlP.mrGgU()
var mCnRj=ZgKlP.lvstp()
var Efslh=ZgKlP.DAIYB()
var Hteji=ZgKlP.SaiMZ()
var kbrfW=ZgKlP.BIXYk() 
MhtwY+=Translator.tr("Sub total")+" : "+ZgKlP.pdUBQ(HJdJN)+"\n";
if(CONST_WA_GLOBAL_SETTINGS.shipping_type!=OwHQb)
{
MhtwY+=Translator.tr("Shipping amount")+" : "+ZgKlP.pdUBQ(Efslh)+"\n";
}
if(ZgKlP.HJSXs()||ZgKlP.MpBrp())
{
if(ZgKlP.HJSXs())
{
MhtwY+=Translator.tr("Tax included");
}
if(ZgKlP.MpBrp())
{
MhtwY+=Translator.tr("Extra Tax");
}
MhtwY+=" : ";
MhtwY+=ZgKlP.pdUBQ(mCnRj)+"\n";
}
if(kbrfW>0)
{
MhtwY+=Translator.tr("Promotion")+" : - "+ZgKlP.pdUBQ(kbrfW)+"\n";
}
MhtwY+=Translator.tr("Total")+" : "+ZgKlP.pdUBQ(Hteji)+"\n";
return MhtwY;
}
AnIpV.NXKss=function()
{
var ZgKlP=MdkSL();
var MhtwY="";
var AZZdN=ZgKlP.mJQTF()
MhtwY+="<table class='wa-cart-global-table'>"
MhtwY+="<tr class=\"wa-cart-title\">"
MhtwY+="<td>&nbsp;</td>"
MhtwY+="<td>"+Translator.tr("Price")+"</td>"
MhtwY+="<td>"+Translator.tr("Quantity")+"</td>"
MhtwY+="<td>"+Translator.tr("Total")+"</td>"
MhtwY+="</tr>"
for(var i=0;i<AZZdN.length;i++)
{
MhtwY+="<tr>"
var Cgiob=AZZdN[i];
var index=i+1;
MhtwY+="<td>"
var BmfcT=Cgiob.HpMER;
if(Cgiob.QENlj.length>0)
{
BmfcT+=" ["+Cgiob.QENlj+"]";
}
BmfcT="<b>"+BmfcT+"</b>"
var NTwKS=""
if(Cgiob.m_opt_vals)
{
for(var i_opt=0;i_opt<Cgiob.ZrLln.options.length;i_opt++)
{
var lrGRd=Cgiob.ZrLln.options[i_opt]
if(lrGRd)
{
if(NTwKS.length>0)NTwKS=NTwKS+", "
var tWVCO=Cgiob.m_opt_vals[i_opt];
var BXgkO=lrGRd.vals[tWVCO]
var diFsp=lrGRd.title;
if(diFsp.length>0) NTwKS+=diFsp+" : "
NTwKS+=BXgkO
}
}
}
if(NTwKS.length>0)BmfcT=BmfcT+"<br><span class='wa-cart-option'>("+NTwKS+")</span>"
MhtwY+=BmfcT;
MhtwY+="</td>"
MhtwY+="<td>"+ZgKlP.qCrux(Cgiob.GIchq())+"</td>"
MhtwY+="<td>"+Cgiob.LuJGx+"</td>"
MhtwY+="<td>"+ZgKlP.qCrux(Cgiob.GIchq()*Cgiob.LuJGx)+"</td>"
MhtwY+="</tr>"
}
MhtwY+="<tr><td colspan=4>"
var HJdJN=ZgKlP.mrGgU()
var mCnRj=ZgKlP.lvstp()
var Efslh=ZgKlP.DAIYB()
var Hteji=ZgKlP.SaiMZ()
var kbrfW=ZgKlP.BIXYk() 
MhtwY+="<table class='wa-cart-table-total'>"
MhtwY+="<tr><td align=right >"+Translator.tr("Sub total")+" : "+ZgKlP.qCrux(HJdJN)+"</td></tr>";
if(CONST_WA_GLOBAL_SETTINGS.shipping_type!=OwHQb)
{
MhtwY+="<tr><td align=right>"+Translator.tr("Shipping amount")+" : "+ZgKlP.qCrux(Efslh)+"</td></tr>";
}
if(ZgKlP.HJSXs()||ZgKlP.MpBrp())
{
if(ZgKlP.HJSXs())
{
MhtwY+="<tr><td align=left >"+Translator.tr("Tax included");
}
if(ZgKlP.MpBrp())
{
MhtwY+="<tr><td align=right >"+Translator.tr("Extra Tax");
}
MhtwY+=" : ";
MhtwY+=ZgKlP.qCrux(mCnRj)+"</td></tr>";
}
if(kbrfW>0)
{
MhtwY+="<tr><td align=right class=\"wa-cart-promo\">"+Translator.tr("Promotion")+" : - "+ZgKlP.qCrux(kbrfW)+"</td></tr>";
}
MhtwY+="<tr><td align=right class=\"wa-cart-total\">"+Translator.tr("Total")+" : "+ZgKlP.qCrux(Hteji)+"</td></tr>";
MhtwY+="</table>" 
MhtwY+="</td></tr>"
MhtwY+="</table>"
MhtwY=MhtwY.replace(/\"/g,"'")
return MhtwY;
}
AnIpV.FHQao=function(GWvft)
{
if((""+GWvft).length==1)GWvft="0"+GWvft;
return GWvft
}
AnIpV.ClLoP=function()
{
var ZgKlP=MdkSL();
var MhtwY=""
if(qlVXS.charCodeAt(3)>=100) return""
if(uItTH)
{
MhtwY+="<form id='wa-http-sender' method=POST action='"+uItTH_URL+"crbst_market_print_form.php' target='_blank'>"
}
else
{
MhtwY+="<form id='wa-http-sender' method=POST action='crbst_market_print_form.php' target='_blank'>"
}
MhtwY+=this.nWhkm("type_payment",this.Cgiob.RuVJM)
MhtwY+=this.nWhkm("MAIL_TITLE_PREFIXE",Translator.tr("title email Order notification"))
MhtwY+=this.nWhkm("MAIN_TITLE",Translator.tr("PRINT_FORM_MAIN_TITLE"))
MhtwY+=this.nWhkm("PREFIXE_ORDER",Translator.tr("PRINT_FORM_PREFIXE_ORDER"))
var xAVMb=""
var ZqZhK=new Date()
xAVMb+="wa-"+this.FHQao(ZqZhK.getYear()-100)+this.FHQao(ZqZhK.getMonth()+1)+this.FHQao(ZqZhK.getDate())
xAVMb+=ZqZhK.getHours()+this.FHQao(ZqZhK.getMinutes())+this.FHQao(ZqZhK.getSeconds())
xAVMb+="-"+Math.round(Math.random()*100) 
MhtwY+=this.nWhkm("ID_ORDER",xAVMb)
MhtwY+=this.nWhkm("CARD_TITLE",Translator.tr("PRINT_FORM_CARD_TITLE"))
MhtwY+=this.nWhkm("LABEL_TYPE_PAYMENT",Translator.tr("PRINT_FORM_LABEL_TYPE_PAYMENT"))
MhtwY+=this.nWhkm("send_copy_email_to_buyer",(ZgKlP.send_copy_email_to_buyer)?"1":"0") 

var jTrjb=new Array();
var aEFqS=Obnqw(CONST_WA_GLOBAL_SETTINGS.list_form_fields)
aEFqS.push("country")
aEFqS.push("state")
for(var i=0;i<aEFqS.length;i++)
{
var qihQm=aEFqS[i];
jTrjb[qihQm]=ZgKlP.JjrRD.rDRBM(qihQm,NHNjQ)
}
MhtwY+=this.nWhkm("form_first_name",jTrjb["firstname"]);
MhtwY+=this.nWhkm("form_last_name",jTrjb["lastname"]);
MhtwY+=this.nWhkm("form_address1",jTrjb["address_1"]);
MhtwY+=this.nWhkm("form_address2",jTrjb["address_2"]);
MhtwY+=this.nWhkm("form_city",jTrjb["address_2"]);
MhtwY+=this.nWhkm("form_zip",jTrjb["zip"]);
MhtwY+=this.nWhkm("form_state",jTrjb["state"]);
MhtwY+=this.nWhkm("form_country",jTrjb["country"]);
MhtwY+=this.nWhkm("form_company",jTrjb["company"]);
MhtwY+=this.nWhkm("form_fiscal_code",jTrjb["fiscal_code"]);
MhtwY+=this.nWhkm("form_tva",jTrjb["tva"]);
MhtwY+=this.nWhkm("form_phone",jTrjb["phone"]);
MhtwY+=this.nWhkm("form_fax",jTrjb["fax"]);
MhtwY+=this.nWhkm("CARD_TOTAL_PRICE",ZgKlP.SaiMZ());
MhtwY+=this.nWhkm("CARD_CURRENCY",CONST_WA_GLOBAL_SETTINGS.currency_code);
MhtwY+=this.nWhkm("CARD_LANG",Translator.m_lang);
MhtwY+=this.nWhkm("LABEL_PROCESS_ORDER",Translator.tr("PRINT_FORM_PROCESS_ORDER"));
MhtwY+=this.nWhkm("wa_promo_code",ZgKlP.JjrRD.NojYp);
MhtwY+=this.nWhkm("email_buyer",this.Cgiob.rDRBM("email",NHNjQ))
if(this.Cgiob.RuVJM=="custom")
{
MhtwY+=this.nWhkm("TYPE_PAYMENT",Translator.tr("PRINT_FORM_TYPE_CUSTOM"))
}
if(this.Cgiob.RuVJM=="check")
{
MhtwY+=this.nWhkm("TYPE_PAYMENT",Translator.tr("PRINT_FORM_TYPE_CHECK"))
MhtwY+=this.nWhkm("MESSAGE_CHECK",Translator.tr("PRINT_FORM_MESSAGE_CHECK"))
}
if(this.Cgiob.RuVJM=="wire")
{
MhtwY+=this.nWhkm("TYPE_PAYMENT",Translator.tr("PRINT_FORM_TYPE_WIRE"))
MhtwY+=this.nWhkm("MESSAGE_WIRE",Translator.tr("PRINT_FORM_MESSAGE_WIRE"))
}
if(this.Cgiob.RuVJM=="paypal")
{
MhtwY+=this.nWhkm("LABEL_PAYPAL_CART_TITLE",Translator.tr("PRINT_FORM_PAYPAL_CART_TITLE"));
MhtwY+=this.nWhkm("TYPE_PAYMENT","Paypal")
MhtwY+=this.nWhkm("MESSAGE_PAYPAL",Translator.tr("PRINT_FORM_MESSAGE_PAYPAL"))
}
MhtwY+=this.nWhkm("LABEL_PRINT",Translator.tr("PRINT_FORM_LABEL_PRINT"))
MhtwY+=this.nWhkm("card_html",this.NXKss())
MhtwY+=this.nWhkm("card_plain_text",this.pouQD())
MhtwY+=this.nWhkm("LABEL_SELLER_INFORMATION",Translator.tr("Seller information"))
MhtwY+=this.nWhkm("LABEL_BANK_ACCOUNT",Translator.tr("Bank account information"))
MhtwY+=this.nWhkm("LABEL_ADDRESS",Translator.tr("Address"))
MhtwY+=this.nWhkm("seller_address",CONST_WA_GLOBAL_SETTINGS.seller_address)
MhtwY+=this.nWhkm("bank_account_informations",CONST_WA_GLOBAL_SETTINGS.bank_account_informations)
MhtwY+=this.nWhkm("buyer_info_shipping",this.AJTrR())
var lumUt=""
if(Cgiob.KaBQA)
{
lumUt=this.MRYMv();
};
MhtwY+=this.nWhkm("buyer_info_billing",lumUt)
MhtwY+="</form>"
return MhtwY;
}
AnIpV.JqgJv=function()
{
var ZgKlP=MdkSL();
ZgKlP.FcShW()
this.closeWin()
}
AnIpV.HjAFm=function()
{
var ZgKlP=MdkSL();
var bFUjx=true;
if(this.Cgiob.RuVJM=="paypal")
if((ZgKlP.sHirY==true)&&(CONST_WA_GLOBAL_SETTINGS.list_promo_codes==false))
{
bFUjx=true;
}
if((bFUjx==false)&&(this.Cgiob.RuVJM=="paypal"))
{
this.addButton(Translator.tr('Clear cart'),this.JqgJv,[""],this)
this.initializeWindow(400,200)
}
else
{
this.initializeWindow(400,150)
}
var MhtwY=""
if((bFUjx==false)&&(this.Cgiob.RuVJM=="paypal"))
{
MhtwY+=this.LgHbq()
}
if(bFUjx)
{
MhtwY+=this.ClLoP()
if((uItTH==false)&&(document.webaca_is_preview))
{
WA_Dialog.alert(Translator.tr("Operation not allowed in preview mode"))
return
}
}
MhtwY+="<table border=0 style='width:100%;'><tr>";
MhtwY+="<td align=center style='"+this.cssText1()+"'>"
MhtwY+=Translator.tr("You have been redirected to the payment page")
if((bFUjx==false)&&(this.Cgiob.RuVJM=="paypal"))
{
MhtwY+="<br><br>"
MhtwY+=Translator.tr("You can clear your cart")
}
MhtwY+="</td></tr></table>"
this.writeContent(MhtwY) 
if(qlVXS.charCodeAt(3)>=100)
{
WA_Dialog.alert(Translator.tr("This cariboost edition can't support ebusiness features !'"))
return;
}
var mbXEa=document.getElementById("wa-http-sender")
mbXEa.submit()
if(bFUjx)
{
ZgKlP.FcShW()
}
}
AnIpV.Cgiob=Cgiob
AnIpV.HjAFm()
}

-->
