<!--

waJSQuery.fn.outerScrollHeight=function(includeMargin){
var element=this[0];
var jElement=waJSQuery(element);
var totalHeight=element.scrollHeight;


totalHeight+=jElement.outerHeight(includeMargin)-jElement.innerHeight();
return totalHeight;
};
waJSQuery(window).load(function(){
initializeAllWA_dialog();
});
waJSQuery(window).resize(function()
{
WA_Dialog.resizeUI()
});
waJSQuery(window).scroll(function()
{
});
waJSQuery(window).keypress(function(e){
if(WA_Dialog.twCEc)
{
var osXFC=WA_Dialog.twCEc
osXFC.onCustomKeypress(e.which)
}
});
waJSQuery(window).keydown(function(e){
if(WA_Dialog.twCEc)
{
var osXFC=WA_Dialog.twCEc
osXFC.onkeydown(e.which)
}
});
function QePSA()
{
var jPCim=WA_GetCookie("wa-js-password");
var qUltr=waJSQuery("#is-password-form-layer")
if(qUltr.length>0)
{
var oemiN=qUltr.find("FORM")
var jjUTT=oemiN.find(".waInputPassword")
if(MD5("#"+jPCim+"#")==extractParamInfo(jjUTT,"crc"))
{
return false;
}
}
return true;
}
function UKUxT()
{
var qUltr=waJSQuery("#is-password-form-layer") 
if(QePSA()==false)
{
qUltr.hide()
waJSQuery("#is-global-layer").show()
initializeWA_JQuery()
return true
}
else
{
var oemiN=qUltr.find("FORM")
var jjUTT=oemiN.find(".waInputPassword")
jjUTT.focus()
}
return false
}
function initializeAllWA_dialog()
{
if(document.wa_page_under_construction)
{
var w=new WA_Dialog(false);
w.wpojY(Translator.tr("Page Under construction")+"<br><a href='index.html'>index.html</a>")
}
if(UKUxT()==false)
{
var qUltr=waJSQuery("#is-password-form-layer")
if(qUltr.length>0)
{
qUltr.show()
var oemiN=qUltr.find("FORM")
oemiN.submit(function()
{
var jjUTT=oemiN.find(".waInputPassword")
jPCim=jjUTT.val();
WA_SetCookie("wa-js-password",jPCim);
UKUxT()
return false;
})
}
}
}
function createWaButton(WPiGr)
{
var dBrBx={
x:0,y:0,position:"absolute",w:50,h:25,corner:4,shadow:false,label:"Texte",
fct:function(){alert('call function')},fct_obj:null,id:""}
if(WPiGr==undefined) WPiGr=new Array();
for(k in dBrBx)
{
if(WPiGr[k]==undefined) WPiGr[k]=dBrBx[k]
}
var BBkxp=WPiGr.label.replace(" ","&nbsp;")
var xpQZw=""
var BbHXk=CONST_WA_GLOBAL_SETTINGS.theme.buttons
var lWsrW=compliantColor(BbHXk.bg)
var eGgiw=compliantColor(BbHXk.bg)
var NpTbl=compliantColor(BbHXk.text)
var OxaPI=compliantColor(BbHXk.border)
var dchqU=compliantColor(BbHXk.bg_over)
var eGgiw_over=compliantColor(BbHXk.bg_over)
var JODYC=compliantColor(BbHXk.text_over)
var OxaPI_over=compliantColor(BbHXk.border_over)
var FpbjR="param[bord("+OxaPI_over+") inner_bord() bg("+dchqU+" "+eGgiw_over+") txt("+JODYC+") bg_img() img() ]"
var krJaI="param[grad(0 0 0 "+WPiGr.h+" "+lWsrW+" "+eGgiw+") bord("+OxaPI+") inborder() ]" 
xpQZw+="<div id='"+WPiGr.id+"' class=\"wa-button-link wa-js-action "+FpbjR+"\" style='position:"+WPiGr.position+";z-index:1000012;width:"+WPiGr.w+"px;height:"+WPiGr.h+"px;left:"+WPiGr.x+"px;top:"+WPiGr.y+"px;'>";
xpQZw+="<button class=\"wa-button "+krJaI+"\" style=\"position:static;top:0px;left:0px;background-color:red;margin:0px;padding:0px;spacing:0px;width:"+(WPiGr.w)+"px;height:"+(WPiGr.h)+"px;-moz-border-radius:"+WPiGr.corner+"px;border-radius:"+WPiGr.corner+"px "+WPiGr.corner+"px "+WPiGr.corner+"px "+WPiGr.corner+"px;";
if(WPiGr.shadow) xpQZw+="-webkit-box-shadow: 1px 1px 12px #555;-moz-box-shadow: 1px 1px 12px #555;box-shadow: 1px 1px 12px #555;"
xpQZw+="border:1px solid "+OxaPI+";";
xpQZw+="background:-webkit-gradient(linear,0 0, 0 "+WPiGr.h+",from("+lWsrW+"),to("+eGgiw+"));background:-moz-linear-gradient(top left 270deg,"+lWsrW+" 0px,"+eGgiw+" "+WPiGr.h+"px);text-align:center;color:"+NpTbl+";\" >"
xpQZw+="<div>";
xpQZw+="<a href='javascript:void(0)' class='wa-but-txt' style=\"position:relative;cursor:pointer;margin:0px;padding:0px;display:inline;vertical-align:middle;font-weight:normal;font-size:12px;color:"+NpTbl+";font-family:Arial;text-decoration:none;\">"+BBkxp+"</a>"
xpQZw+="</div>";
xpQZw+="</button>"
xpQZw+="</div>" 

return xpQZw
}
function activateWaButton(WPiGr)
{
var gIqbP=waJSQuery("#"+WPiGr.id)
if(gIqbP.length==0)
{
}
else
{
gIqbP.click(function(){WPiGr.fct.call(WPiGr.fct_obj,WPiGr.fct_params)})
gIqbP.css("cursor","pointer")
}
}
function WA_Dialog(hYlDX_close_button)
{
this.tKTAa=0;
this.YmMYO=0;
this.ixYTh_win_width=600;
this.FsqAJ=400;
this.XtlZo=200;
this.DixCf=new Array();
this.NXVIm="wa-dialog-but-";
this.MIQTm=this.NXVIm+"div-";
this.BUTTON_HEIGHT=22;
this.hYlDX_close_button=hYlDX_close_button;
this.qlFsP=""
this.oQPsN=16;
this.size=function()
{
return new Size(this.tKTAa,this.YmMYO)
}
this.setTitle=function(HMHHG)
{
this.qlFsP=HMHHG
}
this.marginContent=function()
{
return this.oQPsN;
}
this.fnTTB=function()
{
if(this.hYlDX_close_button==undefined)this.hYlDX_close_button=true;
this.gBnCo();
}
this.resetButtons=function()
{
this.gBnCo();
}
this.idealHeight=function()
{
return this.cxCli
}
this.displayWindowWithAutoResize=function(eRngj,tuISi)
{
this.otKcZ=false
this.cxCli=eRngj
this.AeumR=tuISi 
this.resetButtons();
tuISi.call(this)
var l=document.getElementById('wa-dialog-content');
if(this.otKcZ==false)
if(l.scrollHeight>200)
{
this.otKcZ=true
this.cxCli=l.scrollHeight+150
this.resetButtons();
tuISi.call(this)
}
waHackButtons()
waActivateOverButtons()
waGlobalPatchIE()
}
this.initializeWindow=function(ixYTh_lx,ixYTh_ly)
{
if(WA_Dialog.twCEc)WA_Dialog.twCEc.closeWin()
WA_Dialog.twCEc=this;
this.ixYTh_win_width=ixYTh_lx;
this.FsqAJ=ixYTh_ly;
this.XtlZo=ixYTh_ly
this.VvGrG()
}
this.progress=function()
{
this.initializeWindow(300,130)
this.writeContent("<div align=center style=''>"+htmlDynamicLoader(true)+"</div>")
waActivateDynamicLoader(waJSQuery("#wa-dialog-content"),true)
}
this.wpojY=function(mess)
{
this.initializeWindow(450,130)
var s=""
s+="<table border=0 style='width:100%;'><tr>";
s+="<td align=center>"
s+=mess
s+="</td></tr></table>"
this.writeContent(s)
}
this.addButton=function(BBkxp,lTZvg,TelYE,kfrJV)
{
var saCQP=this.DixCf.length
var fSIme=Math.max((BBkxp.length*8)*1.2+30,80)
var ZbLTP=new Size(fSIme,this.BUTTON_HEIGHT);
this.JfvNm("action_"+saCQP,saCQP,BBkxp,lTZvg,ZbLTP,TelYE,kfrJV)
}
this.gBnCo=function()
{
this.DixCf=new Array();
}
this.JfvNm=function(uXVjN,saCQP,BBkxp,lTZvg,ZbLTP,TelYE,kfrJV)
{
var HTCAR=[uXVjN,ZbLTP,saCQP,BBkxp,lTZvg,TelYE,kfrJV];
this.DixCf.push(HTCAR);
}
this.writeContent=function(s)
{
waJSQuery("#wa-dialog-content").html(s)
this.adjustHeight() 

}
this.adjustHeight=function()
{
var uIUfU=waJSQuery("#wa-dialog-content").outerScrollHeight()+120;

uIUfU=Math.max(uIUfU,150)
this.FsqAJ=uIUfU;
this.ptxRD()
}
this.CLZlb=function(uXVjN)
{
for(var faigv=0;faigv<this.DixCf.length;faigv++)
{
var HTCAR=this.DixCf[faigv];
if((HTCAR[0]==uXVjN)||(HTCAR[2]+""==uXVjN+""))
return HTCAR;
}
return undefined;
}
this.VBFDT=function(uXVjN)
{
var HTCAR=this.CLZlb(uXVjN);
return HTCAR[1]
}
this.ThcLs=function(vtxcH)
{
var HTCAR=this.CLZlb(vtxcH);
var ZbLTP=this.VBFDT(vtxcH)
var WPiGr={
id:this.MIQTm+HTCAR[0],fct:HTCAR[4],
fct_obj:HTCAR[5],fct_params:HTCAR[6],label:HTCAR[3],w:ZbLTP.width(),h:ZbLTP.height()
}

return WPiGr;
}
this.pMVDC=function(vtxcH)
{
return createWaButton(this.ThcLs(vtxcH));
}
this.qOknR=function(vtxcH)
{
return activateWaButton(this.ThcLs(vtxcH));
}
this.OCFHn=function(uXVjN)
{
var HTCAR=this.CLZlb(uXVjN)
if(HTCAR)
{
var ZluMR=this.MIQTm+HTCAR[0];
return waJSQuery("#"+ZluMR)
}
return undefined
}
this.VvGrG=function()
{
var l=waJSQuery('#wa-dialog-container');
l.show() 
var s="";
s+="<div class='wa-dialog-container-bg' style='position:absolute;left:0px;top:0px;' ></div>"
var pDbEG=document.webaca_banner_height
s+="<div id='wa-dialog-main' style='position:absolute;left:0px;top:"+pDbEG+"px;' >"
s+="<div style='position:absolute;left:0px;top:0px;width:100px;height:100px;' ></div>"
for(var SEHhk in this.DixCf)
{
s+=this.pMVDC(this.DixCf[SEHhk][2]);
}
if(this.hYlDX_close_button)
{
s+="<div id='wa-dialog-bt-close' class='wa-bt-close-style'>X</div>"
}
s+="<div id='wa-dialog-title' style='position:absolute;left:0px;top:0px;" 
s+=";' ></div>"
s+="<div id='wa-dialog-content' style='position:absolute;left:0px;top:0px;" 
if(isMSIE_lower_than_ie9()==false)
{
s+="overflow:auto;"
}
s+="' ></div>"
s+="</div>"
l.html(s);
for(var SEHhk in this.DixCf)
{
this.qOknR(this.DixCf[SEHhk][2]);
}
var rwYOr=this;
WA_exec_callback_opera_compliant(this,this.CqjCJ)
var dabOi=l.find(".wa-dialog-container-bg")
dabOi.click(function(){
rwYOr.closeWin()
});
waSetVisibilityMainPageContenair(false)
}
this.CqjCJ=function()
{
this.snFMn=waJSQuery(window).scrollTop() 
this.ptxRD()
var rwYOr=this;
var YdSqa=waJSQuery("#wa-dialog-bt-close")
YdSqa.html("<a id='wa-dialog-bt-close-inner' style='position: absolute; text-align: center; left: 24px; top: -16px; background: url(&quot;wa_closecross.png&quot;) no-repeat;width: 35px;height:35px;'></a>");
YdSqa.click(function(){
rwYOr.closeWin()
return false;
}) 


waHackButtons()
waActivateOverButtons()
}
this.intern_closeWin=function()
{
waJSQuery("#wa-dialog-container").hide()
waJSQuery("#wa-dialog-container").empty()
WA_Dialog.twCEc=false
waSetVisibilityMainPageContenair(true)
}
this.closeWin=function()
{
if(this.hYlDX_close_button!=true) return
this.intern_closeWin()
}
this.onCustomKeypress=function(avrhC)
{
if((this.DixCf.length==1)&&(avrhC==13))
{
this.closeWin()
return true;
}
return false;
}
this.onkeypress=function(avrhC)
{
return this.onCustomKeypress(avrhC)
}
this.onkeydown=function(avrhC)
{
if(avrhC==27)
{
if(this.hYlDX_close_button)
{
this.closeWin()
return true;
}
}
return this.onCustomKeypress(avrhC) 
}
this.customUpdate=function(){}
this.ptxRD=function()
{
var HMHHG=waJSQuery("#wa-dialog-title")
HMHHG.html("<div id='wa-dialog-title-inner' style='position:absolute;'>"+this.qlFsP+"</div>")
var VPmNi=document.webaca_width_page;
var XkSaJ=document.webaca_height_page;
var AJRes=getDocumentSize().width()
var kowcK=getDocumentSize().height()
var bljwt=getWindowSize().width()
var YINSW=getWindowSize().height() 

var jRKnj=550;
var NKEsP=400;
AJRes=Math.max(AJRes,jRKnj);
kowcK=Math.max(kowcK,NKEsP);
this.tKTAa=Math.min(AJRes*0.9,this.ixYTh_win_width) 
this.YmMYO=Math.max(this.XtlZo,this.FsqAJ)
var wwAal=waJSQuery(window).scrollTop()+(AJRes-this.tKTAa)/2 
var nZdrq=waJSQuery(window).scrollLeft()+(kowcK-this.YmMYO)/2
wwAal=(AJRes-this.tKTAa)/2
nZdrq=(kowcK-this.YmMYO)/2
wwAal=Math.max(0,wwAal)
nZdrq=Math.max(0,nZdrq) 
var ZBlIc=waJSQuery('#wa-dialog-main')
ZBlIc.css({left:wwAal,top:nZdrq,width:this.tKTAa,height:this.YmMYO})
var oQPsN=this.oQPsN;

var BZYGe=this.DixCf.length;
var PwOBc=10;
var udbhY=0;
for(var SEHhk=0;SEHhk<BZYGe;SEHhk++)
{
if(SEHhk>0) udbhY+=PwOBc;
var ZbLTP_but=this.VBFDT(SEHhk);
udbhY+=ZbLTP_but.width();
}
var xdLhD=(this.tKTAa-udbhY)/2
for(var SEHhk=0;SEHhk<BZYGe;SEHhk++)
{
if(SEHhk>0) xdLhD+=PwOBc;
var gIqbP_div=this.OCFHn(SEHhk);
var ZbLTP_but=this.VBFDT(SEHhk);
gIqbP_div.css({left:xdLhD,top:this.YmMYO-ZbLTP_but.height()-2*oQPsN})
xdLhD+=ZbLTP_but.width();
}
var XadSV=47;
var ZaHEA=this.BUTTON_HEIGHT+2*oQPsN;
if(BZYGe==0)
{
ZaHEA=0;
}
var opcqk=(this.YmMYO-XadSV-ZaHEA)-oQPsN
var thExZ=waJSQuery("#wa-dialog-content")
var aXOjt_content=Math.round(this.tKTAa-2*oQPsN)
var hWAAJ=Math.round(opcqk)
this.m_content_lx=aXOjt_content
this.m_content_ly=hWAAJ
thExZ.css({left:Math.round((this.tKTAa-aXOjt_content)/2),top:Math.round(XadSV+(opcqk-hWAAJ)/2),width:aXOjt_content,height:hWAAJ}) 
HMHHG.css({left:oQPsN,top:0,width:aXOjt_content,height:XadSV})
var LjSVf=waJSQuery("#wa-dialog-title-inner")
var WgPNe=(HMHHG.height()-LjSVf.height())/2;
LjSVf.css("top",WgPNe) 
var rwYOr=this;
var YdSqa=waJSQuery("#wa-dialog-bt-close") 
var cTwEf=waJSQuery("#wa-dialog-bt-close-inner") 
YdSqa.css({top:0,left:this.tKTAa-YdSqa.width(),cursor:"pointer"})
this.customUpdate() 

var FRrQR=waJSQuery("#wa-dialog-container") 
centerFullPageContainer();
}
this.fnTTB();
}

