<!--
 
function DaDxj(c,p_x,p_y,lx,b_right)
{
var factor=lx/100;
var yAxe=Math.round(50*factor);
var x1=Math.round(80*factor);var y1=0*factor;var x2=Math.round(55*factor);var y2=Math.round(25*factor);
var x3=Math.round(47*factor);var y3=Math.round(17*factor);var x4=Math.round(60*factor);var y4=Math.round(5*factor);
var x5=Math.round(22*factor);var y5=y4;
if(b_right==false)
{
x1=lx-x1;x2=lx-x2;x3=lx-x3;x4=lx-x4;x5=lx-x5;
}
c.beginPath()
c.moveTo(p_x+x1,p_y+yAxe-y1);c.lineTo(p_x+x2,p_y+yAxe-y2);c.lineTo(p_x+x3,p_y+yAxe-y3);c.lineTo(p_x+x4,p_y+yAxe-y4);c.lineTo(p_x+x5,p_y+yAxe-y5);
c.lineTo(p_x+x5,p_y+yAxe+y5);c.lineTo(p_x+x4,p_y+yAxe+y4);
c.lineTo(p_x+x3,p_y+yAxe+y3);c.lineTo(p_x+x2,p_y+yAxe+y2);c.lineTo(p_x+x1,p_y+yAxe+y1);
c.fill()
}
function ehRtO(c,x,y,lx,size,epais)
{
x=Math.round(x+(lx-size)/2);y=Math.round(y+(lx-size)/2);c.fillRect(x,y+(size-epais)/2,size,epais);c.fillRect(x+(size-epais)/2,y,epais,size);
}
function DEKVX(c,x,y,lx,col)
{
var old_fill=c.fillStyle;
var size=16;x=Math.round(x+(lx-size)/2);y=Math.round(y+(lx-size)/2);var x2=9;
c.beginPath();c.moveTo(x+x2,y);c.lineTo(x+x2+6,y+7);c.lineTo(x+x2,y+14);c.fill();
var grad=c.createLinearGradient(x,y,x+8,y);
var HMCUY=new RGBColor(col)
HMCUY.a=0
grad.addColorStop(1,col);grad.addColorStop(0,HMCUY.toRGB());
c.fillStyle=grad;
c.beginPath();c.rect(x,y,8,14);c.fill()
c.fillStyle=old_fill
}
function LIatE(c,x,y,lx,col)
{
var old_fill=c.fillStyle;
var size=16;
x=Math.round(x+(lx-size)/2);
y=Math.round(y+(lx-size)/2);
c.fillStyle=col;
c.beginPath();
c.rect(x,y,size,size);
c.fill()
c.fillStyle=old_fill
}
function lMMtr(name,VJDEM,FgMYF)
{
var n=VJDEM.indexOf("%")
if(n>-1)
{
VJDEM=wa_evaluate(VJDEM.replace("%","/100"))
return Math.round(VJDEM*FgMYF)
}
VJDEM=parseFloat(VJDEM)
return Math.round(VJDEM)
}
function txZgX(bYATa,exRNc,nxlbf)
{
var x=lMMtr("x",bYATa.x,exRNc)
var y=lMMtr("y",bYATa.y,nxlbf)
if(bYATa.x.indexOf("%")==-1)exRNc=exRNc-x
if(bYATa.y.indexOf("%")==-1)nxlbf=nxlbf-y 

var lx=lMMtr("lx",bYATa.lx,exRNc)
var ly=lMMtr("ly",bYATa.ly,nxlbf)
return new Rect(x,y,lx,ly)
}
function WA_change_tool_button(ehAZP,WNIdM,over)
{
var rZmQp=RJlAc(ehAZP)
if(rZmQp&&rZmQp.BqEbY)
{
var aQiZk=rZmQp.BqEbY[WNIdM]
if(aQiZk)
{
aQiZk.tXdhx=over
aQiZk.draw()
}
}
}
function WA_toolbar_button(id,lx,ly,type,col,shadow)
{
var el=document.getElementById(id)
var c=el.getContext('2d');
c.clearRect(0,0,lx,ly) 
var current_col=col;
c.fillStyle=current_col;
if(type=="<")
{
DaDxj(c,0,0,lx,false)
}
if(type==">")
{
DaDxj(c,0,0,lx,true)
}
if(type=="down")
{
c.rotate(-Math.PI/2);c.translate(-lx,0);
DaDxj(c,0,0,lx,false)
c.translate(lx,0);c.rotate(Math.PI/2);
}
if(type=="up")
{
c.rotate(Math.PI/2);c.translate(0,-ly);
DaDxj(c,0,0,lx,false);
c.translate(0,ly);c.rotate(-Math.PI/2);
}
if(type=="+")
{
ehRtO(c,0,0,lx,12,4)
}
if(type=="diapo")
{
DEKVX(c,0,0,lx,current_col)
}
if(type=="stop")
{
LIatE(c,0,0,lx,current_col)
}
}
IHTKo.prototype=new Tween();
IHTKo.prototype.constructor=Tween;
IHTKo.superclass=Tween.prototype;
function IHTKo(obj,uOcaP,TYSBF,GMiGP,aDhqu)
{
this.targetObject=obj;
this.init(new Object(),'a',uOcaP,TYSBF,GMiGP,aDhqu);
this.onMotionChanged=function(evt)
{
var v=evt.target.getPosition();
var PDagn=this.targetObject;
v=Math.round(v*100)/100
PDagn.setOpacity(v/100);
}
}
function onMouseOnPreviewComment(ehAZP,WhidV,xDbcx)
{
var rZmQp=RJlAc(ehAZP)
var uHsOB=rZmQp.TQlkO_preview_obj 
var old=rZmQp.BTFHD
rZmQp.BTFHD=WhidV;
uHsOB.jmVYw=WhidV
if(rZmQp.BTFHD)
rZmQp.oxeTv=-1;

if(xDbcx)
wa_timeout(Delegate.create(uHsOB,uHsOB.NgXJi),200);
else
wa_timeout(Delegate.create(uHsOB,uHsOB.iptbS),200);
}
kBTLe.prototype=new Tween();
kBTLe.prototype.constructor=Tween;
kBTLe.superclass=Tween.prototype;
function kBTLe(obj,uOcaP,TYSBF,GMiGP,aDhqu)
{
this.targetObject=obj;
this.init(new Object(),'a',uOcaP,TYSBF,GMiGP,aDhqu);
this.onMotionChanged=function(evt)
{
var v=evt.target.getPosition();
var uHsOB=this.targetObject;
uHsOB.MoCRx=v
uHsOB.sVFJf()
}
this.onMotionFinished=function(evt)
{
var uHsOB=this.targetObject;
if(uHsOB.toikK==false)
{
uHsOB.ohwVx.setVisible(false)
html_SetVisibility(uHsOB.vTmOR,false)
}
uHsOB.setOverflow(uHsOB.jmVYw)
}
}
function IqeHh(ehAZP,vDvGa)
{
this.QmjAe=ehAZP
this.vDvGa=vDvGa
this.vTmOR=this.vDvGa+"comment-text-div"
this.jmVYw=false;
this.toikK=false;
this.MoCRx=0;
this.toHtml=function()
{
var HWdUD=""
this.ohwVx=new WA_GraphicElement(this.vDvGa+"-graphic-comment-bg",500,false)
this.ohwVx._objPreview=this
this.ohwVx.draw=function()
{
if(this._objPreview.toikK)
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,0,0,'',['rgba(0,0,0,0.6)'],this.shadow(),0,this.opacity())
}
}
HWdUD+=this.ohwVx.toHtml() 
HWdUD+="<div id='"+this.vTmOR+"' ";
HWdUD+="onmouseover=\"javascript:onMouseOnPreviewComment('"+this.QmjAe+"',true)\" ";
HWdUD+="onmouseout=\"javascript:onMouseOnPreviewComment('"+this.QmjAe+"',false)\" ";
HWdUD+=" style=\"font-family:Arial;font-size:13px;color:#ffffff;margin:2px;text-align:center;"
HWdUD+="overflow:auto;visibility:hidden;"
HWdUD+="position:absolute;"
HWdUD+="z-index:5250;"
HWdUD+="\">";
HWdUD+="</div>";
return HWdUD
}
this.CtgCL=function()
{
this.ohwVx.registerDynamicCanvas();
}
this.TKerp=function(xKtLd,uQYDA,exRNc,nxlbf)
{
this.kWDfS=new Rect(xKtLd,uQYDA,exRNc,nxlbf)
this.oDmNp(xKtLd,uQYDA,exRNc,nxlbf)
}
this.oDmNp=function(xKtLd,uQYDA,exRNc,nxlbf)
{
if(nxlbf<=0)
{
this.ohwVx.setVisible(false)
html_SetVisibility(this.vTmOR,false)
return;
}
this.ohwVx.setRect(xKtLd,uQYDA,exRNc,nxlbf)
html_SetGeometry(this.vTmOR,xKtLd,uQYDA,exRNc,nxlbf)
}
this.setOverflow=function(MHHNx)
{
var PDagn=html_getLayer(this.vTmOR)
var Ipfmc=((MHHNx)?"auto":"hidden")
PDagn.style.overflow=Ipfmc 
}
this.RGqpo=function()
{
this.YxJHU=true
clearTimeout(this.timerProgress)
this.timerProgress=wa_timeout(Delegate.create(this,this.IAOUC),300);
}
this.IAOUC=function()
{
if(this.YxJHU!=true)return;
this.YxJHU=false
this.OkxXv("chargement en cours...")
}
this.OkxXv=function(HWdUD)
{
this.wASCK=HWdUD
this.iRROQ(HWdUD)
}
this.YhmKh=function(HWdUD)
{
this.YxJHU=false
this.qaYSS=0;
this.toikK=true
this.iRROQ(HWdUD)
}
this.iRROQ=function(HWdUD)
{
this.wASCK=HWdUD
var bYATa=this.kWDfS 
if(!bYATa)return;
var PDagn=html_getLayer(this.vTmOR)
PDagn.style.overflow="hidden" 
this.oDmNp(bYATa.x,bYATa.y+bYATa.height-1,bYATa.width,1)
html_writeContent(this.vTmOR,this.wASCK)
if(isMSIE())
{
WA_exec_delayedCallback(this,this.JrnAG)
}
else
{
this.JrnAG()
}
}
this.JrnAG=function()
{
var bYATa=this.kWDfS
var PDagn=html_getLayer(this.vTmOR)
this.qaYSS=PDagn.scrollHeight+4;
this.qaYSS=Math.min(this.qaYSS,bYATa.height*0.8);
this.MoCRx=0
this.NgXJi()
}
this.sVFJf=function()
{
var HWdUD=this.wASCK;
var bYATa=this.kWDfS
var PDagn=html_getLayer(this.vTmOR)
var RBTQd=this.MoCRx
var nxlbf=RBTQd
this.oDmNp(bYATa.x,bYATa.y+bYATa.height-nxlbf,bYATa.width,nxlbf)
WA_exec_delayedCallback(this,this.lphZc)
}
this.NgXJi=function()
{
this.bwKlP(true)
}
this.iptbS=function()
{
this.bwKlP(false)
}
this.bwKlP=function(NICZe)
{
var bYATa=this.kWDfS
if(this.XCUnB)
{
this.XCUnB.stop()
this.XCUnB=false;
}
var HUjUt=Math.min(bYATa.height*0.2,this.qaYSS);
HUjUt=Math.min(40,HUjUt);
if((HUjUt<20)&&(this.qaYSS>HUjUt))
{
this.toikK=false
}
if(this.jmVYw)HUjUt=this.qaYSS
var EbaHP=this.MoCRx;
var hrvdk=HUjUt;
if(this.toikK==false)
{
EbaHP=this.MoCRx;
hrvdk=0;
}
if(NICZe)
{
this.setOverflow(false)
}
if(this.jmVYw!=true)
{
var PDagn=html_getLayer(this.vTmOR)
PDagn.scrollTop=0
}
this.XCUnB=new kBTLe(this,Tween.strongEaseOut,EbaHP,hrvdk,0.5)
this.XCUnB.start()
}
this.lphZc=function(MHHNx)
{
var toikK=this.toikK
if(MHHNx==false)
{


toikK=false;
}
this.ohwVx.setVisible(toikK)
html_SetVisibility(this.vTmOR,toikK) 
}
}
function WA_photoAlbumActionThumb(ehAZP,WNIdM,tuWfE)
{
var rZmQp=RJlAc(ehAZP)
if(rZmQp.hVslt()==false)return 
var YXAwh=rZmQp.qvZod;
var kRQWE_img=document.getElementById(YXAwh)
if(WNIdM==-1) WNIdM=0;
var FIehP=pafWh(ehAZP)[WNIdM]
var Mkvnp=rZmQp.cpwxm()
var ZSMAw=Mkvnp.border_size 
if(tuWfE!=true)
if(rZmQp.FZmdh==WNIdM)
{
return;
}
if(rZmQp.smxte) return;
rZmQp.smxte=true
var HUjUt_size=new Size(rZmQp.pHfrD_preview.width-2*ZSMAw,rZmQp.pHfrD_preview.height-2*ZSMAw)
var HUjUt_reso=rZmQp.dOAWH_layout.max_img_resolution
var src_folder=PeFMd(ehAZP)
var FgMYF=new Size(FIehP.size.w,FIehP.size.h)
FgMYF.scale(HUjUt_size)
if(HUjUt_reso>0)
{
var HUjUt_size_album=new Size(HUjUt_reso,HUjUt_reso)
FgMYF.scale(HUjUt_size_album)
}
var ibHKD=new Image();
if(isMSIE())
{
ibHKD=document.getElementById(rZmQp.bOUpK) 
ibHKD.width=FgMYF.width
ibHKD.height=FgMYF.height
}
rZmQp.rIVIn=ibHKD
ibHKD.Pvxlt=0.2
ibHKD.MHota=0.2
ibHKD.BdNKV_img=WNIdM
ibHKD.NNZpT=FIehP
ibHKD.TQlkO_preview_obj=rZmQp.TQlkO_preview_obj
ibHKD.IuRjd=rZmQp.IuRjd
ibHKD.lUGNx=Tween.strongEaseOut
ibHKD.kRQWE_img=kRQWE_img
ibHKD.gEoGm=document.getElementById(rZmQp.IuRjd.divId())
ibHKD.rZmQp=rZmQp 
ibHKD.WbcpG=FgMYF;
ibHKD.loaded=false;
ibHKD.onload=function()
{
ahJlh(this,this.kRQWE_img)
}
ibHKD.onerror=function()
{
VfrdE(this,false)
}
ibHKD.onabort=function()
{
VfrdE(this,false)
}
ibHKD.src=src_folder+"/"+FIehP.th+"?v="+FIehP.mod;

rZmQp.TQlkO_preview_obj.RGqpo()
}
function ahJlh(ibHKD_obj,kRQWE_img)
{
clearTimeout(ibHKD_obj.rZmQp.TQlkO_preview_obj.timerProgress) 
if(isMobileBrowser())
{
var rZmQp=ibHKD_obj.rZmQp
rZmQp.FZmdh=ibHKD_obj.BdNKV_img
ibHKD_obj.IuRjd.setOpacity(1);
html_SetOpacity(ibHKD_obj.kRQWE_img,1)
oGCmu(ibHKD_obj)
VfrdE(ibHKD_obj,true)
return;
}
var GVIMj=new IHTKo(ibHKD_obj.IuRjd,ibHKD_obj.lUGNx,100,0,ibHKD_obj.Pvxlt);
GVIMj.ibHKD_obj=ibHKD_obj
GVIMj.kRQWE_img=kRQWE_img
GVIMj.onMotionFinished=RPWmX
var nAsel=new OpacityTween(kRQWE_img,ibHKD_obj.lUGNx,100,0,ibHKD_obj.Pvxlt);
nAsel.ibHKD_obj=ibHKD_obj
nAsel.kRQWE_img=kRQWE_img
GVIMj.start()
nAsel.start()
}
function RPWmX()
{
var ibHKD_obj=this.ibHKD_obj 
var WNIdM=ibHKD_obj.BdNKV_img
var rZmQp=ibHKD_obj.rZmQp
rZmQp.FZmdh=WNIdM
var kRQWE_img=ibHKD_obj.kRQWE_img 
kRQWE_img.ibHKD_obj=ibHKD_obj
oGCmu(ibHKD_obj)
kRQWE_img.onload=function()
{
var ibHKD_obj=this.ibHKD_obj
var kRQWE_img=ibHKD_obj.kRQWE_img
var JrZHJ=new IHTKo(ibHKD_obj.IuRjd,ibHKD_obj.lUGNx,0,100,ibHKD_obj.MHota);
JrZHJ.ibHKD_obj=ibHKD_obj
JrZHJ.kRQWE_img=kRQWE_img
JrZHJ.onMotionFinished=cCwMP
var ApwYS=new OpacityTween(kRQWE_img,ibHKD_obj.lUGNx,0,100,ibHKD_obj.MHota);
ApwYS.ibHKD_obj=ibHKD_obj
ApwYS.kRQWE_img=kRQWE_img
ApwYS.start()
JrZHJ.start()
}
}
function cCwMP()
{
VfrdE(this.ibHKD_obj,true)
}
function VfrdE(ibHKD_obj,lKxMY)
{
var WNIdM=ibHKD_obj.BdNKV_img
var rZmQp=ibHKD_obj.rZmQp
rZmQp.smxte=false;
var WNIdM=rZmQp.FZmdh 
{
rZmQp.EArab=Math.floor(WNIdM/(rZmQp.QpwAX_cols*rZmQp.QpwAX_rows))
gwZMv(rZmQp.ehAZP)
}
rZmQp.kZdRP()
rZmQp.MuuKM()
var TQlkO=rZmQp.ENHSD()
if(TQlkO.length==0)
{
rZmQp.TQlkO_preview_obj.lphZc(false)
}
rZmQp.BcniO()
}
function oGCmu(ibHKD_obj)
{
var kRQWE_img=ibHKD_obj.kRQWE_img
var rZmQp=ibHKD_obj.rZmQp
var FgMYF=ibHKD_obj.WbcpG
rZmQp.jhRTX.width=FgMYF.width
rZmQp.jhRTX.height=FgMYF.height
kRQWE_img.width=FgMYF.width;
kRQWE_img.height=FgMYF.height;
kRQWE_img.src=ibHKD_obj.src;
kRQWE_img.rZmQp=rZmQp
kRQWE_img.FgMYF=FgMYF 
rZmQp.BcniO()
var TQlkO=rZmQp.ENHSD()
if(TQlkO.length>0)
{
rZmQp.acCEk()
rZmQp.TQlkO_preview_obj.YhmKh(TQlkO)
}
else
{
rZmQp.TQlkO_preview_obj.lphZc(false);
}
}
function WA_photoAlbumChangeImageSize(kRQWE_img,FgMYF,YDdpW)
{
var dec=3
kRQWE_img.width=FgMYF
kRQWE_img.height=FgMYF
kRQWE_img.style.borderWidth=YDdpW
}
function WA_photoAlbumThumbOver(kRQWE,ehAZP,WNIdM)
{
var rZmQp=RJlAc(ehAZP)
var FIehP_def=pafWh(ehAZP)[WNIdM]
var YXAwh=rZmQp.TKWKq(WNIdM)
var kRQWE_img=document.getElementById(YXAwh)
kRQWE.rZmQp=rZmQp;
kRQWE.kRQWE_img=kRQWE_img
var dec=2
WA_photoAlbumChangeImageSize(kRQWE_img,rZmQp.uJMqs-2*dec,rZmQp.JuoXl_thumbnail+dec)
}
function WA_photoAlbumThumbOut(kRQWE)
{
var kRQWE_img=kRQWE.kRQWE_img;
var rZmQp=kRQWE.rZmQp
WA_photoAlbumChangeImageSize(kRQWE_img,rZmQp.uJMqs,rZmQp.JuoXl_thumbnail)
}
function vsgaJ(ehAZP,SRcCt)
{
this.ehAZP=ehAZP;
this.wbRUJ=25;
this.XZAVj=SRcCt;
this.uiSsr="photo-album-toolbar-"+this.ehAZP
this.cNNaS=("photo-album-scroll-content"+this.ehAZP)
this.pHfrD_selector_slider=null;
this.YedvE=null;
this.pHfrD_preview=null;
this.QpwAX_cols=0;
this.QpwAX_rows=0;
this.pYYNC=new Array()
this.EArab=0;
this.QpwAX_pages=1
this.gUbXo=true;
this.GxxZL=false
this.uVKUA=40
this.jhRTX=new Size(0,0)
this.BYiNS=false;
this.oxeTv=-1;
this.FZmdh=-1;
this.QpwAX_images=this.XZAVj.def.length
this.CDCCu=false;
this.PWqBx=new Rect(0,0,100,100)
this.dOAWH_layout=DSknA(this.ehAZP)
var dOAWH=this.dOAWH_layout
if(dOAWH.diaporama&&(dOAWH.diaporama.startup))this.CDCCu=true;
this.Rwlow=false;
this.dOAWH_previewZone=false;
this.dZjIE=0;
this.rsNfW=function()
{
if(this==this.XZAVj.album_object) return true;
return false;
}
this.vDvGa=function()
{
return this.ehAZP+this.dZjIE
}
this.acCEk=function()
{
var rZmQp=this
var FgMYF=new Size(rZmQp.jhRTX.width,rZmQp.jhRTX.height)
var Mkvnp=rZmQp.cpwxm()
var oMwaE=new RGBColor(Mkvnp.border_col)
var ZSMAw=Mkvnp.border_size
if(oMwaE.a==0) ZSMAw=0;
var lHHQP=rZmQp.pHfrD_preview 
var x0=Math.round((lHHQP.width-(FgMYF.width+2*ZSMAw))/2)
var y0=Math.round((lHHQP.height-(FgMYF.height+2*ZSMAw))/2) 

rZmQp.TQlkO_preview_obj.TKerp(x0+ZSMAw,y0+ZSMAw,FgMYF.width,FgMYF.height);

}
this.BcniO=function()
{
var rZmQp=this
var FgMYF=new Size(rZmQp.jhRTX.width,rZmQp.jhRTX.height)
var Mkvnp=rZmQp.cpwxm()
var oMwaE=new RGBColor(Mkvnp.border_col)
var ZSMAw=Mkvnp.border_size
if(oMwaE.a==0) ZSMAw=0;
var lHHQP=rZmQp.pHfrD_preview 
var x0=Math.round((lHHQP.width-(FgMYF.width+2*ZSMAw))/2)
var y0=Math.round((lHHQP.height-(FgMYF.height+2*ZSMAw))/2)
rZmQp.IuRjd.setRect(x0,y0,FgMYF.width+2*ZSMAw,FgMYF.height+2*ZSMAw) 
var gjvLW=document.getElementById(rZmQp.gjvLW_preview_id)
html_SetPosition(gjvLW,ZSMAw+x0,ZSMAw+y0)
}
this.ENHSD=function()
{
var ibHKD_obj=this.rIVIn
var npjee=this.dOAWH_layout
var TQlkO=""
var url=ibHKD_obj.NNZpT.url
if(npjee.disp_comment)
{
if(npjee.disp_comment_img_number)
TQlkO+="<b>"+(ibHKD_obj.BdNKV_img+1)+"/"+this.QpwAX_images+"</b>"
if(npjee.disp_comment_img_fn)
{
if(TQlkO.length>0)TQlkO+="<br>"
TQlkO+="("+ibHKD_obj.NNZpT.fn+")"
}
if(ibHKD_obj.NNZpT.comment.length>0)
{
if(TQlkO.length>0)TQlkO+="<br>"
TQlkO+=ibHKD_obj.NNZpT.comment
}
if(url.length>0)
{
if(TQlkO.length>0)TQlkO+="<br>"
TQlkO+="<br><a href='"+url+"' target=_blank "
TQlkO+="style='color:#0000ff;' "
var vFsqK=this.TQlkO_preview_obj.QmjAe
TQlkO+="onmouseover=\"javascript:_onMouseOnPreviewComment('"+vFsqK+"',true)\" ";
TQlkO+=">";
TQlkO+="@ link"
TQlkO+="</a><br><br>"
}
}
return TQlkO;
}
this.dwGIW=function()
{
var dOAWH=DSknA(ehAZP)
var FqYvT=this.vjXST();
this.GxxZL=FqYvT.nav_has_horz_flow
if(this.GxxZL==false)
{
this.pYYNC.push("up")
this.pYYNC.push("down")
}
else
{
this.pYYNC.push("<")
this.pYYNC.push(">")
}
if(this.CZXtv())
{
this.pYYNC.push("+")
}
else
if(this.sVane())
{
this.pYYNC.push("-")
}
if(dOAWH.diaporama)
{
this.pYYNC.push("diapo")
}
if((FqYvT.nav_but_orient==5)||(FqYvT.nav_but_orient==3))
{
this.gUbXo=false;
}
var canvas_bg=""
this.MxwAm=new WA_GraphicElement(this.vDvGa()+"-graphic-selector-bg",50,FqYvT.bg_shadow)
this.MxwAm.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,1,FqYvT.bg_border_col,[FqYvT.bg_col],FqYvT.bg_shadow,0)
}
canvas_bg+=this.MxwAm.toHtml() 
this.ohwVx_toolbar=new WA_GraphicElement(this.vDvGa()+"-graphic-toolbar-bg",50,FqYvT.bg_shadow)
this.ohwVx_toolbar.gUbXo=this.gUbXo 
this.ohwVx_toolbar.draw=function()
{
var IvNdJ_toolbar=false;
if(this.gUbXo)
{
IvNdJ_toolbar=XvnMJ(0,0,0,this.rect().height/2,FqYvT.toolbar_bg_col1,FqYvT.toolbar_bg_col2)
}
else
{
IvNdJ_toolbar=XvnMJ(0,0,this.rect().width/2,0,FqYvT.toolbar_bg_col1,FqYvT.toolbar_bg_col2)
}
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,1,FqYvT.toolbar_border_col,[IvNdJ_toolbar],FqYvT.toolbar_shadow,0)
}
canvas_bg+=this.ohwVx_toolbar.toHtml() 
this.BqEbY=new Array()
this.BqEbY_by_action=new Array()
for(var n=0;n<this.pYYNC.length;n++)
{
var n_action=this.pYYNC[n]
var aQiZk=new WA_GraphicElement(this.vDvGa()+"-graphic-toolbar-but"+n,70,false)
aQiZk.n_action=n_action
aQiZk.rZmQp=this
aQiZk.tXdhx=false
aQiZk.wbRUJ=this.wbRUJ
aQiZk.CDJEq=FqYvT.toolbar_but_col1
aQiZk.wcaQF=FqYvT.toolbar_but_col2
aQiZk.draw=function()
{
var dCvWF=this.wbRUJ
var dgNZQ=this.n_action
if(dgNZQ=="diapo")
{
if(this.rZmQp.mvATB())dgNZQ="stop"
}
var csYTu=(this.tXdhx)?this.wcaQF:this.CDJEq
WA_toolbar_button(this.canvasId(),dCvWF,dCvWF,dgNZQ,csYTu,true)
}
this.BqEbY.push(aQiZk)
var pksHN_action=n_action
if(pksHN_action=="up")pksHN_action="<"
if(pksHN_action=="down")pksHN_action=">"
this.BqEbY_by_action[pksHN_action]=aQiZk
canvas_bg+="<div id='"+aQiZk.divId()+"-href' onclick=\"javascript:WA_photoAlbumAction('"+this.ehAZP+"',"+n+")\" ";
canvas_bg+="style=\""
canvas_bg+="position:absolute;"
canvas_bg+="z-index:1000;"
canvas_bg+="cursor:pointer;"
canvas_bg+="\" "
canvas_bg+="onmouseover=\"";
canvas_bg+="WA_change_tool_button('"+this.ehAZP+"',"+n+",true)";
canvas_bg+="\" ";
canvas_bg+="onmouseout=\"";
canvas_bg+="WA_change_tool_button('"+this.ehAZP+"',"+n+",false)";
canvas_bg+="\" ";
canvas_bg+=">";
canvas_bg+="</div>";
canvas_bg+=aQiZk.toHtml()
}
canvas_bg+="<div id='"+this.cNNaS+"' style=\"";
canvas_bg+="position:absolute;z-index:100;";
canvas_bg+="overflow:hidden;";
canvas_bg+="\"></div>";
return canvas_bg;
}
this.HtnWr=function()
{
var FqYvT=this.vjXST();
var r1_rect=this.pHfrD_selector_slider;
var HWdUD="" 
var min_size=Math.min(r1_rect.width,r1_rect.height)
var size_thumb=FqYvT.th_size.size;
if(FqYvT.th_size.percent) size_thumb=Math.round(size_thumb*(min_size)/100);
var image_spacing=Math.max(0,Math.round((FqYvT.th_spacing/100)*size_thumb))
image_spacing=Math.round(image_spacing/2)*2
var nb_cols_real=r1_rect.width/(size_thumb+image_spacing);
var nb_cols=Math.floor(nb_cols_real);
this.QpwAX_cols=Math.max(1,nb_cols);
var nb_rows_real=r1_rect.height/(size_thumb+image_spacing);
var nb_rows=Math.floor(nb_rows_real);
this.QpwAX_rows=Math.max(1,nb_rows);
var size_border_thumbnail=Math.max(1,Math.round((size_thumb)*0.03));
size_thumb-=2*size_border_thumbnail
var nb_images=this.QpwAX_images
var nb_pages=(nb_images/(this.QpwAX_cols*this.QpwAX_rows));
if(nb_pages>Math.floor(nb_pages)) nb_pages=Math.floor(nb_pages)+1;
this.QpwAX_pages=nb_pages
this.uJMqs=size_thumb;
this.iQlCi=image_spacing;
this.JuoXl_thumbnail=size_border_thumbnail
var n_image=0;
var nb_item_x=this.QpwAX_cols*nb_pages
var nb_item_y=this.QpwAX_rows;
var nb_item_per_page=this.QpwAX_cols*this.QpwAX_rows 
if(this.GxxZL==false)
{
nb_item_x=this.QpwAX_cols
nb_item_y=this.QpwAX_rows*nb_pages;
}
HWdUD+="<table border=0 cellpadding=0 cellspacing=0 width=100% height=100% >";
HWdUD+="<tr>"
HWdUD+="<td "
if((this.GxxZL==false)||(this.QpwAX_pages==1))
{
HWdUD+="align=center"
}
HWdUD+=">" 
HWdUD+="<table border=0 cellpadding="+(image_spacing/2)+" cellspacing=0  width=10px>";
for(var uQYDA=0;uQYDA<nb_item_y;uQYDA++)
{
HWdUD+="<tr>" 
for(var xKtLd=0;xKtLd<nb_item_x;xKtLd++)
{
HWdUD+="<td>"
var ind_img=0;
var nx_0=Math.floor(xKtLd/this.QpwAX_cols)
var diff0=xKtLd-nx_0*this.QpwAX_cols;
ind_img=nx_0*nb_item_per_page+(uQYDA*this.QpwAX_cols)+diff0
if(ind_img<nb_images)
{
var FIehP=this.XZAVj.def[ind_img]
var DfoWh=this.XZAVj.src_folder+"/th_"+FIehP.th+"?v="+FIehP.mod_th
HWdUD+="<a href=\"";
if(this.hVslt())
{
HWdUD+="javascript:WA_photoAlbumActionThumb('"+ehAZP+"',"+ind_img+")"
}
else
{
HWdUD+="javascript:WA_photoAlbumIncrease('"+ehAZP+"',"+ind_img+")"
}
HWdUD+="\" "
HWdUD+="onmouseover=\"WA_photoAlbumThumbOver(this,'"+ehAZP+"',"+ind_img+")\" "
HWdUD+="onmouseout=\"WA_photoAlbumThumbOut(this)\" "
HWdUD+=">"
HWdUD+="<img id='"+this.TKWKq(ind_img)+"' width="+size_thumb+"px height="+size_thumb+"px src='"+DfoWh+"' ";
HWdUD+="style='";
if(size_border_thumbnail>0)
{
HWdUD+="border-color:"+FqYvT.selector_img_border_color+";";
HWdUD+="border-width:"+size_border_thumbnail+"px;border-style:solid;";
}
HWdUD+="' ";
HWdUD+=">"
HWdUD+="</a>"
n_image++;
}
HWdUD+="</td>"
}
if(this.gUbXo)
if(this.QpwAX_pages>1)
{
for(var xKtLd=0;xKtLd<this.QpwAX_cols;xKtLd++)
{
var pErPK=size_thumb+2*size_border_thumbnail
HWdUD+="<td>"
HWdUD+="<div  style='width:"+(pErPK)+"px;height:"+pErPK+"px;'></div>";
HWdUD+="</td>"
}
}
HWdUD+="</tr>"
}
if(this.gUbXo==false)
if(this.QpwAX_pages>1)
{
for(var uQYDA=0;uQYDA<this.QpwAX_rows;uQYDA++)
{
HWdUD+="<tr>"
var pErPK=size_thumb+2*size_border_thumbnail
HWdUD+="<td colspan="+this.QpwAX_cols+">"
HWdUD+="<div  style='width:"+(pErPK)+"px;height:"+pErPK+"px;'></div>";
HWdUD+="</td>"
HWdUD+="</tr>"
}
}
HWdUD+="</table>" 
HWdUD+="</td>"
HWdUD+="</tr>"
HWdUD+="</table>"
return HWdUD;
}
this.TKWKq=function(WNIdM)
{
return this.vDvGa()+"-th-img"+WNIdM
}
this.UhmKh=function()
{
var Mkvnp=this.cpwxm();
if(Mkvnp==false) return;
var FIehP=this.XZAVj.def[0]
this.qvZod="photo-album-preview-img-"+this.vDvGa()
this.bOUpK=this.qvZod+"-cache"
this.gjvLW_preview_id="photo-album-preview-img-div"+this.vDvGa()
this.WQChw="photo-album-preview-zone"+this.vDvGa()
var HWdUD=""
HWdUD+="<div  id='"+this.WQChw+"' style=\"";
HWdUD+="position:absolute;z-index:500;";
HWdUD+="\" ";
HWdUD+="onclick=\"WA_clickAlbumPreview('"+this.ehAZP+"')\" ";
HWdUD+="onmousemove=\"javascript:WA_mousemoveAlbumPreview(event,'"+this.ehAZP+"')\" ";
HWdUD+="onmouseout=\"javascript:WA_mouseoutAlbumPreview(event,'"+this.ehAZP+"')\" ";
HWdUD+=">";
HWdUD+="<div style='position:absolute;z-index:450;left:0px;top:0px;";
HWdUD+="width:100%;height:100%;background-color:#000000;";
HWdUD+="filter:alpha(opacity=0);-moz-opacity:0;opacity:0;' "
HWdUD+="></div>"
this.TQlkO_preview_obj=new IqeHh(this.ehAZP,this.vDvGa());
HWdUD+=this.TQlkO_preview_obj.toHtml() 
this.IuRjd=new WA_GraphicElement(this.vDvGa()+"-graphic-img-bg",50,Mkvnp.shadow)
this.IuRjd.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,0,'',[Mkvnp.border_col],this.shadow(),0,this.opacity())
}
HWdUD+=this.IuRjd.toHtml() 
HWdUD+="<div id='"+this.gjvLW_preview_id+"' style=\"";
HWdUD+="position:absolute;z-index:100;";
HWdUD+="left:0px;";
HWdUD+="top:0px;";
HWdUD+="\" ";
HWdUD+=">";
HWdUD+="<img  id='"+this.qvZod+"' border=0 >";
if(isMSIE())
{
HWdUD+="<img style='position:absolute;left:0px;top:0px;visibility:hidden;' id='"+this.bOUpK+"'>"
}
else
{
HWdUD+="<img style='position:absolute;left:0px;top:0px;display:none;' id='"+this.bOUpK+"'>"
}
HWdUD+="</div>";
this.MdQQQ=new WA_GraphicElement(this.vDvGa()+"-graphic-arrow0",300,true)
this.MdQQQ.setImage("intuisphere.png",new Rect(97,49,46,47))
this.MdQQQ.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,0,'',["#ffffff"],this.shadow(),0,this.opacity(),true)
var exRNc=Math.round(this.rect().width*0.8);
var nxlbf=Math.round(this.rect().height*0.8);
WA_drawImage(this.canvasId(),this.img_src(),6+(this.rect().width-exRNc)/2,6+(this.rect().height-nxlbf)/2,exRNc,nxlbf,this.img_clip(),this.opacity(),false)
}
this.aUDVh=new WA_GraphicElement(this.vDvGa()+"-graphic-arrow1",300,true)
this.aUDVh.setImage("intuisphere.png",new Rect(2,49,46,47))
this.aUDVh.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,0,'',["#ffffff"],this.shadow(),0,this.opacity(),true)
var exRNc=Math.round(this.rect().width*0.8);
var nxlbf=Math.round(this.rect().height*0.8);
WA_drawImage(this.canvasId(),this.img_src(),6+(this.rect().width-exRNc)/2,6+(this.rect().height-nxlbf)/2,exRNc,nxlbf,this.img_clip(),this.opacity(),false)
}
HWdUD+=this.MdQQQ.toHtml()
HWdUD+=this.aUDVh.toHtml() 
this.ilKFh=new WA_GraphicElement(this.vDvGa()+"-graphic-cursor-zoom",400,false)
this.ilKFh.setSize(30,30)
this.ilKFh.setImage("intuisphere.png",new Rect(0,0,48,48))
this.ilKFh.draw=function()
{
WA_drawImage(this.canvasId(),this.img_src(),0,0,this.rect().width,this.rect().height,this.img_clip())
}
HWdUD+=this.ilKFh.toHtml() 
HWdUD+="</div>";
return HWdUD;
}
this.CtgCL=function()
{
if(this.iTPXw())
{
this.MxwAm.registerDynamicCanvas();
this.ohwVx_toolbar.registerDynamicCanvas();
for(var n=0;n<this.BqEbY.length;n++)
{
var aQiZk=this.BqEbY[n]
aQiZk.registerDynamicCanvas();
}
}
if(this.hVslt())
{
this.TQlkO_preview_obj.CtgCL()
this.IuRjd.registerDynamicCanvas();
this.MdQQQ.registerDynamicCanvas();
this.aUDVh.registerDynamicCanvas();
this.ilKFh.registerDynamicCanvas();
this.ilKFh.setVisible(false)
}
if(this.ohwVx_global)
this.ohwVx_global.registerDynamicCanvas();
this.XDthM()
}
this.mvATB=function()
{
return(this.xvSMJ)?true:false;
}
this.KtPnn=function()
{
return(this.EArab>0)
}
this.bCZsC=function()
{
return(this.EArab<this.QpwAX_pages-1)
}
this.odwwP=function()
{
return(this.FZmdh>0);
}
this.ZvFBo=function()
{
return(this.FZmdh<this.XZAVj.def.length-1);
}
this.GIVPJ=function()
{
if(this.iTPXw())
{
var FqYvT=this.vjXST() 
var exRNc=this.PWqBx.width
var nxlbf=this.PWqBx.height
var r0=FqYvT.rect
var r0_rect=txZgX(r0,exRNc,nxlbf)
r0_rect.x+=this.PWqBx.x
r0_rect.y+=this.PWqBx.y
var r1_rect=r0_rect.clone() 
var hgmFc_toolbar=r0_rect.clone()
var QpwAX_buttons=this.pYYNC.length 
var NcmYt=5
var FYTUo=this.wbRUJ+NcmYt*2
var eDOug=(QpwAX_buttons*this.wbRUJ)
if(FqYvT.nav_but_orient==1)
{
r1_rect.y+=FYTUo;
r1_rect.height-=FYTUo;
hgmFc_toolbar.x=hgmFc_toolbar.x+(hgmFc_toolbar.width-eDOug)/2;
hgmFc_toolbar.width=eDOug
hgmFc_toolbar.y+=NcmYt;
hgmFc_toolbar.height=this.wbRUJ;
}
if(FqYvT.nav_but_orient==5)
{
r1_rect.width-=FYTUo;
hgmFc_toolbar.y=hgmFc_toolbar.y+(hgmFc_toolbar.height-eDOug)/2;
hgmFc_toolbar.height=eDOug
hgmFc_toolbar.x+=r1_rect.width+NcmYt;
hgmFc_toolbar.width=this.wbRUJ;
}
if(FqYvT.nav_but_orient==7)
{
r1_rect.height-=FYTUo;
hgmFc_toolbar.x=hgmFc_toolbar.x+(hgmFc_toolbar.width-eDOug)/2;
hgmFc_toolbar.width=eDOug
hgmFc_toolbar.y+=r1_rect.height+NcmYt;
hgmFc_toolbar.height=this.wbRUJ;
}
if(FqYvT.nav_but_orient==3)
{
r1_rect.width-=FYTUo;
r1_rect.x+=FYTUo;
hgmFc_toolbar.y=hgmFc_toolbar.y+(hgmFc_toolbar.height-eDOug)/2;
hgmFc_toolbar.height=eDOug
hgmFc_toolbar.x+=NcmYt;
hgmFc_toolbar.width=this.wbRUJ;
}
this.pHfrD_selector_slider=r1_rect
this.YedvE=hgmFc_toolbar 
var weBrH=this.pHfrD_selector_slider;
this.MxwAm.setRect(weBrH.x,weBrH.y,weBrH.width,weBrH.height)
html_SetRect(this.cNNaS,r1_rect) 
var hgmFc=this.YedvE
this.ohwVx_toolbar.setRect(hgmFc.x,hgmFc.y,hgmFc.width,hgmFc.height)
var lx_button=this.wbRUJ
var ly_button=lx_button
var EWAqP=hgmFc_toolbar.x
var uQYDA_but0=hgmFc_toolbar.y
for(var n=0;n<this.BqEbY.length;n++)
{
var aQiZk=this.BqEbY[n]
var mVlpN=EWAqP
var uQYDA_but=uQYDA_but0
if(this.gUbXo)
{
mVlpN+=n*lx_button;
}
else
{
uQYDA_but+=n*ly_button;
}
aQiZk.setRect(mVlpN,uQYDA_but,lx_button,ly_button)
html_SetGeometry(aQiZk.divId()+"-href",mVlpN,uQYDA_but,lx_button,ly_button)
}
var kRQWE_selector=document.getElementById(this.cNNaS)
if(kRQWE_selector)
{
kRQWE_selector.innerHTML=this.HtnWr();
}
this.MuuKM()
}
}
this.CZXtv=function()
{
if((this.dZjIE==1)&&(this.iTPXw()==true)) return true;
if((this.dZjIE==0)&&(this.dOAWH_layout.has_full_page_config)) return true;
return false;
}
this.sVane=function()
{
if(this.dZjIE==1) return true;
if(this.dZjIE==2) return true;
return false;
}
this.STrRc=function()
{
return this.CDCCu;
}
this.vjXST=function()
{
return this.Rwlow;
}
this.cpwxm=function()
{
return this.dOAWH_previewZone;
}
this.iTPXw=function()
{
if(this.vjXST()) return true;
return false;
}
this.hVslt=function()
{
if(this.cpwxm()) return true;
return false;
}
this.MuuKM=function()
{
if(this.iTPXw()==false)return
var LiPlN=this.BqEbY_by_action["<"]
LiPlN.setVisible(this.KtPnn())
var gFxWA=this.BqEbY_by_action[">"]
gFxWA.setVisible(this.bCZsC())
}
this.kZdRP=function()
{
var Mkvnp=this.cpwxm();
var exRNc=this.PWqBx.width
var nxlbf=this.PWqBx.height
var weBrH=Mkvnp.rect
var weBrH_rect=txZgX(weBrH,exRNc,nxlbf)
if(this.dZjIE==2)
{
weBrH_rect=new Rect(0,0,exRNc,nxlbf)
}
weBrH_rect.x+=this.PWqBx.x
weBrH_rect.y+=this.PWqBx.y 


if(this.dZjIE!=0)
if((this.dZjIE==2)||((weBrH.x=="0%")&&(weBrH.y=="0%")&&(weBrH.lx=="100%")&&(weBrH.ly=="100%")))
{
var dec=8;
weBrH_rect.x+=dec
weBrH_rect.y+=dec
weBrH_rect.width-=2*dec
weBrH_rect.height-=2*dec 
}
var hgmFc_rect=weBrH_rect.clone()
this.pHfrD_preview=hgmFc_rect
html_SetRect(this.WQChw,this.pHfrD_preview)
this.bhvdp()
this.KEiHk()
}
this.BMxNC=function()
{
if(this.mvATB()) return;
if(this.hVslt()==false)return;
var lUGNx=Tween.regularEaseOut
var aDhqu=0.3
if((!this.DnMJf)||(this.DnMJf.isRunning()==false))
{
if(this.DnMJf)this.DnMJf.stop()
this.DnMJf=new IHTKo(this.MdQQQ,lUGNx,0,100,aDhqu)
this.DnMJf.onMotionFinished=this.sTqdt
this.DnMJf.m_count=0
this.DnMJf.start()
}
if((!this.YgDjV)||(this.YgDjV.isRunning()==false))
{
if(this.YgDjV)this.YgDjV.stop()
this.YgDjV=new IHTKo(this.aUDVh,lUGNx,0,100,aDhqu)
this.YgDjV.onMotionFinished=this.sTqdt
this.YgDjV.m_count=0
this.YgDjV.start()
}
}
this.sTqdt=function()
{
if(this.m_count>=3)
{
return;
}
this.yoyo()
this.m_count++}
this.bhvdp=function()
{
if(this.rsNfW()==false)return;
if(this.hVslt()==false)return
if(isMobileBrowser())return
var rsYRr=30
var rZmQp=this;
var sNGei=rZmQp.BMHDj
var n_pos=rZmQp.oxeTv;
if((n_pos!=-1)&&(rZmQp.BYiNS==false)&&(rZmQp.BTFHD!=true))
{
var kJjOC=true;
if(n_pos==0)
{
if(rZmQp.odwwP()==false)kJjOC=false;
rZmQp.ilKFh.setImage("intuisphere.png",new Rect(97,49,46,47))
}
else
if(n_pos==1)
{
if(rZmQp.sVane())
{
rZmQp.ilKFh.setImage("intuisphere.png",new Rect(48,0,48,48))
}
else
if(rZmQp.CZXtv())
{
rZmQp.ilKFh.setImage("intuisphere.png",new Rect(0,0,48,48))
}
else
{
kJjOC=false;
}
}
else
if(n_pos==2)
{
if(rZmQp.ZvFBo()==false)kJjOC=false;
rZmQp.ilKFh.setImage("intuisphere.png",new Rect(0,49,46,47))
}
rZmQp.ilKFh.setPosition(sNGei.x,sNGei.y,rsYRr,rsYRr);
rZmQp.ilKFh.setVisible(kJjOC)
}
else
{
rZmQp.ilKFh.setVisible(false)
}
}
this.KEiHk=function()
{
if(this.hVslt()==false)return
if((this.mvATB()==false)&&(this.jhRTX.width>0))
{
var uVKUA=40
var x_arrow0=(this.pHfrD_preview.width-this.jhRTX.width)/2
var x_arrow1=(x_arrow0+this.jhRTX.width-uVKUA)
var y_arrow0=(this.pHfrD_preview.height-this.jhRTX.height)/2+(this.jhRTX.height-uVKUA)/2 
this.MdQQQ.setRect(x_arrow0,y_arrow0,uVKUA,uVKUA)
this.aUDVh.setRect(x_arrow1,y_arrow0,uVKUA,uVKUA)
this.MdQQQ.setVisible(this.odwwP())
this.aUDVh.setVisible(this.ZvFBo())
}
else
{
this.MdQQQ.setVisible(false)
this.aUDVh.setVisible(false)
}
this.MdQQQ.setOpacity(0)
this.aUDVh.setOpacity(0)
}
this.XDthM=function()
{
if(this.hVslt())
{
this.kZdRP()
var WNIdM=this.FZmdh 
WA_photoAlbumActionThumb(this.ehAZP,WNIdM,true)
this.kZdRP()
}
this.GIVPJ()
if(this.ohwVx_global)
{
this.ohwVx_global.setRect(0,0,this.PWqBx.width,this.PWqBx.height);
}
if(this.SogkI)
{
html_SetGeometry(this.SogkI,0,0,this.PWqBx.width,this.PWqBx.height)
}
}
this.hDoDB=function()
{
if(this.hVslt())
{
WA_photoAlbumActionThumb(this.ehAZP,this.FZmdh,true)
}
}
this.PkmiZ=function(SjBDW)
{
Ocwgf(this.dZjIE>0)
var HWdUD=""
if(this.iTPXw())
{
HWdUD+=this.dwGIW();
}
if(this.hVslt())
{
HWdUD+=this.UhmKh();
};
if((this.dZjIE==1)||(this.dZjIE==2))
{
if(this.dOAWH_layout.bg_fullpage_img.length>0)
{
this.SogkI=this.vDvGa()+"-graphic-fullpage-bg";
HWdUD+="<div id='"+this.SogkI+"' style=\"";
HWdUD+="position:absolute;z-index:0;";
if(this.dOAWH_layout.bg_fullpage_img_type==0)
{
HWdUD+="background-image:url('"+this.dOAWH_layout.bg_fullpage_img+"');";
HWdUD+="background-repeat: repeat;";
}
HWdUD+="\" ";
HWdUD+=">";
if(this.dOAWH_layout.bg_fullpage_img_type==1)
{
HWdUD+="<img src='"+this.dOAWH_layout.bg_fullpage_img+"' width=100% height=100% border=0 >";
}
HWdUD+="</div>";
}
else
{
var IvNdJ=this.dOAWH_layout.bg_fullpage_grad
this.ohwVx_global=new WA_GraphicElement(this.vDvGa()+"-graphic-global-bg",0,false)
this.ohwVx_global.IvNdJ=IvNdJ
this.ohwVx_global.draw=function()
{
var IvNdJ=this.IvNdJ
var IvNdJ_bg=false
if(IvNdJ.has_gradient)
{
var exRNc=this.rect().width
var nxlbf=this.rect().height
var xg1=IvNdJ.pt1.x*exRNc/100
var yg1=IvNdJ.pt1.y*nxlbf/100
var xg2=IvNdJ.pt2.x*exRNc/100
var yg2=IvNdJ.pt2.y*nxlbf/100
IvNdJ_bg=XvnMJ(xg1,yg1,xg2,yg2,IvNdJ.col1,IvNdJ.col2)
}
else
{
IvNdJ_bg=IvNdJ.col1
}
WA_bg(this.canvasId(),this.rect().width,this.rect().height,0,0,'',[IvNdJ_bg],false,0,1)
}
HWdUD+=this.ohwVx_global.toHtml();
}
}
var WxsiR=document.getElementById(SjBDW);
WxsiR.innerHTML=HWdUD
WxsiR.style.display="block"
if(navigator.userAgent.match(/opera/i))
{
wa_timeout("WA_registerAlbum('"+this.ehAZP+"') ",0)
}
else
{
WA_registerAlbum(ehAZP)
}
if(this.STrRc()==false)
{
this.BMxNC()
}
}
this.ipARc=function()
{
var WYNuw="wa-dialog-container"
if(this.CZXtv()==false) return;
if(this.dZjIE==0)
if(this.dOAWH_layout.plugin_fullscreen_url.length>0)
{
window.open(this.dOAWH_layout.plugin_fullscreen_url)
return;
}
this.oxeTv=-1;
this.bhvdp()
var XZAVj=this.XZAVj
var pHfrD=new Rect(0,0,getWindowSize().width,getWindowSize().height)
var rZmQp=new vsgaJ(ehAZP,XZAVj)
rZmQp.FZmdh=this.FZmdh
if(this.dZjIE==0)
{
rZmQp.dZjIE=1
}
else
if(this.dZjIE==1)
{
rZmQp.dZjIE=2
}
XZAVj.album_object=rZmQp;
rZmQp.PWqBx.copy(pHfrD)
rZmQp.Rwlow=XZAVj.layout.selector_fullpage
if(rZmQp.dZjIE==2)
{
rZmQp.Rwlow=false
}
rZmQp.dOAWH_previewZone=XZAVj.layout.preview_fullpage
wa_global_photo_album.fullpage_object=rZmQp
rZmQp.PkmiZ(WYNuw)
return rZmQp
}
this.gCYiG=function()
{
if(this.sVane()==false) return;
this.dHRPB()
var WYNuw="wa-dialog-container"
var XZAVj=this.XZAVj
XZAVj.album_object=XZAVj.XVgXx;
wa_global_photo_album.fullpage_object=false 
if(this.dZjIE==1)
{
Ocwgf(false)
var WxsiR=document.getElementById(WYNuw);
WxsiR.innerHTML=""
WxsiR.style.display="none"
WA_photoAlbumActionThumb(this.ehAZP,this.FZmdh,true)
return XZAVj.XVgXx
}
if(this.dZjIE==2)
{
XZAVj.album_object.FZmdh=this.FZmdh
return XZAVj.album_object.ipARc()
}
}
this.dHRPB=function()
{
if(this.mvATB())
{
this.CDCCu=false
clearTimeout(this.xvSMJ)
this.xvSMJ=false;
}
}
this.onFullScreenKeydown=function(k)
{
if(k==27)
{
this.gCYiG()
return false;
}
tLYff(this.ehAZP,[k])
return false;
}
}
function lBfHl(e)
{
var delta=0;
if(!e) e=window.event;
if(e.wheelDelta){
delta=e.wheelDelta/120;
if(window.opera) delta=-delta;
}else if(e.detail){
delta=-e.detail/3;
}
if(navigator.userAgent.match(/opera/i)) delta=-delta;
var b_default=true;
if(wa_global_photo_album.fullpage_object)
{
var rZmQp=wa_global_photo_album.fullpage_object
var ehAZP=rZmQp.ehAZP
var uHsOB=rZmQp.TQlkO_preview_obj
if(uHsOB.jmVYw)
{
var PDagn=html_getLayer(uHsOB.vTmOR)
if(PDagn)
{
var scrollVal=-(3*delta)
if(isMSIE())scrollVal*=3
PDagn.scrollTop+=scrollVal
}
}
else
{
if(delta>0) rcxVx(ehAZP);
if(delta<0) YrIVu(ehAZP);
}
}
if(b_default)
if(e.preventDefault)
e.preventDefault();
e.returnValue=!b_default;
}
function Ocwgf(MHHNx)
{
if(MHHNx==false)
{
var BoPeu=window;
if(BoPeu.removeEventListener)
BoPeu.removeEventListener('DOMMouseScroll',lBfHl,false);
BoPeu.onmousewheel=document.onmousewheel=null;
}
else
{
var BoPeu=window;
if(BoPeu.addEventListener)
BoPeu.addEventListener('DOMMouseScroll',lBfHl,false);
BoPeu.onmousewheel=document.onmousewheel=lBfHl;
}
}
function XvnMJ(ulkvl,ZduRI,hkmUA,ibEge,EdgXQ,fALHJ)
{
var BaHxH=""
BaHxH+="(";
BaHxH+=ulkvl+";"+ZduRI+";"+hkmUA+";"+ibEge+";";
BaHxH+=EdgXQ+";";
BaHxH+=fALHJ;
BaHxH+=")";
return BaHxH;
}
function WA_photoAlbumAction(ehAZP,WNIdM)
{
var rZmQp=RJlAc(ehAZP)
var aQiZk=rZmQp.BqEbY[WNIdM]
var n_action=aQiZk.n_action
if((n_action=="<")||(n_action=="up"))
{
rZmQp.EArab=Math.max(0,rZmQp.EArab-1)
gwZMv(ehAZP)
}
if((n_action==">")||(n_action=="down"))
{
rZmQp.EArab=Math.min(rZmQp.QpwAX_pages-1,rZmQp.EArab+1)
gwZMv(ehAZP)
}
if(n_action=="diapo")
{
NitbY(ehAZP)
}
if(n_action=="+")
{
rZmQp.ipARc()
}
}
function WA_photoAlbumIncrease(ehAZP,WNIdM)
{
var rZmQp=RJlAc(ehAZP)
rZmQp.FZmdh=WNIdM
rZmQp.ipARc()
}
function NitbY(ehAZP)
{
var rZmQp=RJlAc(ehAZP)
if(rZmQp.mvATB()==false)
{
var QpwAX_increase=0;
var gRBem=rZmQp;
while(gRBem.CZXtv())
{
gRBem=gRBem.ipARc()
QpwAX_increase++}
if(QpwAX_increase>0)
{
gRBem.QpwAX_decrease_view_when_diaporama_stop=QpwAX_increase;
WA_goNextDiaporama(ehAZP)
gRBem.KEiHk()
return;
}
}
if(rZmQp.mvATB())
{
YnrYV(ehAZP)
}
else
{
WA_goNextDiaporama(ehAZP)
}
if(rZmQp.iTPXw())
{
var aQiZk=rZmQp.BqEbY_by_action["diapo"]
aQiZk.draw()
}
}
function YnrYV(ehAZP)
{
var rZmQp=RJlAc(ehAZP)
if(rZmQp.mvATB())
{
rZmQp.dHRPB()
if(rZmQp.QpwAX_decrease_view_when_diaporama_stop)
{
var gRBem=rZmQp;
for(var n=0;n<rZmQp.QpwAX_decrease_view_when_diaporama_stop;n++)
{
gRBem=gRBem.gCYiG() 
}
return;
}
}
if(rZmQp.iTPXw())
{
var aQiZk=rZmQp.BqEbY_by_action["diapo"]
aQiZk.draw()
}
}
function WA_goNextDiaporama(ehAZP)
{
var dOAWH=DSknA(ehAZP)
var CtAMA=pafWh(ehAZP)
var rZmQp=RJlAc(ehAZP)
var WNIdM=(rZmQp.FZmdh+1)%CtAMA.length;
if(dOAWH.diaporama.random)
{
WNIdM=Math.round((CtAMA.length-1)*Math.random());
}
WA_photoAlbumActionThumb(ehAZP,WNIdM)
rZmQp.xvSMJ=wa_timeout("WA_goNextDiaporama('"+ehAZP+"')",dOAWH.diaporama.time*1000)
}
function AteZF(ehAZP,WNIdM)
{
var rZmQp=RJlAc(ehAZP)
if(WNIdM<0)
{
rZmQp.BMxNC()
return false;
}
if(WNIdM>rZmQp.QpwAX_images-1)
{
rZmQp.BMxNC()
return false;
}
WA_photoAlbumActionThumb(ehAZP,WNIdM)
return true;
}
function YrIVu(ehAZP)
{
var rZmQp=RJlAc(ehAZP)
if(rZmQp.mvATB()) return false;
return AteZF(ehAZP,rZmQp.FZmdh+1)
}
function rcxVx(ehAZP)
{
var rZmQp=RJlAc(ehAZP)
if(rZmQp.mvATB()) return false;
return AteZF(ehAZP,rZmQp.FZmdh-1)
}
function WA_clickAlbumPreview(ehAZP)
{
var rZmQp=RJlAc(ehAZP)
if(rZmQp.STrRc()) return;
if(rZmQp.mvATB())
{
YnrYV(ehAZP)
}
var WZlXg=rZmQp.oxeTv
if(WZlXg!=-1)
{
if(WZlXg==2)YrIVu(ehAZP)
if(WZlXg==1)
{
if(rZmQp.sVane())
{
rZmQp.gCYiG()
}
else
if(rZmQp.CZXtv())
{
rZmQp.ipARc()
}
}
if(WZlXg==0)rcxVx(ehAZP)
}
}
function WA_mouseoutAlbumPreview(e,ehAZP)
{
var rZmQp=RJlAc(ehAZP)
rZmQp.ilKFh.setVisible(false)
rZmQp.oxeTv=-1;
}
function WA_mousemoveAlbumPreview(e,ehAZP)
{
var posx=0;
var posy=0;
if(!e)  e=window.event;
if(e.pageX||e.pageY){
posx=e.pageX;
posy=e.pageY;
}
else if(e.clientX||e.clientY){
posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;
posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;
}
var rZmQp=RJlAc(ehAZP)
var pQvHN=document.getElementById(rZmQp.ilKFh.divId())
var pt=html_findPos(pQvHN.offsetParent)
var x=posx-pt.x+1;
var y=posy-pt.y+1;
var n_pos=-1
var qMMnJ=false;
var BMwoK=0;
var tcStM=30;
if(rZmQp.BTFHD!=true)
if(rZmQp.mvATB()==false)
{
if((x>0)&&(x<rZmQp.pHfrD_preview.width))
if((y>0)&&(y<rZmQp.pHfrD_preview.height))
{
n_pos=1;
if(x<rZmQp.pHfrD_preview.width*0.3)n_pos=0;
if(x>rZmQp.pHfrD_preview.width*(1-0.3))n_pos=2;
}
if((x<BMwoK)||(x>rZmQp.pHfrD_preview.width-BMwoK-tcStM))qMMnJ=true;
if((y<BMwoK)||(y>rZmQp.pHfrD_preview.height-BMwoK-tcStM))qMMnJ=true;
}
rZmQp.BMHDj=new Point(x,y);
rZmQp.oxeTv=n_pos;
rZmQp.BYiNS=qMMnJ;
rZmQp.bhvdp();
}
function gwZMv(ehAZP)
{
var rZmQp=RJlAc(ehAZP)
var kRQWE=document.getElementById(rZmQp.cNNaS)
if(!kRQWE)return;
var Ncvpg;
var qaZWA=0;
var size_thumb=rZmQp.uJMqs;
var iQlCi=rZmQp.iQlCi;
var ExctH=0;
var qKZgx=(size_thumb+2*rZmQp.JuoXl_thumbnail+iQlCi);
var EVHEs=rZmQp.QpwAX_cols*rZmQp.QpwAX_rows;
if(rZmQp.GxxZL)
{
ExctH=rZmQp.EArab*rZmQp.QpwAX_cols*qKZgx
}
else
{
ExctH=rZmQp.EArab*rZmQp.QpwAX_rows*qKZgx
}
if(rZmQp.GxxZL)
{
Ncvpg="scrollLeft"
qaZWA=kRQWE.scrollLeft
}
else
{
Ncvpg="scrollTop"
qaZWA=kRQWE.scrollTop
}
if(qaZWA==ExctH)
{
return;
}
if(rZmQp.m_tween_slider)
{
rZmQp.m_tween_slider.stop()
}
var aDhqu=0.7;
rZmQp.m_tween_slider=new Tween(kRQWE,Ncvpg,Tween.strongEaseOut,qaZWA,ExctH,aDhqu);
rZmQp.m_tween_slider.onMotionFinished=tZwMt
rZmQp.m_tween_slider.rZmQp=rZmQp
rZmQp.m_tween_slider.start() 
}
function tZwMt()
{
var rZmQp=this.rZmQp
rZmQp.MuuKM()
}
function uNFfB(ehAZP)
{
return wa_global_photo_album[ehAZP]
}
function RJlAc(ehAZP)
{
return wa_global_photo_album[ehAZP].album_object
}
function pafWh(ehAZP)
{
return wa_global_photo_album[ehAZP].def
}
function PeFMd(ehAZP)
{
return wa_global_photo_album[ehAZP].src_folder
}
function DSknA(ehAZP)
{
return wa_global_photo_album[ehAZP].layout
}
function sMIvt(mPKBL)
{
var ehAZP=mPKBL[0]
WA_addHandler(ehAZP,"mousewheel",xAHox)
WA_addHandler(ehAZP,"keydown",tLYff)
var WYNuw="photo-album-main-"+ehAZP
var XZAVj=uNFfB(ehAZP)
var pHfrD=new Rect()
pHfrD.copy(XZAVj.size_container) 
var rZmQp=new vsgaJ(ehAZP,XZAVj) 
XZAVj.album_object=rZmQp;
XZAVj.XVgXx=rZmQp 
rZmQp.PWqBx.copy(pHfrD)
rZmQp.Rwlow=XZAVj.layout.selector
rZmQp.dOAWH_previewZone=XZAVj.layout.preview
rZmQp.PkmiZ(WYNuw) 

var rZmQp=RJlAc(ehAZP)
var gMLLJ=document.wa_global_query_info
if(gMLLJ)
{
if(ehAZP==gMLLJ.m_unid)
{
rZmQp.FZmdh=gMLLJ.m_index_item
rZmQp.ipARc()
return;
}
}
if(rZmQp.STrRc())
{
NitbY(ehAZP)
return;
}
}
function WA_registerAlbum(ehAZP)
{
RJlAc(ehAZP).CtgCL()
}
function tLYff(ehAZP,mPKBL)
{
var EsTea=mPKBL[0]
if(EsTea==37) return rcxVx(ehAZP);
if(EsTea==39) return YrIVu(ehAZP);
return true;
}
function xAHox(ehAZP,Iqucb)
{
var xDDtF=Iqucb[0] 
var rZmQp=RJlAc(ehAZP)
if(rZmQp.TQlkO_preview_obj)
{
var uHsOB=rZmQp.TQlkO_preview_obj
if(uHsOB.jmVYw)
{
var PDagn=html_getLayer(uHsOB.vTmOR)
PDagn.scrollTop+=-(3*xDDtF)
return true;
}
}
if(xDDtF>0)return rcxVx(ehAZP);
if(xDDtF<0)return YrIVu(ehAZP);
return true;
}
function WA_PhotoAlbum_resizeUI()
{
if(wa_global_photo_album.fullpage_object)
{
var rZmQp=wa_global_photo_album.fullpage_object
if(wa_global_photo_album.WsuVH)
{
clearTimeout(wa_global_photo_album.WsuVH);
}
var pHfrD=new Rect(0,0,getWindowSize().width,getWindowSize().height)
rZmQp.PWqBx.copy(pHfrD)
rZmQp.XDthM()
wa_global_photo_album.WsuVH=wa_timeout("WA_PhotoAlbum_delayed_resizeUI()",1000)
}
}
function WA_PhotoAlbum_delayed_resizeUI()
{
if(wa_global_photo_album.fullpage_object)
{
wa_global_photo_album.WsuVH=false
var rZmQp=wa_global_photo_album.fullpage_object
rZmQp.hDoDB()
}
}
function WA_loadPhotoAlbums()
{
for(var EsTea in wa_global_photo_album)
{
var XZAVj=wa_global_photo_album[EsTea]
var Ybspk=Translator.m_lang_for_filename
if(Ybspk.length>0)Ybspk="_"+Ybspk;
WA_loadScript(XZAVj.src_folder+'/photo-album-definition'+Ybspk+'.js?v='+XZAVj.id_modif,sMIvt,[EsTea]);
}
}

-->
