<!--

var PqiQZ=0
var YsVwJ=1
var WEcIM=2
var vQsrA=0;
var xVWKv=1;
var aRdaY=2;
var gKVBn=0
var nQSZM=1
var uprRL=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(XmxJj)
{
vRpVs().JIxAd(XmxJj)
var mVCRB=WA_Dialog.getCurrent();
mVCRB.uHhJl()
}
function vRpVs()
{
if(document.wa_global_settings_market==undefined)document.wa_global_settings_market=new XTQFb()
return document.wa_global_settings_market;
}
function kmfoO()
{
this.jrWTt=function()
{
return this.kciBV+"-"+this.kOCte_index
}
this.CDEwg=function(RxfDb,FcufC)
{
this.kOCte=RxfDb.obj.market.info.folder.substring(13);
this.kOCte_index=RxfDb.obj.index;
this.kOCte_modif=RxfDb.obj.market.info.critical_id_modif
this.kciBV=RxfDb.obj.market.id 

this.vSjJF=1;
this.jWvhL=RxfDb.title;
this.DNmvD=RxfDb.price;
this.PXcsc=RxfDb.weight;
this.SJVhb=RxfDb.code_product;
}
this.xOSOh=function(RxfDb,FcufC)
{

this.jWvhL=RxfDb.title;
this.DNmvD=RxfDb.price;
this.PXcsc=RxfDb.weight;
this.SJVhb=RxfDb.code_product;
}
this.xeJtR=function()
{
var s="";
s+=this.jrWTt();
if(this.m_opt_vals)
for(var i=0;i<this.m_opt_vals.length;i++)
{
var rFbrv=this.m_opt_vals[i]
if(rFbrv!=-1) s+="/"+rFbrv;
}
return s;
}
this.hLcoX=function()
{
var val="";
val+="j="+this.kOCte+",";
val+="i="+this.kOCte_index+",";
val+="m="+this.kOCte_modif+",";
val+="q="+this.vSjJF+",";
if(this.m_opt_vals)
{
for(var i=0;i<this.m_opt_vals.length;i++)
{
val+="o"+i+"=";
var UXtnd=this.m_opt_vals[i]
if(UXtnd>-1)
val+=UXtnd
else
val+=""
val+=","
}
}
return val;
}
this.Wrvlg=function(map,k)
{
var v=map[k];
if(v=="undefined") return "";
return v;
}
this.XQjVg=function(map)
{
this.kOCte=this.Wrvlg(map,"j");
if(this.kOCte=="") return false;
this.kOCte_index=this.Wrvlg(map,"i");
this.kOCte_modif=this.Wrvlg(map,"m");
this.vSjJF=parseInt(map["q"]);
this.m_opt_vals=new Array();
for(var i=0;i<3;i++)
{
var gUNkO=parseInt(map["o"+i]);
if(isNaN(gUNkO))gUNkO=-1;
this.m_opt_vals.push(gUNkO)
}
return true;
}
this.gXapM=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.eBHLY=function(psEef)
{
var LgpYe=this.gXapM(psEef)
return this.XQjVg(LgpYe) 
}
this.hNBOp=function()
{
return Eijpk(this.RxfDb,this.m_opt_vals)
}
}
function JNYxD(jEUcM,RlDQK)
{
var PHAmD=jEUcM[0]
var gxlpN=jEUcM[1]
var RtLgG=jEUcM[2]
if(PHAmD.length==0)
{
RtLgG.call(gxlpN)
return;
}
var js=PHAmD.pop()
WA_loadScript(js.src,JNYxD,[PHAmD,gxlpN,RtLgG]);
}
function WA_arrayContains(ItMPU,psEef)
{
for(var n=0;n<ItMPU.length;n++){if(ItMPU[n]==psEef)return true;}
return false;
}
function rCQUx(ItMPU)
{
var LgpYe=new Array()
for(var n=0;n<ItMPU.length;n++)
{
var fqCeO=ItMPU[n]
if(fqCeO=="address") LgpYe=LgpYe.concat(["address_1","address_2","city","zip"])
else LgpYe.push(fqCeO)
}
return LgpYe;
}
function bPfsL()
{
this.CQnPB=function()
{
if(this.hJqKw.length==0)return CONST_WA_GLOBAL_SETTINGS.default_selected_country;
return this.hJqKw;
}
this.FEbJi=function()
{
this.GmXaE()
}
this.gXapM=function(s)
{
var reoMP=new Array();
var tab=s.split(",");
for(var i=0;i<tab.length;i++)
{
var tab3=tab[i].split("=");
if(tab3.length==2)reoMP[tab3[0]]=tab3[1];
}
return reoMP;
}
this.UoaUr=function(FWNxw)
{
if(FWNxw==undefined) return ""
return(FWNxw==gKVBn)?"deliv-":"bill-"
}
this.cvCmL=function(AKOOV,FWNxw,FqHMx)
{
if(!FqHMx)FqHMx=""
var voNBM=this.UoaUr(FWNxw)
if(AKOOV=="country")
{
if(FWNxw==gKVBn) return this.hJqKw
if(FWNxw==nQSZM) AKOOV="countryCode"
}
if(AKOOV=="state")
{
AKOOV="stateCode"
}
var rFbrv=this.ZinKY[voNBM+AKOOV]
if(!rFbrv) return FqHMx
rFbrv=rFbrv.replace(/\"/g,"'")
return rFbrv
}
this.KhFgW=function(rFbrv)
{
if(rFbrv==undefined)return ""
return rFbrv
}
this.BWvcw=function(key,val)
{
if((val==null)||(val==undefined)) val="";
WA_SetCookie("crbst-card-"+key,val)
}
this.Dlaot=function(key)
{
var gxlpN=WA_GetCookie("crbst-card-"+key)
if(gxlpN=="null")gxlpN="";
return ""+gxlpN
}
this.PiSOD=function()
{
this.ZinKY=new Array()
var psEef=this.Dlaot("order-infos")
var LgpYe=this.gXapM(psEef)
for(var k1 in LgpYe)
{
var rFbrv=LgpYe[k1]
if((k1.indexOf("deliv-")==0)||(k1.indexOf("bill-")==0))
this.ZinKY[k1]=unescape(rFbrv)
}
this.hJqKw=this.KhFgW(LgpYe["countryCode"])
this.PRjTp=this.KhFgW(LgpYe["typePayment"])
this.rAiet=(this.KhFgW(LgpYe["differentBillingAddressChecked"])=="true")
this.sIcDu=(this.KhFgW(LgpYe["salesConditionChecked"])=="true")
}
this.GmXaE=function()
{
var psEef=""
for(var k1 in this.ZinKY)
{
var rFbrv=this.ZinKY[k1]
psEef+=k1+"="+escape(rFbrv)+","
}
var pBosE=""
pBosE+="countryCode="+escape(this.hJqKw)+","
pBosE+="typePayment="+escape(this.PRjTp)+","
pBosE+="differentBillingAddressChecked="+(this.rAiet)+","
pBosE+="salesConditionChecked="+(this.sIcDu)+","
psEef+=pBosE 
this.BWvcw("order-infos",psEef)
}
this.RIILN=function(YWjOR)
{
if(trimString(YWjOR.value).length==0)
{
YWjOR.style.backgroundColor="#ff0000"
YWjOR.focus()
return false;;
}
YWjOR.style.backgroundColor=""
return true;
}
this.OWlMe=function(FWNxw)
{
var iSFUR=rCQUx(CONST_WA_GLOBAL_SETTINGS.list_form_fields)
var BfAfs=rCQUx(CONST_WA_GLOBAL_SETTINGS.list_mandatory_form_fields) 
var JNnwE=this.ZinKY;
var voNBM=this.UoaUr(FWNxw) 
var JaTWd=document.getElementById("wa-market-form")
for(var n=0;n<iSFUR.length;n++)
{
var hHYBg=iSFUR[n]
var OcvSS=JaTWd[hHYBg]
var rFbrv=trimString(OcvSS.value)
if(hHYBg!="address_2")
if(WA_arrayContains(BfAfs,hHYBg))
{
if(this.RIILN(OcvSS)==false)return false;
}
JNnwE[voNBM+hHYBg]=rFbrv
}
var CncXI=document.getElementById("wa-select-state");
var alQGu=document.getElementById("wa-market-state");
if(CncXI&&(alQGu.style.display!="none"))
{
if(this.RIILN(CncXI)==false)return false;
JNnwE[voNBM+"stateCode"]=CncXI.value
}
else
{
JNnwE[voNBM+"stateCode"]=""
}
if(FWNxw==nQSZM)
{
var LkxRd=document.getElementById("wa-select-form-country");
if(LkxRd)
{
JNnwE[voNBM+"countryCode"]=LkxRd.value
}
}
this.GmXaE()
return true;
}
this.kMJRD=""
this.hJqKw=""
this.PRjTp=""
this.rAiet=false;
this.sIcDu=false
this.PiSOD()
}
function XTQFb()
{
this.xlflb=new Array();
this.gxlpN_callback=false;
this.eihPO=false;
this.AMGVc=false;
this.nNgsu=new bPfsL()
this.EEChQ=CONST_WA_GLOBAL_SETTINGS.use_native_paypal_cart;
this.vQFUY=function(gxlpN,RtLgG)
{
this.gxlpN_callback=gxlpN
this.eihPO=RtLgG 
var FomeE=this.Dlaot("data")
this.qfmph(FomeE) 
var PHAmD=new Array()
var ItMPU=this.xlflb;
for(var i=0;i<ItMPU.length;i++)
{
var jNpRG=ItMPU[i];
var pBMJl=Translator.m_lang_for_filename
if(pBMJl.length>0)pBMJl="_"+pBMJl;
var QYemw=jNpRG.kOCte;
var n=QYemw.indexOf("_")
if(n>-1)QYemw=QYemw.substring(n+1)
jNpRG.kciBV="wa-id-"+QYemw 
var bEYqL=wa_global_market.markets[jNpRG.kciBV]
if(this.AMGVc==false)
if(!bEYqL)
{
var ZbCuo="crbst_market_"+jNpRG.kOCte+'/'
WA_declareMarket(jNpRG.kciBV,ZbCuo,jNpRG.kOCte_modif) 
var ALsYH=ZbCuo+'market-definition'+pBMJl+'.js?v='+jNpRG.kOCte_modif
PHAmD.push({id:QYemw,src:ALsYH})
}
}
JNYxD([PHAmD,this,this.AdbWT],true)
}
this.cvmUn=function()
{
this.BWvcw("data","")
this.nNgsu.BWvcw("order-infos","")
this.nNgsu.PiSOD()
this.qfmph("")
}
this.AdbWT=function()
{
this.AMGVc=true;
var ItMPU=this.xlflb;
var iuhwH=new Array();
for(var i=0;i<ItMPU.length;i++)
{
var jNpRG=ItMPU[i];
var QYemw=jNpRG.kciBV
var AWjBO=wa_global_market.markets[QYemw] 

if(AWjBO.info)
{
var UoYMt=AWjBO.info.products 
var FcufC=jNpRG.kOCte_index
var RxfDb=UoYMt[FcufC]
jNpRG.RxfDb=RxfDb
jNpRG.xOSOh(jNpRG.RxfDb,FcufC)
if((RxfDb.unavail==false)&&(jNpRG.kOCte_modif==AWjBO.info.critical_id_modif))
{
iuhwH.push(jNpRG)
}
}
else
{
}
}
this.xlflb=iuhwH
this.xAWLQ() 

this.eihPO.call(this.gxlpN_callback)
}
this.qfmph=function(dewQH)
{
var ItMPU=new Array();
var list_string_products=dewQH.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 jNpRG=new kmfoO();
if(jNpRG.eBHLY(s_data))
{
ItMPU.push(jNpRG);
}
}
}
this.xlflb=ItMPU;
var AqnmZ=this.GCkMb()
if(WA_getNumberMarketItemsInCart()!=AqnmZ)
{
this.jxCMb()
this.hTKXK()
}
}
this.kxAuW=function()
{
var xvxWM=''
try{xvxWM=CONST_WA_GLOBAL_SETTINGS.currency_mnemonic}catch(e){}
return xvxWM
}
this.JIxAd=function(XmxJj)
{
var list2=new Array();
var ItMPU=this.xlflb
for(var i=0;i<ItMPU.length;i++)
{
var jNpRG=ItMPU[i];
if(i!=XmxJj)
{
list2.push(jNpRG);
}
}
this.xlflb=list2;
this.xAWLQ()
}
this.addProductToShoppingCard=function(RxfDb,optionsValues)
{
if(this.RSZgU()==false)
{
WA_Dialog.alert(Translator.tr("You can't use shopping card Your browser doesnt accept cookies !"));
return false;
}
var hxJqD=RxfDb.obj
var ItMPU=this.Rulmj();
var n=ItMPU.length
var NDkia=new kmfoO()
NDkia.CDEwg(RxfDb,n);
NDkia.m_opt_vals=optionsValues
var b_match=false;
for(var i=0;i<ItMPU.length;i++)
{
var jNpRG=ItMPU[i];
if(jNpRG.xeJtR()==NDkia.xeJtR())
{
b_match=true;
jNpRG.vSjJF++;
}
}
if(b_match==false)
{
var FomeE=this.Dlaot("data")
var VJSPD=NDkia.hLcoX()
var tYnVV=FomeE.length+VJSPD.length 
if(tYnVV>4000)
{
WA_Dialog.alert(Translator.tr("Cookies cart contains max data !"));
return false;
}
ItMPU.push(NDkia);
}
return true
}
this.sFBjw=function()
{
var ItMPU=this.xlflb
var FomeE="";
for(var i=0;i<ItMPU.length;i++)
{
var info=ItMPU[i];
FomeE+=info.hLcoX()+";";
}
return FomeE;
}
this.GCkMb=function()
{
var KtnHg=0;
var ItMPU=this.xlflb;
for(var i=0;i<ItMPU.length;i++)
{
var jNpRG=ItMPU[i];
KtnHg+=jNpRG.vSjJF
}
return KtnHg;
}
this.jxCMb=function()
{
this.BWvcw("nb_items",this.GCkMb())
}
this.xAWLQ=function()
{
var ItMPU=this.xlflb
var FomeE=this.sFBjw()
this.BWvcw("data",FomeE)
this.jxCMb()
this.hTKXK();
}
this.hTKXK=function()
{
WA_refreshNumberMarketItemsInCart()
}
this.Rulmj=function()
{
return this.xlflb;
}
this.RSZgU=function()
{
this.BWvcw("watestcookies","test")
return(this.Dlaot("watestcookies")=="test");
}
this.BWvcw=function(key,val)
{
if((val==null)||(val==undefined)) val="";
WA_SetCookie("crbst-card-"+key,val)
}
this.Dlaot=function(key)
{
var gxlpN=WA_GetCookie("crbst-card-"+key)
if(gxlpN=="null")gxlpN="";
return ""+gxlpN
}
this.vnunG=function(v)
{
return WA_formatPrice(v) 
}
this.lkUkb=function(v)
{
return WA_basicFormatPrice(v)+" "+CONST_WA_GLOBAL_SETTINGS.currency_code;
}
this.Zjcdb=function(wkYRp)
{
return Math.round(wkYRp*100)/100
}
this.jVXcm=function()
{
var ItMPU=this.Rulmj()
var price=0;
for(var i=0;i<ItMPU.length;i++)
{
var jNpRG=ItMPU[i];
price+=(jNpRG.hNBOp()*jNpRG.vSjJF);
}
return price;
}
this.PwWgB=function()
{
var wkYRp=this.jVXcm()
var EsKIi=0;
var ItMPU=CONST_WA_GLOBAL_SETTINGS.list_promo_codes
for(var i=0;i<ItMPU.length;i++)
{
var quBQZ=ItMPU[i];
if(MD5(trimString(this.nNgsu.kMJRD.toUpperCase()))==quBQZ.c)
{
if(quBQZ.v.indexOf("%")>-1)
{
var EsKIi=parseFloat(quBQZ.v)/100;
return wkYRp*EsKIi;
}
else
{
return parseFloat(quBQZ.v);
}
break;
}
}
return 0;
}
this.computeShippingForValue=function(val)
{
var XkQwC=CONST_WA_GLOBAL_SETTINGS.shipping_type
if(XkQwC==PqiQZ)return 0;
var ship_val=0;
var mxxEi=CONST_WA_GLOBAL_SETTINGS.shipping_intervals
for(var i=0;i<mxxEi.length;i++)
{
var fKwmq=mxxEi[i];
if(fKwmq.v<val)ship_val=fKwmq.p
}
return ship_val;
}
this.NOMFF=function(IEwkv)
{
var LgpYe=CONST_WA_GLOBAL_SETTINGS.reoMP_list_extra_shipping_by_country_code
if(LgpYe==undefined)
{
LgpYe=new Array()
CONST_WA_GLOBAL_SETTINGS.reoMP_list_extra_shipping_by_country_code=LgpYe;
var XSVEH=CONST_WA_GLOBAL_SETTINGS.list_extra_shipping_by_country_code
for(var XmxJj in XSVEH)
{
var wBNqO=XSVEH[XmxJj];
var AZPmY=wBNqO.c
for(var rYLhp in AZPmY)
{
var AGixD=AZPmY[rYLhp];LgpYe[AGixD]=wBNqO.p;
}
}
}
return LgpYe[IEwkv];
}
this.idIOp=function(IEwkv)
{
var LgpYe=CONST_WA_GLOBAL_SETTINGS.reoMP_list_tva_by_country_code
if(LgpYe==undefined)
{
LgpYe=new Array()
CONST_WA_GLOBAL_SETTINGS.reoMP_list_tva_by_country_code=LgpYe;
var XSVEH=CONST_WA_GLOBAL_SETTINGS.list_tva_by_country_code
for(var XmxJj in XSVEH)
{
var wBNqO=XSVEH[XmxJj];
var AZPmY=wBNqO.c;
for(var rYLhp in AZPmY)
{
var AGixD=AZPmY[rYLhp];LgpYe[AGixD]=wBNqO.p;
}
}
}
return LgpYe[IEwkv];
}
this.GgRVX=function()
{
var XkQwC=CONST_WA_GLOBAL_SETTINGS.shipping_type
var ItMPU=this.Rulmj()
var global_ref_for_shipping=0;
var xCtan=0;
var hJqKw=this.nNgsu.hJqKw;
if(hJqKw.length>0)
{
xCtan=this.NOMFF(hJqKw);
if(isNaN(xCtan)) xCtan=0;
}
for(var i=0;i<ItMPU.length;i++)
{
var jNpRG=ItMPU[i];
if(XkQwC==YsVwJ)
{
global_ref_for_shipping+=(jNpRG.vSjJF*jNpRG.hNBOp());
}
if(XkQwC==WEcIM)
{
global_ref_for_shipping+=(jNpRG.vSjJF*jNpRG.PXcsc);
}
}
return xCtan+this.Zjcdb(this.computeShippingForValue(global_ref_for_shipping));
}
this.tXTkM=function()
{
return CONST_WA_GLOBAL_SETTINGS.tva_type==xVWKv
}
this.GjGfY=function()
{
return CONST_WA_GLOBAL_SETTINGS.tva_type==aRdaY
}
this.bYRMq=function()
{
return CONST_WA_GLOBAL_SETTINGS.tva_type==vQsrA
}
this.rpXKR=function()
{
if(this.bYRMq())return 0;
var tax=0;
var country_code=this.nNgsu.hJqKw;
if(country_code.length>0)
{
tax=this.idIOp(country_code);
if(isNaN(tax))tax=0;
}
return tax;
}
this.qeOQO=function(wkYRp)
{
if(this.tXTkM())
{
var n0=this.rpXKR()/100;
return wkYRp*(n0/(1+n0));
}
if(this.GjGfY())
{
return wkYRp*this.rpXKR()/100;
}
return wkYRp;
}
this.CCTGa=function()
{
if(this.bYRMq())return 0;
var ItMPU=this.Rulmj()
var XHkop=0;
var PvWCE=0;
for(var i=0;i<ItMPU.length;i++)
{
var jNpRG=ItMPU[i];
XHkop+=(jNpRG.hNBOp()*jNpRG.vSjJF);
}
XHkop+=this.GgRVX();
PvWCE=this.Zjcdb(this.qeOQO(XHkop));
return PvWCE;
}
this.Xbgqr=function()
{
var wkYRp=0;
wkYRp+=this.jVXcm()
if(this.GjGfY())wkYRp+=this.CCTGa()
wkYRp+=this.GgRVX()
wkYRp-=this.PwWgB()
return wkYRp;
}
}
function axifK(TjFHQ,RSDkv)
{
if(TjFHQ.lab<RSDkv.lab) return-1;
if(TjFHQ.lab>RSDkv.lab) return 1;
return 0
}
function WA_marketWatchQuantity()
{
var mVCRB=WA_Dialog.getCurrent()
mVCRB.dVWuY()
}
function WA_displayDialogMarketCart()
{
var mVCRB=new WA_Dialog();
mVCRB.KhtVP=false;
mVCRB.iWBhN=function()
{
this.NLkZt()
this.KhtVP=setInterval("WA_marketWatchQuantity()",400)
}
mVCRB.NLkZt=function()
{
if(this.KhtVP)clearInterval(this.KhtVP)
}
mVCRB.dVWuY=function()
{
var OisVX=vRpVs();
var FmuOM=OisVX.Rulmj();
for(var n=0;n<FmuOM.length;n++)
{
var jNpRG=FmuOM[n]
var PhPVo=document.getElementById("wa-cart-quantity-"+n)
var DZaAh=PhPVo.value
var XfVPS=parseInt(DZaAh)
if(isNaN(XfVPS))XfVPS=0;
if((DZaAh!='')&&(XfVPS+""!=DZaAh))
{
PhPVo.value=""+XfVPS
}
if(XfVPS!=jNpRG.vSjJF)
{
jNpRG.vSjJF=XfVPS
OisVX.xAWLQ()
this.OrhVJ()
}
}
var LQSYK=document.getElementById("wa-promo-code")
if(LQSYK)
{
if(LQSYK.value!=OisVX.nNgsu.kMJRD)
{
OisVX.nNgsu.kMJRD=LQSYK.value
this.OrhVJ()
}
}
}
mVCRB.onCustomKeypress=function(KNjIn)
{
if(KNjIn==13)
{
wa_timeout(Delegate.create(this,this.jinNQ),0);
}
return false;
}
mVCRB.closeWin=function()
{
this.NLkZt()
this.intern_closeWin()
}
mVCRB.OrhVJ=function()
{
var OisVX=vRpVs();
var FmuOM=OisVX.Rulmj();
if(FmuOM.length==0) return;
for(var n=0;n<FmuOM.length;n++)
{
var jNpRG=FmuOM[n]
var JeMbj=document.getElementById("wa-cart-total-"+n)
var wkYRp=jNpRG.hNBOp() 
var BHhdJ=jNpRG.vSjJF*wkYRp
var psEef="<span style='"
psEef+=(BHhdJ>0)?"color:"+WA_GLOBAL_COLOR_THEME.color_text+";font-weight:normal;":"color:#ff0000;font-weight:bold;"
psEef+="'>"
psEef+=OisVX.vnunG(BHhdJ)
psEef+="</span>"
JeMbj.innerHTML=psEef
}
var GqRZD=OisVX.jVXcm()
var nIglp=OisVX.CCTGa()
var IfNmA=OisVX.GgRVX()
var ptMHM=OisVX.Xbgqr()
var FPPNK=OisVX.PwWgB()
var fXqxc=""
var JeMbj=document.getElementById("wa-cart-amount-total")
fXqxc+=Translator.tr("Sub total")+" : "+OisVX.vnunG(GqRZD)
fXqxc+="<br>"
if(IfNmA>0)
{
fXqxc+="<span>"+Translator.tr("Shipping amount")+" : "+OisVX.vnunG(IfNmA)+"</span>";
fXqxc+="<br>"
}
if(OisVX.tXTkM()||OisVX.GjGfY())
{
if(OisVX.tXTkM())
{
fXqxc+="<div style='width:100%;text-align:left;'>"
fXqxc+=Translator.tr("Tax included");
}
if(OisVX.GjGfY())
{
fXqxc+="<div>"
fXqxc+=Translator.tr("Extra Tax");
}
fXqxc+=" : ";
fXqxc+=OisVX.vnunG(nIglp)+"</div>";
}
if(FPPNK>0)
{
fXqxc+="<span>"+Translator.tr("Promotion")+" : - "+OisVX.vnunG(FPPNK)+"</span><br>";
}
fXqxc+="<span><b>"+Translator.tr("Total")+" : "+OisVX.vnunG(ptMHM)+"</b></span>";
JeMbj.innerHTML=fXqxc
}
mVCRB.fKIUK=function()
{
WA_displayDialogMarketCart()
}
mVCRB.mQLEK=function()
{
this.closeWin()
}
mVCRB.jinNQ=function()
{
var OisVX=vRpVs();
if(WA_getNumberMarketItemsInCart()==0)return;
var iUPUt=document.getElementById("wa-market-select-country")
if(iUPUt)
{
OisVX.nNgsu.hJqKw=iUPUt.value
}
if(OisVX.nNgsu.hJqKw=="")
{
var iUPUt=document.getElementById("wa-market-select-country")
if(iUPUt)
{
iUPUt.focus()
iUPUt.style.backgroundColor="#ff0000"
return;
}
}
if(CONST_WA_GLOBAL_SETTINGS.link_sale_condition)
{
if(OisVX.nNgsu.sIcDu!=true)
{
var euUDG=document.getElementById("wa-sales-condition")
if(euUDG)
{
euUDG.focus()
var PgfBj=document.getElementById("wa-sales-condition-label")
PgfBj.style.backgroundColor="#ff0000"
return;
}
}
}
var JqRQu=CONST_WA_GLOBAL_SETTINGS.list_type_payment
if(JqRQu.length==1)
{
OisVX.nNgsu.PRjTp=JqRQu[0]
}
var iUPUt=document.getElementById("wa-market-select-payment")
if(iUPUt)
{
OisVX.nNgsu.PRjTp=iUPUt.value
if(OisVX.nNgsu.PRjTp=="")
{
iUPUt.focus()
iUPUt.style.backgroundColor="#ff0000"
return;
}
}
SNkVK()
}
mVCRB.uHhJl=function()
{
WA_exec_callback_opera_compliant(this,this.xIunu)
}
mVCRB.xIunu=function()
{
var OisVX=vRpVs();

var LkxRd=document.getElementById("wa-market-select-country")
if(LkxRd)
{
OisVX.nNgsu.hJqKw=LkxRd.value
}
OisVX.nNgsu.FEbJi()
var HauVq=html_getLayer("market-cart-content")
var fCAGM=html_getLayer("wa-market-payment-form") 
var psEef=""
var FmuOM=OisVX.Rulmj();
html_SetVisibility(fCAGM,(FmuOM.length>0))
if(FmuOM.length==0)
{
psEef+="<span style='font-family:Arial;font-size:16px;'>"
psEef+=Translator.tr("No articles in Card !")
psEef+="</span>"
}
else
{
var uvSRx="border:1px solid "+WA_GLOBAL_COLOR_THEME.color0+";font-weight:normal;"
var jWVTI="border:1px solid "+WA_GLOBAL_COLOR_THEME.color0+";color:#ff0000;font-weight:bold;"
var VuHxM="color:#222222;font-size:12px;"
psEef+="<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+";'>"
psEef+="<thead style='font-size:13px;border:1px solid;'>"
psEef+="<tr>"
psEef+="<th  colspan=2 style='"+uvSRx+"'></th>" 
psEef+="<th style='"+uvSRx+"'  width=70px><b>"+Translator.tr("Price")+"</b></th>"
psEef+="<th style='"+uvSRx+"'  width=70px><b>"+Translator.tr("Quantity")+"</b></th>"
psEef+="<th style='"+uvSRx+"'  width=70px><b>"+Translator.tr("Total")+"</b></th>"
psEef+="<th style='"+uvSRx+"'  width=90px></th>"
psEef+="</tr>"
for(var n=0;n<FmuOM.length;n++)
{
var jNpRG=FmuOM[n]
psEef+="<tr>"
psEef+="<th style='"+uvSRx+"' >"
var AWjBO=wa_global_market.markets[jNpRG.kciBV]
var tjeKP=new Size(30,30)
var RoiJB=tjeKP
if(AWjBO.info.design.crop_thumb==false)
{
RoiJB=jNpRG.RxfDb.size_thumb.clone()
RoiJB.scale(tjeKP)
}
else
{
}
if(jNpRG.RxfDb.img_thumb.length>0)
psEef+="<img border=0 src='"+jNpRG.RxfDb.img_thumb+"' width="+RoiJB.width+"px height="+RoiJB.height+"px>"
psEef+="</th>"
psEef+="<th style='"+uvSRx+"text-align:left;padding:5px;background-color:"+WA_GLOBAL_COLOR_THEME.color1+";' >"
psEef+="<b>"+jNpRG.jWvhL+"</b>"
if(jNpRG.SJVhb.length>0)
{
psEef+="<span style='"+VuHxM+"'>";
psEef+=" ["+jNpRG.SJVhb+"]";
psEef+="</span>";
}
if(jNpRG.m_opt_vals)
{
psEef+="<br>"
psEef+="<span style='"+VuHxM+"'>";
for(var i_opt=0;i_opt<jNpRG.RxfDb.options.length;i_opt++)
{
var ppchL=jNpRG.RxfDb.options[i_opt]
if(ppchL)
{
var hnHdK=jNpRG.m_opt_vals[i_opt];
var WIIOk=ppchL.title;
if(WIIOk.length>0)
{
psEef+=WIIOk;
psEef+=":"
}
psEef+=ppchL.vals[hnHdK];
psEef+=" "
}
}
psEef+="</span>";
}
psEef+="</th>"
var wkYRp=jNpRG.hNBOp()
psEef+="<th style='"+uvSRx+"' >"+OisVX.vnunG(wkYRp)+"</th>"
psEef+="<th style='"+uvSRx+"'  align=center><input type=text id='wa-cart-quantity-"+n+"' style='width:45px;' maxlength=3 value='"+jNpRG.vSjJF+"' type=text/></th>"
psEef+="<th style='"
var BHhdJ=jNpRG.vSjJF*wkYRp
psEef+=(BHhdJ>0)?uvSRx:jWVTI;
psEef+="' ><span id='wa-cart-total-"+n+"'>"
psEef+=OisVX.vnunG(BHhdJ)
psEef+="</span></th>"
psEef+="<th style='"+uvSRx+"' ><a href=\"javascript:WA_marketRemoveItem("+n+")\">"+Translator.tr("Remove card item")+"</a></th>"
psEef+="</tr>"
}
psEef+="<tr>"
psEef+="<th style='"+uvSRx+"text-align:right;padding:5px;' id='wa-cart-amount-total'  colspan=5>&nbsp;</th>"
psEef+="<th style='"+uvSRx+"' ></th>"
psEef+="</tr>"
psEef+="</thead>"
psEef+="</table>"
psEef+="<br>"
}
HauVq.innerHTML=psEef
this.iWBhN()
WA_exec_callback_opera_compliant(this,this.OrhVJ) 
}
mVCRB.nBMMQ=function()
{
var OisVX=vRpVs();
this.addButton(Translator.tr("Continue Shopping"),this.mQLEK,[""],this)
this.addButton(Translator.tr("Checkout order"),this.jinNQ,[""],this)
this.initializeWindow(670,700)
var EAOxW="font-family:Arial;font-size:12px;color:#000000;"
var psEef=""
psEef+="<div id='market-cart-content' style='width:100%;"+EAOxW+"' align=center>" 
psEef+="</div>"
psEef+="<br>"
psEef+="<div style='width:100%;"+EAOxW+"' align=center id='wa-market-payment-form'>"
psEef+="<br>"
var PpFxB=CONST_WA_GLOBAL_SETTINGS.list_favorite_country
var YBeLY=CONST_WA_GLOBAL_SETTINGS.list_country
var rHBqu=new Array()
for(var nhELu=0;nhELu<PpFxB.length;nhELu++)
{
rHBqu[PpFxB[nhELu]]=true
}
for(var nhELu=0;nhELu<YBeLY.length;nhELu++)
{
rHBqu[YBeLY[nhELu]]=true
}
var AEcdC=0;
var dZqbj=""
for(var c in rHBqu)
{
AEcdC++;
dZqbj=c
}
if(AEcdC==1)
{
OisVX.nNgsu.hJqKw=dZqbj
}
if(AEcdC>1)
{
psEef+="<span style='font-weight:bold;'>"
psEef+=Translator.tr("Please choose a country to deliver your order")
psEef+="</span>"
psEef+="<br>"
psEef+="<select onchange=\"WA_marketChangeCountry(this)\" id='wa-market-select-country'>"
if(CONST_WA_GLOBAL_SETTINGS.default_selected_country.length==0)
{
psEef+="<option value=\"\">...</option>"
}
var vtpqc=new Array()
for(var nhELu=0;nhELu<PpFxB.length;nhELu++)
{
var hgHYq=PpFxB[nhELu]
vtpqc.push({code:hgHYq,lab:Translator.country(hgHYq)})
}
for(var nhELu=0;nhELu<vtpqc.length;nhELu++)
{
var gxlpN=vtpqc[nhELu]
var hgHYq=gxlpN.code
psEef+="<option "
if(OisVX.nNgsu.CQnPB()==hgHYq)psEef+="selected "
psEef+="value=\""+hgHYq+"\">"+Translator.country(hgHYq)+"</option>"
}
if((PpFxB.length>0)&&(YBeLY.length>0))
{
psEef+="<option value=\"\">-----</option>"
}
var RYdUK=new Array()
for(var nhELu=0;nhELu<YBeLY.length;nhELu++)
{
var hgHYq=YBeLY[nhELu]
RYdUK.push({code:hgHYq,lab:Translator.country(hgHYq)})
}
if((PpFxB.length==0)&&(YBeLY.length==0))
{
var ItMPU=CONST_WA_COUNTRIES.codes
for(var nhELu=0;nhELu<ItMPU.length;nhELu++)
{
var hgHYq=ItMPU[nhELu]
RYdUK.push({code:hgHYq,lab:Translator.country(hgHYq)})
}
}
RYdUK.sort(axifK)
for(var nhELu=0;nhELu<RYdUK.length;nhELu++)
{
var gxlpN=RYdUK[nhELu]
var hgHYq=gxlpN.code
psEef+="<option "
if(OisVX.nNgsu.CQnPB()==hgHYq)psEef+="selected "
psEef+="value=\""+hgHYq+"\">"+Translator.country(hgHYq)+"</option>"
}
psEef+="</select>"
psEef+="<br>"
psEef+="<br>"
}
if(CONST_WA_GLOBAL_SETTINGS.link_sale_condition)
{
psEef+="<a "+WA_LinkToHref(CONST_WA_GLOBAL_SETTINGS.link_sale_condition)+" style='color:#0000ff'>"
psEef+=Translator.tr("Terms of sell")
psEef+="</a>"
psEef+="<br>" 
psEef+="<span id='wa-sales-condition-label'  style='font-weight:bold;'>"
psEef+=Translator.tr("label_market_accept_terms")
psEef+="</span>"
psEef+="<input id='wa-sales-condition' onchange=\"WA_marketChangeSalesCondition(this)\" "
psEef+=(OisVX.nNgsu.sIcDu)?"checked ":""
psEef+="type='checkbox' value='1'/>" 
psEef+="<br>"
}
var JqRQu=CONST_WA_GLOBAL_SETTINGS.list_type_payment
if(JqRQu.length>1)
{
psEef+="<span style='font-weight:bold;'>"
psEef+=Translator.tr("Choose a type of payment")
psEef+="</span>"
psEef+="<br>"
psEef+="<select onchange=\"WA_marketChangeTypePayment(this)\" id='wa-market-select-payment'>"
if((JqRQu.length>1)||(JqRQu.length==0))
{
psEef+="<option value=\"\">...</option>"
}
for(var nhELu=0;nhELu<JqRQu.length;nhELu++)
{
var PRjTp=JqRQu[nhELu]
psEef+="<option "
if(OisVX.nNgsu.PRjTp==PRjTp)psEef+="selected "
psEef+="value=\""+PRjTp+"\">"+Translator.tr("label_market_"+PRjTp)+"</option>" 
}
psEef+="</select>"
psEef+="<br>"
psEef+="<br>"
}
if(CONST_WA_GLOBAL_SETTINGS.list_promo_codes)
{
var ItMPU=CONST_WA_GLOBAL_SETTINGS.list_promo_codes
psEef+="<span id='wa-promo-code-label'  style='font-weight:bold;'>"
psEef+=Translator.tr("form-label-code_promo")
psEef+="</span><br>"
psEef+="<input id='wa-promo-code' onchange=\"WA_marketChangePromoCode(this)\" " 
psEef+=" value='"+OisVX.nNgsu.kMJRD+"' "
psEef+="/>"
psEef+="<br>" 
}
psEef+="</div>"
this.writeContent(psEef)
var HauVq=html_getLayer("market-cart-content")
HauVq.innerHTML="<div width=100% align=center><img src='wa_loading.gif'></div>" 

OisVX.vQFUY(this,this.uHhJl)
}
mVCRB.nBMMQ() 
}
function WA_marketChangeCountry(iUPUt)
{
iUPUt.style.backgroundColor=""
var mVCRB=WA_Dialog.getCurrent()
mVCRB.uHhJl()
}
function WA_marketChangeTypePayment(iUPUt)
{
var OisVX=vRpVs();
OisVX.nNgsu.PRjTp=iUPUt.value
OisVX.nNgsu.FEbJi()
iUPUt.style.backgroundColor=""
}
function WA_marketChangeSalesCondition(YWjOR)
{
var OisVX=vRpVs();
OisVX.nNgsu.sIcDu=YWjOR.checked
OisVX.nNgsu.FEbJi() 
var PgfBj=document.getElementById("wa-sales-condition-label")
PgfBj.style.backgroundColor="" 
}
function WA_marketChangePromoCode(YWjOR)
{
var OisVX=vRpVs();
OisVX.nNgsu.kMJRD=YWjOR.value
OisVX.nNgsu.FEbJi() 


}
function WA_LinkToHref(ZmnKq)
{
var psEef=""
var jrEWc=ZmnKq.url
var AgoCj=Translator.m_lang_for_filename
if(AgoCj.length>0)AgoCj="_"+AgoCj
jrEWc=jrEWc.replace(/@lng@/g,AgoCj)
psEef+="href=\""+jrEWc+"\" "
if(ZmnKq.open==1)
{
psEef+="target="
psEef+="_blank"
}
return psEef;
}
function WA_displayDialogMarketProduct(QYemw,XmxJj)
{
var bEYqL=wa_global_market.markets[QYemw]
var WOlhn=bEYqL.obj
var UoYMt=WOlhn.info.products
var RxfDb=UoYMt[XmxJj] 

var mVCRB=new WA_Dialog();

mVCRB.RxfDb=RxfDb
mVCRB.MlKnQ=QYemw
mVCRB.fKIUK=function()
{
WA_displayDialogMarketCart()
}
mVCRB.huaGJ=function()
{
var OisVX=vRpVs();
OisVX.vQFUY(this,this.CnOmx) 
}
mVCRB.CnOmx=function()
{
var RxfDb=this.RxfDb;
var OisVX=vRpVs();
var LVfWX=new Array();
var clsSW=RxfDb.obj.id;
for(var i=0;i<3;i++)
{
var UrMMo=-1;
var voNBM=clsSW+"-select-opt"
var iUPUt=document.getElementById(voNBM+i)
if(iUPUt)
{
if(iUPUt.value.length==0)
{
iUPUt.style.backgroundColor="#ff0000";
iUPUt.focus()
return;
}
UrMMo=parseInt(iUPUt.value)
}
LVfWX.push(UrMMo)
}
if(OisVX.addProductToShoppingCard(RxfDb,LVfWX))
{
OisVX.xAWLQ()
WA_displayDialogMarketCart()
}
}
mVCRB.nBMMQ=function()
{
var QYemw=this.MlKnQ
var RxfDb=this.RxfDb
var psEef=""
this.addButton(Translator.tr("Go to my card"),this.fKIUK,[""],this)
if(RxfDb.unavail==false)
{
this.addButton(Translator.tr("Add to card"),this.huaGJ,[""],this)
}
this.initializeWindow(670,this.idealHeight())
psEef+="<table border=0 width=100% cellpadding=4>"
psEef+="<tr>" 
if(RxfDb.img_big.length>0)
{
psEef+="<td width='100px' align=center valign=top>"
var RoiJB=RxfDb.size_thumb.clone() 
RoiJB.scale(new Size(200,200))
psEef+="<a href=\""+RxfDb.img_big+"\" target=_blank>"
psEef+="<img border=0 src=\""+RxfDb.img_big+"\" width='"+RoiJB.width+"px' height='"+RoiJB.height+"px'>"
psEef+="</a>"
psEef+="</td>"
}
var dnUaJ="color:"+WA_GLOBAL_COLOR_THEME.color_text+";";
psEef+="<td valign=top style='font-family:Arial;'>"
psEef+="<span style='font-weight:bold;font-size:16px;"+dnUaJ+"'>"
psEef+=RxfDb.title
psEef+="</span>"
psEef+="<br>"
if(RxfDb.sub_title.length>0)
{
psEef+="<span style='color:#333333;font-size:14px;'>"
psEef+=RxfDb.sub_title
psEef+="</span>"
psEef+="<br>"
}
psEef+="<br>"
psEef+="<table border=0 width=100% cellspacing=0 cellpadding=0><tr><td>"
psEef+="<span style='"+dnUaJ+";font-size:14px;'>"
psEef+=Translator.tr("Price")+" : "
psEef+="</span>"
psEef+="<span style='"+dnUaJ+";font-size:18px;font-weight:bold;' id='"+RxfDb.obj.id+"-price'>"
if(RxfDb.unavail)
{
psEef+=Translator.tr("Unavailable")
}
psEef+="</span>"
if(RxfDb.more_info)
{
psEef+="</td><td align=right>"
var ZmnKq=RxfDb.more_info
var lEMWd=WA_LinkToHref(ZmnKq)
psEef+="<a "+lEMWd+" style='font-family:Arial;text-decoration:underline;font-weight:bold;font-size:12px;color:0000ff;'>"+Translator.tr("More product info link")+"</a>"
}
psEef+="</td></tr></table>"
psEef+="<br>"
var eVOkS=RxfDb.obj.index
if(RxfDb.unavail==false)
if(RxfDb.options.length>0)
{
psEef+="<table border=0 cellspacing=0 cellpadding=0>"
for(var n=0;n<RxfDb.options.length;n++)
{
var ppchL=RxfDb.options[n]
if(ppchL)
{
psEef+="<tr><td align=right>"
psEef+="<span style='font-family:Arial;font-weight:bold;font-size:12px;"+dnUaJ+"'>"
psEef+=ppchL.title+" :&nbsp;"
psEef+="</span>"
psEef+="</td><td align=left>"
psEef+="<select id='"+RxfDb.obj.id+"-select-opt"+n+"' onchange=\"WA_market_changeCustomPrice('"+QYemw+"',"+eVOkS+")\">"
psEef+="<option value=\"\">...</option>"
for(var nhELu=0;nhELu<ppchL.vals.length;nhELu++)
{
var rFbrv=ppchL.vals[nhELu]
psEef+="<option value=\""+nhELu+"\">"+rFbrv+"</option>"
}
psEef+="</select>"
psEef+="</td></tr>";
}
}
psEef+="</table>"
}
psEef+="</td>"
psEef+="</tr>"
psEef+="</table>"
if(RxfDb.description.length>0)
{
psEef+="<table border=0 width=100% cellpadding=4>"
psEef+="<tr><td colspan=2>"
psEef+="<span style='font-family:Arial;font-size:13px;"+dnUaJ+"'>"
psEef+="<hr>"
psEef+=RxfDb.description
psEef+="</span>"
psEef+="</td></tr>"
psEef+="</table>"
}
this.writeContent(psEef)
WA_market_changeCustomPrice(QYemw,eVOkS)
}
mVCRB.displayWindowWithAutoResize(300,mVCRB.nBMMQ) 
}
function OPHSs(RxfDb,clsSW)
{
var BHubS=new Array()
for(var i=0;i<3;i++)
{
var voNBM=clsSW+"-select-opt"
var iUPUt=document.getElementById(voNBM+i)
BHubS[i]=-1
if(iUPUt)
{
iUPUt.style.backgroundColor="";
var rFbrv=parseInt(iUPUt.value)
if(isNaN(rFbrv)==false)
BHubS[i]=rFbrv
}
}
return Eijpk(RxfDb,BHubS)
}
function Eijpk(RxfDb,BHubS)
{
if(RxfDb.unavail)return;
var ludwH=false;
for(var i=0;i<RxfDb.custom_prices.length;i++)
{
var dRebA=RxfDb.custom_prices[i]
var wutTA=true;
for(var n=0;n<3;n++)
{
if(dRebA.tab[n]!=BHubS[n])wutTA=false
}
if(wutTA)
{
ludwH=dRebA;
break;
}
}
var wkYRp=RxfDb.price
if(ludwH)
{
wkYRp=ludwH.pr
}
return wkYRp;
}
function WA_market_changeCustomPrice(QYemw,eVOkS)
{
var OisVX=vRpVs();
var bEYqL=wa_global_market.markets[QYemw]
var UoYMt=bEYqL.info.products;
var RxfDb=UoYMt[eVOkS]
if(RxfDb.unavail)return;
var clsSW=RxfDb.obj.id
var wkYRp=OPHSs(RxfDb,clsSW)
var IuUdY=html_getLayer(clsSW+"-price")
if(IuUdY)
{
IuUdY.innerHTML=OisVX.vnunG(wkYRp)
}
}
function SNkVK()
{
var OisVX=vRpVs();
if(WA_getNumberMarketItemsInCart()==0)return;
var jNpRG=OisVX.nNgsu
if((OisVX.EEChQ)&&(jNpRG.PRjTp=="paypal"))
{
LErSW();
return;
}
qcEoY(gKVBn)
}
function qcEoY(FWNxw)
{
var OisVX=vRpVs();
var jNpRG=OisVX.nNgsu
jNpRG.PiSOD()
var mVCRB=new WA_Dialog();
mVCRB.FWNxw=FWNxw
mVCRB.dWeVe=function(KNjIn)
{
return Translator.tr("form-label-"+KNjIn)
}
mVCRB.onCustomKeypress=function(KNjIn)
{
if(KNjIn==13)
{
wa_timeout(Delegate.create(this,this.MlnQu),0);
}
return false;
}
mVCRB.WuvjY=function()
{
if(this.FWNxw==gKVBn)
{
WA_displayDialogMarketCart()
}
else
{
qcEoY(gKVBn)
}
}
mVCRB.lQTbi=function()
{
LErSW()
}
mVCRB.MlnQu=function()
{
var OisVX=vRpVs();
var jNpRG=OisVX.nNgsu
if(jNpRG.OWlMe(this.FWNxw)==false) return;
jNpRG.FEbJi()
if(this.FWNxw==gKVBn)
{
if(jNpRG.rAiet==true)
{
qcEoY(nQSZM)
}
else
{
this.lQTbi()
}
}
else
{
this.lQTbi()
}
}
mVCRB.uBujU=function(KNjIn,FFohl)
{
if(FFohl==undefined) FFohl=""
if(FFohl)FFohl=" size="+FFohl
return "<input name='"+KNjIn+"' value=\""+jNpRG.cvCmL(KNjIn,this.FWNxw)+"\" type=text "+FFohl+">"
}
mVCRB.CqSEH=function(SDmIw)
{
return "<td width=150px align=right valign=top>"+Translator.tr(SDmIw)+" :</td>"
}
mVCRB.nBMMQ=function()
{
var OisVX=vRpVs();
var jNpRG=OisVX.nNgsu
this.addButton("< "+Translator.tr('Back'),this.WuvjY,[""],this)
this.addButton(Translator.tr('Continue')+" >",this.MlnQu,[""],this)
this.initializeWindow(600,600)
var aHmVr="form-label-"
var iSFUR=CONST_WA_GLOBAL_SETTINGS.list_form_fields 
var psEef=""
psEef+="<form id='wa-market-form' onSubmit='return false'>"
psEef+="<table border=0 width=100% cellspacing=5 style='font-family:Arial;font-size:15px;'>"
psEef+="<tr><td colspan=2 align=center style='font-size:18px;'>"
psEef+=Translator.tr((this.FWNxw==gKVBn)?"Fill Deliver information below":"Fill Billing information below")
psEef+="<br><br></td></tr>"
for(var n=0;n<iSFUR.length;n++)
{
var OcvSS=iSFUR[n]
if(OcvSS=="address")
{
psEef+="<tr>"+this.CqSEH("Address");
psEef+="<td>"
psEef+=this.uBujU("address_1",30)
psEef+="</td></tr>"
psEef+="<tr><td></td><td>"
psEef+=this.uBujU("address_2",30)
psEef+="</td></tr>"
psEef+="<tr>"+this.CqSEH("form-label-city");
psEef+="<td>"
psEef+=this.uBujU("city")+"&nbsp;"+this.dWeVe("zip")+" : "+this.uBujU("zip",10)
psEef+="</td></tr>" 
psEef+="<tr>"+this.CqSEH("form-label-country");
psEef+="<td>"
if(this.FWNxw==nQSZM)
{
psEef+="<select id='wa-select-form-country' onchange='WA_marketChangeFormCountry("+this.FWNxw+")'>"
var RYdUK=new Array();
var ItMPU=CONST_WA_COUNTRIES.codes
for(var nhELu=0;nhELu<ItMPU.length;nhELu++)
{
var hgHYq=ItMPU[nhELu]
RYdUK.push({code:hgHYq,lab:Translator.country(hgHYq)})
}
RYdUK.sort(axifK)
var AsDqc=jNpRG.CQnPB()
AsDqc=jNpRG.cvCmL('countryCode',this.FWNxw,AsDqc)
for(var nhELu=0;nhELu<RYdUK.length;nhELu++)
{
var gxlpN=RYdUK[nhELu]
var hgHYq=gxlpN.code
psEef+="<option "
if(AsDqc==hgHYq)psEef+="selected "
psEef+="value=\""+hgHYq+"\">"+Translator.country(hgHYq)+"</option>"
}
psEef+="</select>"
}
else
{
psEef+=Translator.country(OisVX.nNgsu.hJqKw);
}
psEef+="<br><span id='wa-market-state'>"
psEef+="<select id='wa-select-state'></select>"
psEef+="</span>" 
psEef+="</td></tr>"
}
else
{
psEef+="<tr>"+this.CqSEH("form-label-"+OcvSS);
psEef+="<td>"
psEef+=this.uBujU(OcvSS,30) 
psEef+="</td></tr>"
}
}
if(this.FWNxw==gKVBn)
{
psEef+="<tr><td colspan=2 align=center >"
psEef+=Translator.tr("Billing adress is different")+" <input type=checkbox "
if(OisVX.nNgsu.rAiet)psEef+="checked "
psEef+="onchange='WA_marketCheckBillingAdress(this)'>"
psEef+="</td></tr>"
}
psEef+="</table>"
psEef+="</form>"
this.writeContent(psEef)
WA_exec_callback_opera_compliant(this,this.PoRow) 
}
mVCRB.PoRow=function()
{
WA_marketChangeFormCountry(this.FWNxw)
}
mVCRB.nBMMQ()
}
function abRKO(FWNxw,iUPUt,LgpYe)
{
var OisVX=vRpVs();
var jNpRG=OisVX.nNgsu
var HKXVX=jNpRG.cvCmL("stateCode",FWNxw) 
iUPUt.options.length=0
for(var n=0;n<LgpYe.length;n++)
{
var val=LgpYe[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==HKXVX)elOptNew.selected=true
try{
iUPUt.add(elOptNew,null);
}
catch(ex){
iUPUt.add(elOptNew);
}
}
}
function WA_marketChangeFormCountry(FWNxw)
{
var OisVX=vRpVs();
var jNpRG=OisVX.nNgsu
var IEwkv=jNpRG.hJqKw
var iUPUt=document.getElementById("wa-select-form-country");
if(iUPUt) IEwkv=iUPUt.value;
html_SetDisplay("wa-market-state",(IEwkv=="US")||(IEwkv=="CA")||(IEwkv=="BR"))
var CncXI=document.getElementById("wa-select-state");
if(CncXI)
{
if(IEwkv=="US") abRKO(FWNxw,CncXI,["","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(IEwkv=="CA") abRKO(FWNxw,CncXI,["","Alberta","British Columbia","Manitoba","New Brunswick","Newfoundland and Labrador","Northwest Territories","Nova Scotia","Nunavut","Ontario","Prince Edward Isl.","Quebec","Saskatchewan","Yukon Territory"])
if(IEwkv=="BR") abRKO(FWNxw,CncXI,["","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(YWjOR)
{
var OisVX=vRpVs();
var jNpRG=OisVX.nNgsu
jNpRG.rAiet=YWjOR.checked
jNpRG.FEbJi()
}
function LErSW()
{
var OisVX=vRpVs();
var jNpRG=OisVX.nNgsu
var VLbLP=CONST_WA_GLOBAL_SETTINGS.currency_info 

var mVCRB=new WA_Dialog();
mVCRB.WuvjY=function()
{
if(this.jNpRG.PRjTp=="paypal")
{
WA_displayDialogMarketCart();return;
}
if(this.jNpRG.rAiet)
qcEoY(nQSZM)
else
qcEoY(gKVBn)
}
mVCRB.sKtjL=function(AKOOV,rFbrv)
{
rFbrv=""+rFbrv
rFbrv=rFbrv.replace(/'/g,"&lsquo;")
return "<input type=hidden name='"+AKOOV+"' value=\""+rFbrv+"\">"
}
mVCRB.CeCIl=function()
{
var OisVX=vRpVs();
var psEef=""
if(VLbLP.charCodeAt(3)>=100) return""
psEef+="<form id='wa-http-sender' method=POST action='https://www.paypal.com/cgi-bin/webscr' target='_blank'>"
psEef+=this.sKtjL("cmd","_cart")
psEef+=this.sKtjL("business",CONST_WA_GLOBAL_SETTINGS.email_paypal_account)
psEef+=this.sKtjL("upload","1")
psEef+=this.sKtjL("charset","utf-8")
psEef+=this.sKtjL("no_note","0")
psEef+=this.sKtjL("currency_code",CONST_WA_GLOBAL_SETTINGS.currency_code)
psEef+=this.sKtjL("no_shipping","2")
var iiCXT=OisVX.Rulmj()
for(var i=0;i<iiCXT.length;i++)
{
var info=iiCXT[i];
var index=i+1;
var sKxuv=info.hNBOp();
if(OisVX.tXTkM())
{
var YiLjm=OisVX.Zjcdb(OisVX.qeOQO(sKxuv));
sKxuv=sKxuv-YiLjm;
}
psEef+=this.sKtjL("amount_"+index,""+sKxuv)
psEef+=this.sKtjL("quantity_"+index,info.vSjJF)
var aCBta=0;
if(info.SJVhb.length>0)
{
psEef+=this.sKtjL("on"+aCBta+"_"+index,"ref")
psEef+=this.sKtjL("os"+aCBta+"_"+index,info.SJVhb)
aCBta++;
}
var avAxI=""
if(info.m_opt_vals)
{
for(var i_opt=0;i_opt<info.RxfDb.options.length;i_opt++)
{
var ppchL=info.RxfDb.options[i_opt]
if(ppchL)
{
var hnHdK=info.m_opt_vals[i_opt];
var IMuiC=ppchL.vals[hnHdK]
var WIIOk=ppchL.title;
if(WIIOk.length==0) WIIOk="opt"+(i_opt+1);
psEef+=this.sKtjL("on"+aCBta+"_"+index,WIIOk)
psEef+=this.sKtjL("os"+aCBta+"_"+index,IMuiC)
if(avAxI.length>0)avAxI=avAxI+", "
avAxI+=IMuiC
aCBta++;
}
}
}
var fuFix=info.jWvhL;
if(avAxI.length>0)fuFix=fuFix+"("+avAxI+")"
psEef+=this.sKtjL("item_name_"+index,fuFix) 
}
var PWelR=OisVX.GgRVX()
if(OisVX.tXTkM())
{
PWelR=PWelR-OisVX.Zjcdb(OisVX.qeOQO(PWelR));
}
if(OisVX.tXTkM())
{
var bZQvn=OisVX.jVXcm();
var IigFe=OisVX.GgRVX()
var XHkop=bZQvn+IigFe;
var gdmhY=OisVX.Zjcdb(OisVX.qeOQO(XHkop));
var foWOk=XHkop-gdmhY;
foWOk=foWOk-PWelR;
var dlNxd=0;
for(var i=0;i<iiCXT.length;i++)
{
var info=iiCXT[i];
var index=i+1;
var MWWAC=0;
var dMwuD=0;
var sKxuv=info.vSjJF*info.hNBOp();
var n0=OisVX.rpXKR()/100;
var tax=sKxuv*(n0/(1+n0));
sKxuv=sKxuv-tax;
MWWAC=sKxuv;
var RnekK=info.hNBOp();
var YiLjm=OisVX.Zjcdb(OisVX.qeOQO(RnekK));
RnekK=RnekK-YiLjm;
dMwuD=info.vSjJF*RnekK;
if(dMwuD>MWWAC)
{
RnekK=info.m_price;
RnekK=RnekK-YiLjm;
var nepxx=RnekK;
if((nepxx>0)&&(nepxx!=info.hNBOp()))
{
nepxx=nepxx-0.01;
}
psEef+=this.sKtjL("amount_"+index,nepxx) 
dMwuD=info.m_quantity*nepxx;
}
dlNxd+=dMwuD;
}
var PrFaq=OisVX.Zjcdb(foWOk-dlNxd);
if(PrFaq>0)
{
var index=iiCXT.length+1;
psEef+=this.sKtjL("item_name_"+index,Translator.tr("TVA correction"))
psEef+=this.sKtjL("quantity_"+index,1)
psEef+=this.sKtjL("amount_"+index,PrFaq)
}
psEef+=this.sKtjL("tax_cart",gdmhY)
}
else
{
psEef+=this.sKtjL("tax_cart",OisVX.CCTGa())
}
psEef+=this.sKtjL("handling_cart",PWelR) 
psEef+="</form>"
return psEef;
}
mVCRB.RZsuA=function()
{
var CcCQa=this.VnGqZ(gKVBn);
var psEef="";
if(CcCQa.length>0)
{
psEef+=""+Translator.tr("Shipping information")+":\n";
psEef+=CcCQa;
}
return psEef;
}
mVCRB.JnKqg=function()
{
var CcCQa=this.VnGqZ(nQSZM);
var psEef="";
if(CcCQa.length>0)
{
psEef+=Translator.tr("Billing information")+":\n";
psEef+=CcCQa;
}
return psEef;
}
mVCRB.VnGqZ=function(FWNxw)
{
var OisVX=vRpVs();
var psEef="";
var Gaulu=new Array();
var iSFUR=rCQUx(CONST_WA_GLOBAL_SETTINGS.list_form_fields)
iSFUR.push("country")
iSFUR.push("state")
for(var i=0;i<iSFUR.length;i++)
{
var hHYBg=iSFUR[i];
Gaulu[hHYBg]=this.jNpRG.cvCmL(hHYBg,FWNxw)
}
if(Gaulu["firstname"])psEef+=Gaulu["firstname"]+"\n"
if(Gaulu["lastname"])psEef+=Gaulu["lastname"]+"\n"
if(Gaulu["company"])
{
psEef+=Translator.tr("form-label-company")+" : "+Gaulu["company"]+"\n"
}
if(Gaulu["fiscal_code"]) psEef+=Translator.tr("form-label-fiscal_code")+" : "+Gaulu["fiscal_code"]+"\n"
if(Gaulu["tva"]) psEef+=Translator.tr("form-label-tva")+" : "+Gaulu["tva"]+"\n"
if(Gaulu["address_1"]) psEef+=Gaulu["address_1"]+"\n"
if(Gaulu["address_2"]) psEef+=Gaulu["address_2"]+"\n"
if(Gaulu["zip"]) psEef+=Gaulu["zip"]+" "
if(Gaulu["city"]) psEef+=Gaulu["city"]+"\n"
if(Gaulu["country"])psEef+=Translator.country(Gaulu["country"])
if(Gaulu["state"]&&Gaulu["state"].length>0) psEef+=" "+Gaulu["state"];
psEef+="\n"
if(Gaulu["phone"]) psEef+=Translator.tr("form-label-phone")+" : "+Gaulu["phone"]+"\n"
if(Gaulu["fax"]) psEef+=Translator.tr("form-label-fax")+" : "+Gaulu["fax"]+"\n"
if(Gaulu["email"]) psEef+=Gaulu["email"]+"\n" 
if(Gaulu["comment"])
{
psEef+=Translator.tr("form-label-comment")+" : \n";
psEef+=Gaulu["comment"]+"\n"
}
return psEef;
}
mVCRB.CqqvU=function()
{
var OisVX=vRpVs();
var psEef="";
var iiCXT=OisVX.Rulmj();
psEef+="**************\n"
for(var i=0;i<iiCXT.length;i++)
{
var jNpRG=iiCXT[i];
var index=i+1;
var fuFix=jNpRG.jWvhL;
if(jNpRG.SJVhb.length>0)
{
fuFix+=" ["+jNpRG.SJVhb+"]";
}
var avAxI=""
if(jNpRG.m_opt_vals)
{
for(var i_opt=0;i_opt<jNpRG.RxfDb.options.length;i_opt++)
{
var ppchL=jNpRG.RxfDb.options[i_opt]
if(ppchL)
{
if(avAxI.length>0)avAxI=avAxI+", "
var hnHdK=jNpRG.m_opt_vals[i_opt];
var IMuiC=ppchL.vals[hnHdK]
var WIIOk=ppchL.title;
if(WIIOk.length>0) avAxI+=WIIOk+" : "
avAxI+=IMuiC
}
}
}
if(avAxI.length>0)fuFix=fuFix+"\n("+avAxI+")"
psEef+=fuFix;
psEef+="\n"
psEef+=Translator.tr("Price")+" : "+OisVX.lkUkb(jNpRG.hNBOp())+"\n"
psEef+=Translator.tr("Quantity")+" : "+jNpRG.vSjJF+"\n"
psEef+=Translator.tr("Total")+" : "+OisVX.lkUkb(jNpRG.hNBOp()*jNpRG.vSjJF);
psEef+="\n"
psEef+="**************\n"
}
var GqRZD=OisVX.jVXcm()
var nIglp=OisVX.CCTGa()
var IfNmA=OisVX.GgRVX()
var ptMHM=OisVX.Xbgqr()
var FPPNK=OisVX.PwWgB() 
psEef+=Translator.tr("Sub total")+" : "+OisVX.lkUkb(GqRZD)+"\n";
if(CONST_WA_GLOBAL_SETTINGS.shipping_type!=PqiQZ)
{
psEef+=Translator.tr("Shipping amount")+" : "+OisVX.lkUkb(IfNmA)+"\n";
}
if(OisVX.tXTkM()||OisVX.GjGfY())
{
if(OisVX.tXTkM())
{
psEef+=Translator.tr("Tax included");
}
if(OisVX.GjGfY())
{
psEef+=Translator.tr("Extra Tax");
}
psEef+=" : ";
psEef+=OisVX.lkUkb(nIglp)+"\n";
}
if(FPPNK>0)
{
psEef+=Translator.tr("Promotion")+" : - "+OisVX.lkUkb(FPPNK)+"\n";
}
psEef+=Translator.tr("Total")+" : "+OisVX.lkUkb(ptMHM)+"\n";
return psEef;
}
mVCRB.MFpIK=function()
{
var OisVX=vRpVs();
var psEef="";
var iiCXT=OisVX.Rulmj()
psEef+="<table class=\"wa-cart-global-table\">"
psEef+="<tr class=\"wa-cart-title\">"
psEef+="<td>&nbsp;</td>"
psEef+="<td>"+Translator.tr("Price")+"</td>"
psEef+="<td>"+Translator.tr("Quantity")+"</td>"
psEef+="<td>"+Translator.tr("Total")+"</td>"
psEef+="</tr>"
for(var i=0;i<iiCXT.length;i++)
{
psEef+="<tr>"
var jNpRG=iiCXT[i];
var index=i+1;
psEef+="<td>"
var fuFix=jNpRG.jWvhL;
if(jNpRG.SJVhb.length>0)
{
fuFix+=" ["+jNpRG.SJVhb+"]";
}
fuFix="<b>"+fuFix+"</b>"
var avAxI=""
if(jNpRG.m_opt_vals)
{
for(var i_opt=0;i_opt<jNpRG.RxfDb.options.length;i_opt++)
{
var ppchL=jNpRG.RxfDb.options[i_opt]
if(ppchL)
{
if(avAxI.length>0)avAxI=avAxI+", "
var hnHdK=jNpRG.m_opt_vals[i_opt];
var IMuiC=ppchL.vals[hnHdK]
var WIIOk=ppchL.title;
if(WIIOk.length>0) avAxI+=WIIOk+" : "
avAxI+=IMuiC
}
}
}
if(avAxI.length>0)fuFix=fuFix+"<br><span class=\"wa-cart-option\">("+avAxI+")</span>"
psEef+=fuFix;
psEef+="</td>"
psEef+="<td>"+OisVX.vnunG(jNpRG.hNBOp())+"</td>"
psEef+="<td>"+jNpRG.vSjJF+"</td>"
psEef+="<td>"+OisVX.vnunG(jNpRG.hNBOp()*jNpRG.vSjJF)+"</td>"
psEef+="</tr>"
}
psEef+="<tr><td colspan=4>"
var GqRZD=OisVX.jVXcm()
var nIglp=OisVX.CCTGa()
var IfNmA=OisVX.GgRVX()
var ptMHM=OisVX.Xbgqr()
var FPPNK=OisVX.PwWgB() 
psEef+="<table class=\"wa-cart-table-total\">"
psEef+="<tr><td align=right >"+Translator.tr("Sub total")+" : "+OisVX.vnunG(GqRZD)+"</td></tr>";
if(CONST_WA_GLOBAL_SETTINGS.shipping_type!=PqiQZ)
{
psEef+="<tr><td align=right>"+Translator.tr("Shipping amount")+" : "+OisVX.vnunG(IfNmA)+"</td></tr>";
}
if(OisVX.tXTkM()||OisVX.GjGfY())
{
if(OisVX.tXTkM())
{
psEef+="<tr><td align=left >"+Translator.tr("Tax included");
}
if(OisVX.GjGfY())
{
psEef+="<tr><td align=right >"+Translator.tr("Extra Tax");
}
psEef+=" : ";
psEef+=OisVX.vnunG(nIglp)+"</td></tr>";
}
if(FPPNK>0)
{
psEef+="<tr><td align=right class=\"wa-cart-promo\">"+Translator.tr("Promotion")+" : - "+OisVX.vnunG(FPPNK)+"</td></tr>";
}
psEef+="<tr><td align=right class=\"wa-cart-total\">"+Translator.tr("Total")+" : "+OisVX.vnunG(ptMHM)+"</td></tr>";
psEef+="</table>" 
psEef+="</td></tr>"
psEef+="</table>"
psEef=psEef.replace(/\"/g,"'")
return psEef;
}
mVCRB.srLXH=function(rFbrv)
{
if((""+rFbrv).length==1)rFbrv="0"+rFbrv;
return rFbrv
}
mVCRB.OgLfC=function()
{
var OisVX=vRpVs();
var psEef=""
if(VLbLP.charCodeAt(3)>=100) return""
if(uprRL)
{
psEef+="<form id='wa-http-sender' method=POST action='"+uprRL_URL+"crbst_market_print_form.php' target='_blank'>"
}
else
{
psEef+="<form id='wa-http-sender' method=POST action='crbst_market_print_form.php' target='_blank'>"
}
psEef+=this.sKtjL("type_payment",this.jNpRG.PRjTp)
psEef+=this.sKtjL("MAIL_TITLE_PREFIXE",Translator.tr("title email Order notification"))
psEef+=this.sKtjL("MAIN_TITLE",Translator.tr("PRINT_FORM_MAIN_TITLE"))
psEef+=this.sKtjL("PREFIXE_ORDER",Translator.tr("PRINT_FORM_PREFIXE_ORDER"))
var AUqbb=""
var rMdZV=new Date()
AUqbb+="wa-"+this.srLXH(rMdZV.getYear()-100)+this.srLXH(rMdZV.getMonth()+1)+this.srLXH(rMdZV.getDate())
AUqbb+=rMdZV.getHours()+this.srLXH(rMdZV.getMinutes())+this.srLXH(rMdZV.getSeconds())
AUqbb+="-"+Math.round(Math.random()*100) 
psEef+=this.sKtjL("ID_ORDER",AUqbb)
psEef+=this.sKtjL("CARD_TITLE",Translator.tr("PRINT_FORM_CARD_TITLE"))
psEef+=this.sKtjL("LABEL_TYPE_PAYMENT",Translator.tr("PRINT_FORM_LABEL_TYPE_PAYMENT"))
psEef+=this.sKtjL("send_copy_email_to_buyer",(OisVX.send_copy_email_to_buyer)?"1":"0") 

var Gaulu=new Array();
var iSFUR=rCQUx(CONST_WA_GLOBAL_SETTINGS.list_form_fields)
iSFUR.push("country")
iSFUR.push("state")
for(var i=0;i<iSFUR.length;i++)
{
var hHYBg=iSFUR[i];
Gaulu[hHYBg]=OisVX.nNgsu.cvCmL(hHYBg,gKVBn)
}
psEef+=this.sKtjL("form_first_name",Gaulu["firstname"]);
psEef+=this.sKtjL("form_last_name",Gaulu["lastname"]);
psEef+=this.sKtjL("form_address1",Gaulu["address_1"]);
psEef+=this.sKtjL("form_address2",Gaulu["address_2"]);
psEef+=this.sKtjL("form_city",Gaulu["address_2"]);
psEef+=this.sKtjL("form_zip",Gaulu["zip"]);
psEef+=this.sKtjL("form_state",Gaulu["state"]);
psEef+=this.sKtjL("form_country",Gaulu["country"]);
psEef+=this.sKtjL("form_company",Gaulu["company"]);
psEef+=this.sKtjL("form_fiscal_code",Gaulu["fiscal_code"]);
psEef+=this.sKtjL("form_tva",Gaulu["tva"]);
psEef+=this.sKtjL("form_phone",Gaulu["phone"]);
psEef+=this.sKtjL("form_fax",Gaulu["fax"]);
psEef+=this.sKtjL("CARD_TOTAL_PRICE",OisVX.Xbgqr());
psEef+=this.sKtjL("CARD_CURRENCY",CONST_WA_GLOBAL_SETTINGS.currency_code);
psEef+=this.sKtjL("CARD_LANG",Translator.m_lang);
psEef+=this.sKtjL("LABEL_PROCESS_ORDER",Translator.tr("PRINT_FORM_PROCESS_ORDER"));
psEef+=this.sKtjL("wa_promo_code",OisVX.nNgsu.kMJRD);
psEef+=this.sKtjL("email_buyer",this.jNpRG.cvCmL("email",gKVBn))
if(this.jNpRG.PRjTp=="custom")
{
psEef+=this.sKtjL("TYPE_PAYMENT",Translator.tr("PRINT_FORM_TYPE_CUSTOM"))
}
if(this.jNpRG.PRjTp=="check")
{
psEef+=this.sKtjL("TYPE_PAYMENT",Translator.tr("PRINT_FORM_TYPE_CHECK"))
psEef+=this.sKtjL("MESSAGE_CHECK",Translator.tr("PRINT_FORM_MESSAGE_CHECK"))
}
if(this.jNpRG.PRjTp=="wire")
{
psEef+=this.sKtjL("TYPE_PAYMENT",Translator.tr("PRINT_FORM_TYPE_WIRE"))
psEef+=this.sKtjL("MESSAGE_WIRE",Translator.tr("PRINT_FORM_MESSAGE_WIRE"))
}
if(this.jNpRG.PRjTp=="paypal")
{
psEef+=this.sKtjL("LABEL_PAYPAL_CART_TITLE",Translator.tr("PRINT_FORM_PAYPAL_CART_TITLE"));
psEef+=this.sKtjL("TYPE_PAYMENT","Paypal")
psEef+=this.sKtjL("MESSAGE_PAYPAL",Translator.tr("PRINT_FORM_MESSAGE_PAYPAL"))
}
psEef+=this.sKtjL("LABEL_PRINT",Translator.tr("PRINT_FORM_LABEL_PRINT"))
psEef+=this.sKtjL("card_html",this.MFpIK())
psEef+=this.sKtjL("card_plain_text",this.CqqvU())
psEef+=this.sKtjL("LABEL_SELLER_INFORMATION",Translator.tr("Seller information"))
psEef+=this.sKtjL("LABEL_BANK_ACCOUNT",Translator.tr("Bank account information"))
psEef+=this.sKtjL("LABEL_ADDRESS",Translator.tr("Address"))
psEef+=this.sKtjL("seller_address",CONST_WA_GLOBAL_SETTINGS.seller_address)
psEef+=this.sKtjL("bank_account_informations",CONST_WA_GLOBAL_SETTINGS.bank_account_informations)
psEef+=this.sKtjL("buyer_info_shipping",this.RZsuA())
var rPmfV=""
if(jNpRG.rAiet)
{
rPmfV=this.JnKqg();
};
psEef+=this.sKtjL("buyer_info_billing",rPmfV)
psEef+="</form>"
return psEef;
}
mVCRB.tuuLM=function()
{
var OisVX=vRpVs();
OisVX.cvmUn()
this.closeWin()
}
mVCRB.nBMMQ=function()
{
var OisVX=vRpVs();
var vhFiw=true;
if(this.jNpRG.PRjTp=="paypal")
if((OisVX.EEChQ==true)&&(CONST_WA_GLOBAL_SETTINGS.list_promo_codes==false))
{
vhFiw=true;
}
if((vhFiw==false)&&(this.jNpRG.PRjTp=="paypal"))
{
this.addButton(Translator.tr('Clear cart'),this.tuuLM,[""],this)
this.initializeWindow(400,200)
}
else
{
this.initializeWindow(400,150)
}
var psEef=""
if((vhFiw==false)&&(this.jNpRG.PRjTp=="paypal"))
{
psEef+=this.CeCIl()
}
if(vhFiw)
{
psEef+=this.OgLfC()
if((uprRL==false)&&(document.webaca_is_preview))
{
WA_Dialog.alert(Translator.tr("Operation not allowed in preview mode"))
return
}
}
psEef+="<table border=0 style='width:100%;'><tr>";
psEef+="<td align=center style='"+this.cssText1()+"'>"
psEef+=Translator.tr("You have been redirected to the payment page")
if((vhFiw==false)&&(this.jNpRG.PRjTp=="paypal"))
{
psEef+="<br><br>"
psEef+=Translator.tr("You can clear your cart")
}
psEef+="</td></tr></table>"
this.writeContent(psEef) 
if(VLbLP.charCodeAt(3)>=100)
{
WA_Dialog.alert(Translator.tr("This cariboost edition can't support ebusiness features !'"))
return;
}
var JaTWd=document.getElementById("wa-http-sender")
JaTWd.submit()
if(vhFiw)
{
OisVX.cvmUn()
}
}
mVCRB.jNpRG=jNpRG
mVCRB.nBMMQ()
}

-->