WA_Dialog.getCurrent=function()
{
return WA_Dialog.twCEc;
}
WA_Dialog.twCEc=false;
WA_Dialog.resizeUI=function()
{
if(WA_Dialog.twCEc)
{
var osXFC=WA_Dialog.twCEc
if(isAppleMobile()==false)
{
osXFC.ptxRD()
}
}
}
WA_Dialog.alert=function(s)
{
var w=new WA_Dialog();
w.setTitle(Translator.tr("Information"))
w.wpojY(s)
}
WA_Dialog.progress=function()
{
var w=new WA_Dialog(false);
w.progress()
}
function centerFullPageContainer()
{
var VPmNi=document.webaca_width_page;
var XkSaJ=document.webaca_height_page;
var FRrQR=waJSQuery('#wa-dialog-container');
var bljwt=waJSQuery(window).width()
var YINSW=waJSQuery(window).height()
var nZdrq_bg=waJSQuery(window).scrollTop();
var osXFC=WA_Dialog.getCurrent()
var CZvju=osXFC&&isAppleMobile();
if(CZvju)
{
}
var xLcRr=0;
var XYFGJ=waJSQuery("#wa-dialog-main") 
if((XYFGJ.length>0)&&(osXFC!=false))
{
var PUPHs=0;
var bIRHi=0;
if(XYFGJ.width()<=waJSQuery(window).width())
{
PUPHs=(waJSQuery(window).width()-XYFGJ.width())/2+waJSQuery(window).scrollLeft()
}
else
{
var xDialogCenter=(VPmNi-XYFGJ.width())/2
PUPHs=xDialogCenter
var x0=xDialogCenter+XYFGJ.width()/2-waJSQuery(window).width()
if(waJSQuery(window).scrollLeft()>x0+XYFGJ.width()/2)
{
var YXmQd=waJSQuery(window).scrollLeft()-x0
PUPHs+=YXmQd-XYFGJ.width()/2
}
if(waJSQuery(window).scrollLeft()<xDialogCenter)
{
var YXmQd=xDialogCenter-waJSQuery(window).scrollLeft()
PUPHs-=YXmQd
}
}
if(XYFGJ.height()<=waJSQuery(window).height())
{
bIRHi=(waJSQuery(window).height()-XYFGJ.height())/2+waJSQuery(window).scrollTop()
}
else
{
var yDialogCenter=(XkSaJ-XYFGJ.height())/2
bIRHi=yDialogCenter
var y0=yDialogCenter+XYFGJ.height()/2-waJSQuery(window).height()
if(waJSQuery(window).scrollTop()>y0+XYFGJ.height()/2)
{
var YXmQd=waJSQuery(window).scrollTop()-y0
bIRHi+=YXmQd-XYFGJ.height()/2
}
if(waJSQuery(window).scrollTop()<yDialogCenter)
{
var YXmQd=yDialogCenter-waJSQuery(window).scrollTop()
bIRHi-=YXmQd
}
bIRHi=osXFC.snFMn
bIRHi=Math.min(bIRHi,waJSQuery(window).scrollTop())
var LtlRi=(waJSQuery(window).scrollTop()+waJSQuery(window).height())-XYFGJ.height()
bIRHi=Math.max(bIRHi,LtlRi)
bIRHi+=10
}



{
XYFGJ.css({left:PUPHs,top:bIRHi})
}
}
var OTFCW=waJSQuery(window).width();
var NGNUv=waJSQuery(window).height();
if(OTFCW<VPmNi)
{
OTFCW=waJSQuery(document).width();
}
if(NGNUv<XkSaJ)
{
NGNUv=waJSQuery(document).height();
}
if((XYFGJ.length>0)&&(osXFC!=false))
{
FRrQR.css({left:0,top:0,width:OTFCW,height:NGNUv})
var dabOi=FRrQR.find(".wa-dialog-container-bg");

dabOi.css({left:0,top:0,width:OTFCW,height:NGNUv}) 
var kVveS=new RGBColor(CONST_WA_GLOBAL_SETTINGS.overlayColor)
dabOi.css({"backgroundColor":kVveS.toHexaOpaqueColor(),"opacity":kVveS.a})
FRrQR.show()
}
}

-->
