<!--
 
function SCLTm(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 aLwjs(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 WUwrB(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 mmOeA=new RGBColor(col)
mmOeA.a=0
grad.addColorStop(1,col);grad.addColorStop(0,mmOeA.toRGB());
c.fillStyle=grad;
c.beginPath();c.rect(x,y,8,14);c.fill()
c.fillStyle=old_fill
}
function Tjetn(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 AYnpM(name,XZrTd,gToWa)
{
var n=XZrTd.indexOf("%")
if(n>-1)
{
XZrTd=wa_evaluate(XZrTd.replace("%","/100"))
return Math.round(XZrTd*gToWa)
}
XZrTd=parseFloat(XZrTd)
return Math.round(XZrTd)
}
function UCdvt(UVVvT,aRfvH,bUPUU)
{
var x=AYnpM("x",UVVvT.x,aRfvH)
var y=AYnpM("y",UVVvT.y,bUPUU)
if(UVVvT.x.indexOf("%")==-1)aRfvH=aRfvH-x
if(UVVvT.y.indexOf("%")==-1)bUPUU=bUPUU-y 

var lx=AYnpM("lx",UVVvT.lx,aRfvH)
var ly=AYnpM("ly",UVVvT.ly,bUPUU)
return new Rect(x,y,lx,ly)
}
function WA_change_tool_button(LFSwC,bIrLH,over)
{
var bSiCf=WDpjJ(LFSwC)
if(bSiCf&&bSiCf.lovVx)
{
var hYVmY=bSiCf.lovVx[bIrLH]
if(hYVmY)
{
hYVmY.oxEvw=over
hYVmY.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=="<")
{
SCLTm(c,0,0,lx,false)
}
if(type==">")
{
SCLTm(c,0,0,lx,true)
}
if(type=="down")
{
c.rotate(-Math.PI/2);c.translate(-lx,0);
SCLTm(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);
SCLTm(c,0,0,lx,false);
c.translate(0,ly);c.rotate(-Math.PI/2);
}
if(type=="+")
{
aLwjs(c,0,0,lx,12,4)
}
if(type=="diapo")
{
WUwrB(c,0,0,lx,current_col)
}
if(type=="stop")
{
Tjetn(c,0,0,lx,current_col)
}
}
vRHGb.prototype=new Tween();
vRHGb.prototype.constructor=Tween;
vRHGb.superclass=Tween.prototype;
function vRHGb(obj,iGiCO,BbIDn,VGJui,ZcGAj)
{
this.targetObject=obj;
this.init(new Object(),'a',iGiCO,BbIDn,VGJui,ZcGAj);
this.onMotionChanged=function(evt)
{
var v=evt.target.getPosition();
var onJXO=this.targetObject;
v=Math.round(v*100)/100
onJXO.setOpacity(v/100);
}
}
function onMouseOnPreviewComment(LFSwC,GjgYl,SYcdd)
{
var bSiCf=WDpjJ(LFSwC)
var WtUAn=bSiCf.iLoqV_preview_obj 
var old=bSiCf.frcRX
bSiCf.frcRX=GjgYl;
WtUAn.DQudH=GjgYl
if(bSiCf.frcRX)
bSiCf.GFmod=-1;

if(SYcdd)
wa_timeout(Delegate.create(WtUAn,WtUAn.ilxFv),200);
else
wa_timeout(Delegate.create(WtUAn,WtUAn.drGJO),200);
}
nWFGl.prototype=new Tween();
nWFGl.prototype.constructor=Tween;
nWFGl.superclass=Tween.prototype;
function nWFGl(obj,iGiCO,BbIDn,VGJui,ZcGAj)
{
this.targetObject=obj;
this.init(new Object(),'a',iGiCO,BbIDn,VGJui,ZcGAj);
this.onMotionChanged=function(evt)
{
var v=evt.target.getPosition();
var WtUAn=this.targetObject;
WtUAn.PnZul=v
WtUAn.RwZrR()
}
this.onMotionFinished=function(evt)
{
var WtUAn=this.targetObject;
if(WtUAn.frCCj==false)
{
WtUAn.TjVKr.setVisible(false)
html_SetVisibility(WtUAn.HthiT,false)
}
WtUAn.setOverflow(WtUAn.DQudH)
}
}
function LfbUE(LFSwC,adiQl)
{
this.lMmjm=LFSwC
this.adiQl=adiQl
this.HthiT=this.adiQl+"comment-text-div"
this.DQudH=false;
this.frCCj=false;
this.PnZul=0;
this.toHtml=function()
{
var mBKWx=""
this.TjVKr=new WA_GraphicElement(this.adiQl+"-graphic-comment-bg",500,false)
this.TjVKr._objPreview=this
this.TjVKr.draw=function()
{
if(this._objPreview.frCCj)
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,0,0,'',['rgba(0,0,0,0.6)'],this.shadow(),0,this.opacity())
}
}
mBKWx+=this.TjVKr.toHtml() 
mBKWx+="<div id='"+this.HthiT+"' ";
mBKWx+="onmouseover=\"javascript:onMouseOnPreviewComment('"+this.lMmjm+"',true)\" ";
mBKWx+="onmouseout=\"javascript:onMouseOnPreviewComment('"+this.lMmjm+"',false)\" ";
mBKWx+=" style=\"font-family:Arial;font-size:13px;color:#ffffff;margin:2px;text-align:center;"
mBKWx+="overflow:auto;visibility:hidden;"
mBKWx+="position:absolute;"
mBKWx+="z-index:5250;"
mBKWx+="\">";
mBKWx+="</div>";
return mBKWx
}
this.cNDTx=function()
{
this.TjVKr.registerDynamicCanvas();
}
this.uleKs=function(xvgUE,xruFv,aRfvH,bUPUU)
{
this.XTbGY=new Rect(xvgUE,xruFv,aRfvH,bUPUU)
this.KxdGH(xvgUE,xruFv,aRfvH,bUPUU)
}
this.KxdGH=function(xvgUE,xruFv,aRfvH,bUPUU)
{
if(bUPUU<=0)
{
this.TjVKr.setVisible(false)
html_SetVisibility(this.HthiT,false)
return;
}
this.TjVKr.setRect(xvgUE,xruFv,aRfvH,bUPUU)
html_SetGeometry(this.HthiT,xvgUE,xruFv,aRfvH,bUPUU)
}
this.setOverflow=function(eLLMb)
{
var onJXO=html_getLayer(this.HthiT)
var MkEZs=((eLLMb)?"auto":"hidden")
onJXO.style.overflow=MkEZs 
}
this.qHNhJ=function()
{
this.kaQqH=true
clearTimeout(this.timerProgress)
this.timerProgress=wa_timeout(Delegate.create(this,this.jtKhH),300);
}
this.jtKhH=function()
{
if(this.kaQqH!=true)return;
this.kaQqH=false
this.fRHgK("chargement en cours...")
}
this.fRHgK=function(mBKWx)
{
this.oeAtx=mBKWx
this.sfPxk(mBKWx)
}
this.ciqhb=function(mBKWx)
{
this.kaQqH=false
this.TttTw=0;
this.frCCj=true
this.sfPxk(mBKWx)
}
this.sfPxk=function(mBKWx)
{
this.oeAtx=mBKWx
var UVVvT=this.XTbGY 
if(!UVVvT)return;
var onJXO=html_getLayer(this.HthiT)
onJXO.style.overflow="hidden" 
this.KxdGH(UVVvT.x,UVVvT.y+UVVvT.height-1,UVVvT.width,1)
html_writeContent(this.HthiT,this.oeAtx)
if(isMSIE())
{
WA_exec_delayedCallback(this,this.EFmVk)
}
else
{
this.EFmVk()
}
}
this.EFmVk=function()
{
var UVVvT=this.XTbGY
var onJXO=html_getLayer(this.HthiT)
this.TttTw=onJXO.scrollHeight+4;
this.TttTw=Math.min(this.TttTw,UVVvT.height*0.8);
this.PnZul=0
this.ilxFv()
}
this.RwZrR=function()
{
var mBKWx=this.oeAtx;
var UVVvT=this.XTbGY
var onJXO=html_getLayer(this.HthiT)
var dtcNt=this.PnZul
var bUPUU=dtcNt
this.KxdGH(UVVvT.x,UVVvT.y+UVVvT.height-bUPUU,UVVvT.width,bUPUU)
WA_exec_delayedCallback(this,this.ccKap)
}
this.ilxFv=function()
{
this.QSedA(true)
}
this.drGJO=function()
{
this.QSedA(false)
}
this.QSedA=function(JgsIN)
{
var UVVvT=this.XTbGY
if(this.KPXwN)
{
this.KPXwN.stop()
this.KPXwN=false;
}
var ZbrwQ=Math.min(UVVvT.height*0.2,this.TttTw);
ZbrwQ=Math.min(40,ZbrwQ);
if((ZbrwQ<20)&&(this.TttTw>ZbrwQ))
{
this.frCCj=false
}
if(this.DQudH)ZbrwQ=this.TttTw
var mnKJS=this.PnZul;
var dXosq=ZbrwQ;
if(this.frCCj==false)
{
mnKJS=this.PnZul;
dXosq=0;
}
if(JgsIN)
{
this.setOverflow(false)
}
if(this.DQudH!=true)
{
var onJXO=html_getLayer(this.HthiT)
onJXO.scrollTop=0
}
this.KPXwN=new nWFGl(this,Tween.strongEaseOut,mnKJS,dXosq,0.5)
this.KPXwN.start()
}
this.ccKap=function(eLLMb)
{
var frCCj=this.frCCj
if(eLLMb==false)
{


frCCj=false;
}
this.TjVKr.setVisible(frCCj)
html_SetVisibility(this.HthiT,frCCj)
}
}
function WA_photoAlbumActionThumb(LFSwC,bIrLH,wJqKp)
{
var bSiCf=WDpjJ(LFSwC)
if(bSiCf.oOZtD()==false)return 
var gLbJu=bSiCf.pGhUT;
var TcRTJ_img=document.getElementById(gLbJu)
if(bIrLH==-1) bIrLH=0;
var FKhSt=QaMRp(LFSwC)[bIrLH]
var CAMuc=bSiCf.DbhWm()
var OfeNi=CAMuc.border_size 
if(wJqKp!=true)
if(bSiCf.sxCjq==bIrLH)
{
return;
}
if(bSiCf.YJivg) return;
bSiCf.YJivg=true 
var ZbrwQ_size=new Size(bSiCf.iBWPH_preview.width-2*OfeNi,bSiCf.iBWPH_preview.height-2*OfeNi) 

var ZbrwQ_reso=bSiCf.YQKKe_layout.max_img_resolution
var src_folder=qEItP(LFSwC)
var gToWa=new Size(FKhSt.size.w,FKhSt.size.h)
gToWa.scale(ZbrwQ_size)
if(ZbrwQ_reso>0)
{
var ZbrwQ_size_album=new Size(ZbrwQ_reso,ZbrwQ_reso)
gToWa.scale(ZbrwQ_size_album)
}
var kjeta=new Image();
if(isMSIE())
{
kjeta=document.getElementById(bSiCf.meJCS) 
kjeta.width=gToWa.width
kjeta.height=gToWa.height
}
bSiCf.fBOaE=kjeta
kjeta.oESnW=0.2
kjeta.GhBPo=0.2
kjeta.ZSDjW_img=bIrLH
kjeta.QEWhM=FKhSt
kjeta.iLoqV_preview_obj=bSiCf.iLoqV_preview_obj
kjeta.RbFMW=bSiCf.RbFMW
kjeta.oFfuQ=Tween.strongEaseOut
kjeta.TcRTJ_img=TcRTJ_img
kjeta.ASJWh=document.getElementById(bSiCf.RbFMW.divId())
kjeta.bSiCf=bSiCf 
kjeta.sGunZ=gToWa;
kjeta.loaded=false;
bSiCf.iLoqV_preview_obj.qHNhJ()
kjeta.onload=function()
{
lSVkH(this,this.TcRTJ_img)
}
kjeta.onerror=function()
{
tQeZd(this,false)
}
kjeta.onabort=function()
{
tQeZd(this,false)
}
kjeta.src=src_folder+"/"+FKhSt.th+"?v="+FKhSt.mod;

}
function lSVkH(kjeta_obj,TcRTJ_img)
{
clearTimeout(kjeta_obj.bSiCf.iLoqV_preview_obj.timerProgress) 
if(isMobileBrowser())
{
var bSiCf=kjeta_obj.bSiCf
bSiCf.sxCjq=kjeta_obj.ZSDjW_img
kjeta_obj.RbFMW.setOpacity(1);
html_SetOpacity(kjeta_obj.TcRTJ_img,1)
SoMum(kjeta_obj)
tQeZd(kjeta_obj,true)
return;
}
var BFCTM=new vRHGb(kjeta_obj.RbFMW,kjeta_obj.oFfuQ,100,0,kjeta_obj.oESnW);
BFCTM.kjeta_obj=kjeta_obj
BFCTM.TcRTJ_img=TcRTJ_img
BFCTM.onMotionFinished=JPKIY
var IGgUw=new OpacityTween(TcRTJ_img,kjeta_obj.oFfuQ,100,0,kjeta_obj.oESnW);
IGgUw.kjeta_obj=kjeta_obj
IGgUw.TcRTJ_img=TcRTJ_img
BFCTM.start()
IGgUw.start()
}
function JPKIY()
{
var kjeta_obj=this.kjeta_obj 
var bIrLH=kjeta_obj.ZSDjW_img
var bSiCf=kjeta_obj.bSiCf
bSiCf.sxCjq=bIrLH
var TcRTJ_img=kjeta_obj.TcRTJ_img 
TcRTJ_img.kjeta_obj=kjeta_obj
SoMum(kjeta_obj) 
if(isMSIE()||isOperaBrowser())
{
var piwQh=new vRHGb(kjeta_obj.RbFMW,kjeta_obj.oFfuQ,0,100,kjeta_obj.GhBPo);
piwQh.kjeta_obj=kjeta_obj
piwQh.TcRTJ_img=this.TcRTJ_img
piwQh.onMotionFinished=fnKTh
var cLwPH=new OpacityTween(this.TcRTJ_img,this.kjeta_obj.oFfuQ,0,100,this.kjeta_obj.GhBPo);
cLwPH.kjeta_obj=this.kjeta_obj
cLwPH.TcRTJ_img=this.TcRTJ_img
cLwPH.start()
piwQh.start()
}
else
{
TcRTJ_img.onload=function()
{
var kjeta_obj=this.kjeta_obj
var TcRTJ_img=kjeta_obj.TcRTJ_img
var piwQh=new vRHGb(kjeta_obj.RbFMW,kjeta_obj.oFfuQ,0,100,kjeta_obj.GhBPo);
piwQh.kjeta_obj=kjeta_obj
piwQh.TcRTJ_img=TcRTJ_img
piwQh.onMotionFinished=fnKTh
var cLwPH=new OpacityTween(TcRTJ_img,kjeta_obj.oFfuQ,0,100,kjeta_obj.GhBPo);
cLwPH.kjeta_obj=kjeta_obj
cLwPH.TcRTJ_img=TcRTJ_img
cLwPH.start()
piwQh.start()
}
}
}
function fnKTh()
{
tQeZd(this.kjeta_obj,true)
}
function tQeZd(kjeta_obj,TsNjP)
{
var bIrLH=kjeta_obj.ZSDjW_img
var bSiCf=kjeta_obj.bSiCf
bSiCf.YJivg=false;
var bIrLH=bSiCf.sxCjq 
{
bSiCf.QEvqt=Math.floor(bIrLH/(bSiCf.CVetx_cols*bSiCf.CVetx_rows))
jWRWC(bSiCf.LFSwC)
}
bSiCf.IiRBG()
bSiCf.HUMVa()
var iLoqV=bSiCf.KteAI()
if(iLoqV.length==0)
{
bSiCf.iLoqV_preview_obj.ccKap(false)
}
bSiCf.aCZxt()
}
function SoMum(kjeta_obj)
{
var TcRTJ_img=kjeta_obj.TcRTJ_img
var bSiCf=kjeta_obj.bSiCf
var gToWa=kjeta_obj.sGunZ
bSiCf.mjJUE.width=gToWa.width
bSiCf.mjJUE.height=gToWa.height
TcRTJ_img.width=gToWa.width;
TcRTJ_img.height=gToWa.height;
TcRTJ_img.src=kjeta_obj.src;
TcRTJ_img.bSiCf=bSiCf
TcRTJ_img.gToWa=gToWa
bSiCf.aCZxt()
var iLoqV=bSiCf.KteAI()
if(iLoqV.length>0)
{
bSiCf.jbRnt()
bSiCf.iLoqV_preview_obj.ciqhb(iLoqV)
}
else
{
bSiCf.iLoqV_preview_obj.ccKap(false);
}
}
function WA_photoAlbumChangeImageSize(TcRTJ_img,gToWa,NwFwZ)
{
var dec=3
TcRTJ_img.width=gToWa
TcRTJ_img.height=gToWa
TcRTJ_img.style.borderWidth=NwFwZ
}
function WA_photoAlbumThumbOver(TcRTJ,LFSwC,bIrLH)
{
var bSiCf=WDpjJ(LFSwC)
var FKhSt_def=QaMRp(LFSwC)[bIrLH]
var gLbJu=bSiCf.XFmCK(bIrLH)
var TcRTJ_img=document.getElementById(gLbJu)
TcRTJ.bSiCf=bSiCf;
TcRTJ.TcRTJ_img=TcRTJ_img
var dec=2
WA_photoAlbumChangeImageSize(TcRTJ_img,bSiCf.XTZbN-2*dec,bSiCf.ncCnQ_thumbnail+dec)
}
function WA_photoAlbumThumbOut(TcRTJ)
{
var TcRTJ_img=TcRTJ.TcRTJ_img;
var bSiCf=TcRTJ.bSiCf
WA_photoAlbumChangeImageSize(TcRTJ_img,bSiCf.XTZbN,bSiCf.ncCnQ_thumbnail) 
}
function XnaqJ(LFSwC,mUCPe)
{
this.LFSwC=LFSwC;
this.OcAQC=25;
this.vxotC=mUCPe;
this.aMvQq="photo-album-toolbar-"+this.LFSwC
this.xjaTH=("photo-album-scroll-content"+this.LFSwC)
this.iBWPH_selector_slider=null;
this.VmnWA=null;
this.iBWPH_preview=null;
this.CVetx_cols=0;
this.CVetx_rows=0;
this.jMEPm=new Array()
this.QEvqt=0;
this.CVetx_pages=1
this.ACPjQ=true;
this.QqAfV=false
this.eXhjl=40
this.mjJUE=new Size(0,0)
this.uEoHT=false;
this.GFmod=-1;
this.sxCjq=-1;
this.CVetx_images=this.vxotC.def.length
this.MJxoU=false;
this.ibxUK=new Rect(0,0,100,100)
this.YQKKe_layout=kvDRl(this.LFSwC)
var YQKKe=this.YQKKe_layout
if(YQKKe.diaporama&&(YQKKe.diaporama.startup))this.MJxoU=true;
this.gjdvu=false;
this.YQKKe_previewZone=false;
this.dctOI=0;
this.YOqkN=function()
{
if(this==this.vxotC.album_object) return true;
return false;
}
this.adiQl=function()
{
return this.LFSwC+this.dctOI
}
this.jbRnt=function()
{
var bSiCf=this
var gToWa=new Size(bSiCf.mjJUE.width,bSiCf.mjJUE.height)
var CAMuc=bSiCf.DbhWm()
var RekFG=new RGBColor(CAMuc.border_col)
var OfeNi=CAMuc.border_size
if(RekFG.a==0) OfeNi=0;
var rYHqB=bSiCf.iBWPH_preview 
var x0=Math.round((rYHqB.width-(gToWa.width+2*OfeNi))/2)
var y0=Math.round((rYHqB.height-(gToWa.height+2*OfeNi))/2) 

bSiCf.iLoqV_preview_obj.uleKs(x0+OfeNi,y0+OfeNi,gToWa.width,gToWa.height);

}
this.aCZxt=function()
{
var bSiCf=this
var gToWa=new Size(bSiCf.mjJUE.width,bSiCf.mjJUE.height)
var CAMuc=bSiCf.DbhWm()
var RekFG=new RGBColor(CAMuc.border_col)
var OfeNi=CAMuc.border_size
if(RekFG.a==0) OfeNi=0;
var rYHqB=bSiCf.iBWPH_preview 
var x0=Math.round((rYHqB.width-(gToWa.width+2*OfeNi))/2)
var y0=Math.round((rYHqB.height-(gToWa.height+2*OfeNi))/2)
bSiCf.RbFMW.setRect(x0,y0,gToWa.width+2*OfeNi,gToWa.height+2*OfeNi) 
var WJPlv=document.getElementById(bSiCf.WJPlv_preview_id)
html_SetPosition(WJPlv,OfeNi+x0,OfeNi+y0)
}
this.KteAI=function()
{
var kjeta_obj=this.fBOaE
var cPhcH=this.YQKKe_layout
var iLoqV=""
var url=kjeta_obj.QEWhM.url
if(cPhcH.disp_comment)
{
if(cPhcH.disp_comment_img_number)
iLoqV+="<b>"+(kjeta_obj.ZSDjW_img+1)+"/"+this.CVetx_images+"</b>"
if(cPhcH.disp_comment_img_fn)
{
if(iLoqV.length>0)iLoqV+="<br>"
iLoqV+="("+kjeta_obj.QEWhM.fn+")"
}
if(kjeta_obj.QEWhM.comment.length>0)
{
if(iLoqV.length>0)iLoqV+="<br>"
iLoqV+=kjeta_obj.QEWhM.comment
}
if(url.length>0)
{
if(iLoqV.length>0)iLoqV+="<br>"
iLoqV+="<br><a href='"+url+"' target=_blank "
iLoqV+="style='color:#0000ff;' "
var iUUke=this.iLoqV_preview_obj.lMmjm
iLoqV+="onmouseover=\"javascript:_onMouseOnPreviewComment('"+iUUke+"',true)\" ";
iLoqV+=">";
iLoqV+="@ link"
iLoqV+="</a><br><br>"
}
}
return iLoqV;
}
this.PHVRg=function()
{
var YQKKe=kvDRl(LFSwC)
var DUKhf=this.rPirl();
this.QqAfV=DUKhf.nav_has_horz_flow
if(this.QqAfV==false)
{
this.jMEPm.push("up")
this.jMEPm.push("down")
}
else
{
this.jMEPm.push("<")
this.jMEPm.push(">")
}
if(this.mOKRA())
{
this.jMEPm.push("+")
}
else
if(this.cCPKg())
{
this.jMEPm.push("-")
}
if(YQKKe.diaporama)
{
this.jMEPm.push("diapo")
}
if((DUKhf.nav_but_orient==5)||(DUKhf.nav_but_orient==3))
{
this.ACPjQ=false;
}
var canvas_bg=""
this.khEoX=new WA_GraphicElement(this.adiQl()+"-graphic-selector-bg",50,DUKhf.bg_shadow)
this.khEoX.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,1,DUKhf.bg_border_col,[DUKhf.bg_col],DUKhf.bg_shadow,0)
}
canvas_bg+=this.khEoX.toHtml() 
this.TjVKr_toolbar=new WA_GraphicElement(this.adiQl()+"-graphic-toolbar-bg",50,DUKhf.bg_shadow)
this.TjVKr_toolbar.ACPjQ=this.ACPjQ 
this.TjVKr_toolbar.draw=function()
{
var DmbmZ_toolbar=false;
if(this.ACPjQ)
{
DmbmZ_toolbar=RqCcL(0,0,0,this.rect().height/2,DUKhf.toolbar_bg_col1,DUKhf.toolbar_bg_col2)
}
else
{
DmbmZ_toolbar=RqCcL(0,0,this.rect().width/2,0,DUKhf.toolbar_bg_col1,DUKhf.toolbar_bg_col2)
}
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,1,DUKhf.toolbar_border_col,[DmbmZ_toolbar],DUKhf.toolbar_shadow,0)
}
canvas_bg+=this.TjVKr_toolbar.toHtml() 
this.lovVx=new Array()
this.lovVx_by_action=new Array()
for(var n=0;n<this.jMEPm.length;n++)
{
var n_action=this.jMEPm[n]
var hYVmY=new WA_GraphicElement(this.adiQl()+"-graphic-toolbar-but"+n,70,false)
hYVmY.n_action=n_action
hYVmY.bSiCf=this
hYVmY.oxEvw=false
hYVmY.OcAQC=this.OcAQC
hYVmY.OBKsf=DUKhf.toolbar_but_col1
hYVmY.PuRCp=DUKhf.toolbar_but_col2
hYVmY.draw=function()
{
var RTrwB=this.OcAQC
var GxvRx=this.n_action
if(GxvRx=="diapo")
{
if(this.bSiCf.ioQKH())GxvRx="stop"
}
var pINns=(this.oxEvw)?this.PuRCp:this.OBKsf
WA_toolbar_button(this.canvasId(),RTrwB,RTrwB,GxvRx,pINns,true)
}
this.lovVx.push(hYVmY)
var QnQxe_action=n_action
if(QnQxe_action=="up")QnQxe_action="<"
if(QnQxe_action=="down")QnQxe_action=">"
this.lovVx_by_action[QnQxe_action]=hYVmY
canvas_bg+="<div id='"+hYVmY.divId()+"-href' onclick=\"javascript:WA_photoAlbumAction('"+this.LFSwC+"',"+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.LFSwC+"',"+n+",true)";
canvas_bg+="\" ";
canvas_bg+="onmouseout=\"";
canvas_bg+="WA_change_tool_button('"+this.LFSwC+"',"+n+",false)";
canvas_bg+="\" ";
canvas_bg+=">";
canvas_bg+="</div>";
canvas_bg+=hYVmY.toHtml()
}
canvas_bg+="<div id='"+this.xjaTH+"' style=\"";
canvas_bg+="position:absolute;z-index:100;";
canvas_bg+="overflow:hidden;";
canvas_bg+="\"></div>";
return canvas_bg;
}
this.WeHRp=function()
{
var DUKhf=this.rPirl();
var r1_rect=this.iBWPH_selector_slider;
var mBKWx="" 
var min_size=Math.min(r1_rect.width,r1_rect.height)
var size_thumb=DUKhf.th_size.size;
if(DUKhf.th_size.percent) size_thumb=Math.round(size_thumb*(min_size)/100);
var image_spacing=Math.max(0,Math.round((DUKhf.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.CVetx_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.CVetx_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.CVetx_images
var nb_pages=(nb_images/(this.CVetx_cols*this.CVetx_rows));
if(nb_pages>Math.floor(nb_pages)) nb_pages=Math.floor(nb_pages)+1;
this.CVetx_pages=nb_pages
this.XTZbN=size_thumb;
this.tBIgA=image_spacing;
this.ncCnQ_thumbnail=size_border_thumbnail
var n_image=0;
var nb_item_x=this.CVetx_cols*nb_pages
var nb_item_y=this.CVetx_rows;
var nb_item_per_page=this.CVetx_cols*this.CVetx_rows 
if(this.QqAfV==false)
{
nb_item_x=this.CVetx_cols
nb_item_y=this.CVetx_rows*nb_pages;
}
mBKWx+="<table border=0 cellpadding=0 cellspacing=0 width=100% height=100% >";
mBKWx+="<tr>"
mBKWx+="<td "
if((this.QqAfV==false)||(this.CVetx_pages==1))
{
mBKWx+="align=center"
}
mBKWx+=">" 
mBKWx+="<table border=0 cellpadding="+(image_spacing/2)+" cellspacing=0  width=10px>";
for(var xruFv=0;xruFv<nb_item_y;xruFv++)
{
mBKWx+="<tr>" 
for(var xvgUE=0;xvgUE<nb_item_x;xvgUE++)
{
mBKWx+="<td>"
var ind_img=0;
var nx_0=Math.floor(xvgUE/this.CVetx_cols)
var diff0=xvgUE-nx_0*this.CVetx_cols;
ind_img=nx_0*nb_item_per_page+(xruFv*this.CVetx_cols)+diff0
if(ind_img<nb_images)
{
var FKhSt=this.vxotC.def[ind_img]
var dbADC=this.vxotC.src_folder+"/th_"+FKhSt.th+"?v="+FKhSt.mod_th
mBKWx+="<a href=\"";
if(this.oOZtD())
{
mBKWx+="javascript:WA_photoAlbumActionThumb('"+LFSwC+"',"+ind_img+")"
}
else
{
mBKWx+="javascript:WA_photoAlbumIncrease('"+LFSwC+"',"+ind_img+")"
}
mBKWx+="\" "
mBKWx+="onmouseover=\"WA_photoAlbumThumbOver(this,'"+LFSwC+"',"+ind_img+")\" "
mBKWx+="onmouseout=\"WA_photoAlbumThumbOut(this)\" "
mBKWx+=">"
mBKWx+="<img id='"+this.XFmCK(ind_img)+"' width="+size_thumb+"px height="+size_thumb+"px src='"+dbADC+"' ";
mBKWx+="style='";
if(size_border_thumbnail>0)
{
mBKWx+="border-color:"+DUKhf.selector_img_border_color+";";
mBKWx+="border-width:"+size_border_thumbnail+"px;border-style:solid;";
}
mBKWx+="' ";
mBKWx+=">"
mBKWx+="</a>"
n_image++;
}
mBKWx+="</td>"
}
if(this.ACPjQ)
if(this.CVetx_pages>1)
{
for(var xvgUE=0;xvgUE<this.CVetx_cols;xvgUE++)
{
var ABMrJ=size_thumb+2*size_border_thumbnail
mBKWx+="<td>"
mBKWx+="<div  style='width:"+(ABMrJ)+"px;height:"+ABMrJ+"px;'></div>";
mBKWx+="</td>"
}
}
mBKWx+="</tr>"
}
if(this.ACPjQ==false)
if(this.CVetx_pages>1)
{
for(var xruFv=0;xruFv<this.CVetx_rows;xruFv++)
{
mBKWx+="<tr>"
var ABMrJ=size_thumb+2*size_border_thumbnail
mBKWx+="<td colspan="+this.CVetx_cols+">"
mBKWx+="<div  style='width:"+(ABMrJ)+"px;height:"+ABMrJ+"px;'></div>";
mBKWx+="</td>"
mBKWx+="</tr>"
}
}
mBKWx+="</table>" 
mBKWx+="</td>"
mBKWx+="</tr>"
mBKWx+="</table>"
return mBKWx;
}
this.XFmCK=function(bIrLH)
{
return this.adiQl()+"-th-img"+bIrLH
}
this.AWWoC=function()
{
var CAMuc=this.DbhWm();
if(CAMuc==false) return;
var FKhSt=this.vxotC.def[0]
this.pGhUT="photo-album-preview-img-"+this.adiQl()
this.meJCS=this.pGhUT+"-cache"
this.WJPlv_preview_id="photo-album-preview-img-div"+this.adiQl()
this.ERDvc="photo-album-preview-zone"+this.adiQl()
var mBKWx=""
mBKWx+="<div  id='"+this.ERDvc+"' style=\"";
mBKWx+="position:absolute;z-index:500;";
mBKWx+="\" ";
mBKWx+="onclick=\"WA_clickAlbumPreview('"+this.LFSwC+"')\" ";
mBKWx+="onmousemove=\"javascript:WA_mousemoveAlbumPreview(event,'"+this.LFSwC+"')\" ";
mBKWx+="onmouseout=\"javascript:WA_mouseoutAlbumPreview(event,'"+this.LFSwC+"')\" ";
mBKWx+=">";
mBKWx+="<div style='position:absolute;z-index:450;left:0px;top:0px;";
mBKWx+="width:100%;height:100%;background-color:#000000;";
mBKWx+="filter:alpha(opacity=0);-moz-opacity:0;opacity:0;' "
mBKWx+="></div>"
this.iLoqV_preview_obj=new LfbUE(this.LFSwC,this.adiQl());
mBKWx+=this.iLoqV_preview_obj.toHtml() 
this.RbFMW=new WA_GraphicElement(this.adiQl()+"-graphic-img-bg",50,CAMuc.shadow)
this.RbFMW.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,0,'',[CAMuc.border_col],this.shadow(),0,this.opacity())
}
mBKWx+=this.RbFMW.toHtml() 
mBKWx+="<div id='"+this.WJPlv_preview_id+"' style=\"";
mBKWx+="position:absolute;z-index:100;";
mBKWx+="left:0px;";
mBKWx+="top:0px;";
mBKWx+="\" ";
mBKWx+=">";
mBKWx+="<img  id='"+this.pGhUT+"' border=0 >";
if(isMSIE())
{
mBKWx+="<img style='position:absolute;left:0px;top:0px;visibility:hidden;' id='"+this.meJCS+"'>"
}
else
{
mBKWx+="<img style='position:absolute;left:0px;top:0px;display:none;' id='"+this.meJCS+"'>"
}
mBKWx+="</div>";
this.mNVVS=new WA_GraphicElement(this.adiQl()+"-graphic-arrow0",300,true)
this.mNVVS.setImage("intuisphere.png",new Rect(97,49,46,47))
this.mNVVS.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,0,'',["#ffffff"],this.shadow(),0,this.opacity(),true)
var aRfvH=Math.round(this.rect().width*0.8);
var bUPUU=Math.round(this.rect().height*0.8);
WA_drawImage(this.canvasId(),this.img_src(),6+(this.rect().width-aRfvH)/2,6+(this.rect().height-bUPUU)/2,aRfvH,bUPUU,this.img_clip(),this.opacity(),false)
}
this.hoPFI=new WA_GraphicElement(this.adiQl()+"-graphic-arrow1",300,true)
this.hoPFI.setImage("intuisphere.png",new Rect(2,49,46,47))
this.hoPFI.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,0,'',["#ffffff"],this.shadow(),0,this.opacity(),true)
var aRfvH=Math.round(this.rect().width*0.8);
var bUPUU=Math.round(this.rect().height*0.8);
WA_drawImage(this.canvasId(),this.img_src(),6+(this.rect().width-aRfvH)/2,6+(this.rect().height-bUPUU)/2,aRfvH,bUPUU,this.img_clip(),this.opacity(),false)
}
mBKWx+=this.mNVVS.toHtml()
mBKWx+=this.hoPFI.toHtml() 
this.DLaFS=new WA_GraphicElement(this.adiQl()+"-graphic-cursor-zoom",400,false)
this.DLaFS.setSize(30,30)
this.DLaFS.setImage("intuisphere.png",new Rect(0,0,48,48))
this.DLaFS.draw=function()
{
WA_drawImage(this.canvasId(),this.img_src(),0,0,this.rect().width,this.rect().height,this.img_clip())
}
mBKWx+=this.DLaFS.toHtml() 
mBKWx+="</div>";
return mBKWx;
}
this.cNDTx=function()
{
if(this.rraxd())
{
this.khEoX.registerDynamicCanvas();
this.TjVKr_toolbar.registerDynamicCanvas();
for(var n=0;n<this.lovVx.length;n++)
{
var hYVmY=this.lovVx[n]
hYVmY.registerDynamicCanvas();
}
}
if(this.oOZtD())
{
this.iLoqV_preview_obj.cNDTx()
this.RbFMW.registerDynamicCanvas();
this.mNVVS.registerDynamicCanvas();
this.hoPFI.registerDynamicCanvas();
this.DLaFS.registerDynamicCanvas();
this.DLaFS.setVisible(false)
}
if(this.TjVKr_global)
this.TjVKr_global.registerDynamicCanvas();
this.VpXlj()
}
this.ioQKH=function()
{
return(this.cpqft)?true:false;
}
this.MgucC=function()
{
return(this.QEvqt>0)
}
this.gRHMG=function()
{
return(this.QEvqt<this.CVetx_pages-1)
}
this.StRHf=function()
{
return(this.sxCjq>0);
}
this.jrhOK=function()
{
return(this.sxCjq<this.vxotC.def.length-1);
}
this.ICrBE=function()
{
if(this.rraxd())
{
var DUKhf=this.rPirl() 
var aRfvH=this.ibxUK.width
var bUPUU=this.ibxUK.height
var r0=DUKhf.rect
var r0_rect=UCdvt(r0,aRfvH,bUPUU)
r0_rect.x+=this.ibxUK.x
r0_rect.y+=this.ibxUK.y
var r1_rect=r0_rect.clone() 
var LhVWx_toolbar=r0_rect.clone()
var CVetx_buttons=this.jMEPm.length 
var PPpPL=5
var XTHLI=this.OcAQC+PPpPL*2
var jrtHS=(CVetx_buttons*this.OcAQC)
if(DUKhf.nav_but_orient==1)
{
r1_rect.y+=XTHLI;
r1_rect.height-=XTHLI;
LhVWx_toolbar.x=LhVWx_toolbar.x+(LhVWx_toolbar.width-jrtHS)/2;
LhVWx_toolbar.width=jrtHS
LhVWx_toolbar.y+=PPpPL;
LhVWx_toolbar.height=this.OcAQC;
}
if(DUKhf.nav_but_orient==5)
{
r1_rect.width-=XTHLI;
LhVWx_toolbar.y=LhVWx_toolbar.y+(LhVWx_toolbar.height-jrtHS)/2;
LhVWx_toolbar.height=jrtHS
LhVWx_toolbar.x+=r1_rect.width+PPpPL;
LhVWx_toolbar.width=this.OcAQC;
}
if(DUKhf.nav_but_orient==7)
{
r1_rect.height-=XTHLI;
LhVWx_toolbar.x=LhVWx_toolbar.x+(LhVWx_toolbar.width-jrtHS)/2;
LhVWx_toolbar.width=jrtHS
LhVWx_toolbar.y+=r1_rect.height+PPpPL;
LhVWx_toolbar.height=this.OcAQC;
}
if(DUKhf.nav_but_orient==3)
{
r1_rect.width-=XTHLI;
r1_rect.x+=XTHLI;
LhVWx_toolbar.y=LhVWx_toolbar.y+(LhVWx_toolbar.height-jrtHS)/2;
LhVWx_toolbar.height=jrtHS
LhVWx_toolbar.x+=PPpPL;
LhVWx_toolbar.width=this.OcAQC;
}
this.iBWPH_selector_slider=r1_rect
this.VmnWA=LhVWx_toolbar 
var MObox=this.iBWPH_selector_slider;
this.khEoX.setRect(MObox.x,MObox.y,MObox.width,MObox.height)
html_SetRect(this.xjaTH,r1_rect) 
var LhVWx=this.VmnWA
this.TjVKr_toolbar.setRect(LhVWx.x,LhVWx.y,LhVWx.width,LhVWx.height)
var lx_button=this.OcAQC
var ly_button=lx_button
var aEMZq=LhVWx_toolbar.x
var xruFv_but0=LhVWx_toolbar.y
for(var n=0;n<this.lovVx.length;n++)
{
var hYVmY=this.lovVx[n]
var UWRpD=aEMZq
var xruFv_but=xruFv_but0
if(this.ACPjQ)
{
UWRpD+=n*lx_button;
}
else
{
xruFv_but+=n*ly_button;
}
hYVmY.setRect(UWRpD,xruFv_but,lx_button,ly_button)
html_SetGeometry(hYVmY.divId()+"-href",UWRpD,xruFv_but,lx_button,ly_button)
}
var TcRTJ_selector=document.getElementById(this.xjaTH)
if(TcRTJ_selector)
{
TcRTJ_selector.innerHTML=this.WeHRp();
}
this.HUMVa()
}
}
this.mOKRA=function()
{
if((this.dctOI==1)&&(this.rraxd()==true)) return true;
if((this.dctOI==0)&&(this.YQKKe_layout.has_full_page_config)) return true;
return false;
}
this.cCPKg=function()
{
if(this.dctOI==1) return true;
if(this.dctOI==2) return true;
return false;
}
this.fCQKC=function()
{
return this.MJxoU;
}
this.rPirl=function()
{
return this.gjdvu;
}
this.DbhWm=function()
{
return this.YQKKe_previewZone;
}
this.rraxd=function()
{
if(this.rPirl()) return true;
return false;
}
this.oOZtD=function()
{
if(this.DbhWm()) return true;
return false;
}
this.HUMVa=function()
{
if(this.rraxd()==false)return
var TijRZ=this.lovVx_by_action["<"]
TijRZ.setVisible(this.MgucC())
var BEIjG=this.lovVx_by_action[">"]
BEIjG.setVisible(this.gRHMG())
}
this.IiRBG=function()
{
var CAMuc=this.DbhWm();
var aRfvH=this.ibxUK.width
var bUPUU=this.ibxUK.height
var MObox=CAMuc.rect
var MObox_rect=UCdvt(MObox,aRfvH,bUPUU)
if(this.dctOI==2)
{
MObox_rect=new Rect(0,0,aRfvH,bUPUU)
}
MObox_rect.x+=this.ibxUK.x
MObox_rect.y+=this.ibxUK.y 


if(this.dctOI!=0)
if((this.dctOI==2)||((MObox.x=="0%")&&(MObox.y=="0%")&&(MObox.lx=="100%")&&(MObox.ly=="100%")))
{
var dec=8;
MObox_rect.x+=dec
MObox_rect.y+=dec
MObox_rect.width-=2*dec
MObox_rect.height-=2*dec 
}
var LhVWx_rect=MObox_rect.clone()
this.iBWPH_preview=LhVWx_rect 
html_SetRect(this.ERDvc,this.iBWPH_preview)
this.NdfHY()
this.tcnkk()
}
this.IQYYf=function()
{
if(this.ioQKH()) return;
if(this.oOZtD()==false)return;
var oFfuQ=Tween.regularEaseOut
var ZcGAj=0.3
if((!this.BTZbn)||(this.BTZbn.isRunning()==false))
{
if(this.BTZbn)this.BTZbn.stop()
this.BTZbn=new vRHGb(this.mNVVS,oFfuQ,0,100,ZcGAj)
this.BTZbn.onMotionFinished=this.DdBkR
this.BTZbn.m_count=0
this.BTZbn.start()
}
if((!this.nHFPd)||(this.nHFPd.isRunning()==false))
{
if(this.nHFPd)this.nHFPd.stop()
this.nHFPd=new vRHGb(this.hoPFI,oFfuQ,0,100,ZcGAj)
this.nHFPd.onMotionFinished=this.DdBkR
this.nHFPd.m_count=0
this.nHFPd.start()
}
}
this.DdBkR=function()
{
if(this.m_count>=3)
{
return;
}
this.yoyo()
this.m_count++}
this.NdfHY=function()
{
if(this.YOqkN()==false)return;
if(this.oOZtD()==false)return
if(isMobileBrowser())return
var eSfJo=30
var bSiCf=this;
var tHYMj=bSiCf.guJVt
var n_pos=bSiCf.GFmod;
if((n_pos!=-1)&&(bSiCf.uEoHT==false)&&(bSiCf.frcRX!=true))
{
var eZjsQ=true;
if(n_pos==0)
{
if(bSiCf.StRHf()==false)eZjsQ=false;
bSiCf.DLaFS.setImage("intuisphere.png",new Rect(97,49,46,47))
}
else
if(n_pos==1)
{
if(bSiCf.cCPKg())
{
bSiCf.DLaFS.setImage("intuisphere.png",new Rect(48,0,48,48))
}
else
if(bSiCf.mOKRA())
{
bSiCf.DLaFS.setImage("intuisphere.png",new Rect(0,0,48,48))
}
else
{
eZjsQ=false;
}
}
else
if(n_pos==2)
{
if(bSiCf.jrhOK()==false)eZjsQ=false;
bSiCf.DLaFS.setImage("intuisphere.png",new Rect(0,49,46,47))
}
bSiCf.DLaFS.setPosition(tHYMj.x,tHYMj.y,eSfJo,eSfJo);
bSiCf.DLaFS.setVisible(eZjsQ)
}
else
{
bSiCf.DLaFS.setVisible(false)
}
}
this.tcnkk=function()
{
if(this.oOZtD()==false)return
if((this.ioQKH()==false)&&(this.mjJUE.width>0))
{
var eXhjl=40
var x_arrow0=(this.iBWPH_preview.width-this.mjJUE.width)/2
var x_arrow1=(x_arrow0+this.mjJUE.width-eXhjl)
var y_arrow0=(this.iBWPH_preview.height-this.mjJUE.height)/2+(this.mjJUE.height-eXhjl)/2 
this.mNVVS.setRect(x_arrow0,y_arrow0,eXhjl,eXhjl)
this.hoPFI.setRect(x_arrow1,y_arrow0,eXhjl,eXhjl)
this.mNVVS.setVisible(this.StRHf())
this.hoPFI.setVisible(this.jrhOK())
}
else
{
this.mNVVS.setVisible(false)
this.hoPFI.setVisible(false)
}
this.mNVVS.setOpacity(0)
this.hoPFI.setOpacity(0)
}
this.VpXlj=function()
{
if(this.oOZtD())
{
this.IiRBG()
var bIrLH=this.sxCjq 
WA_photoAlbumActionThumb(this.LFSwC,bIrLH,true)
this.IiRBG()
}
this.ICrBE()
if(this.TjVKr_global)
{
this.TjVKr_global.setRect(0,0,this.ibxUK.width,this.ibxUK.height);
}
if(this.BTZtr)
{
html_SetGeometry(this.BTZtr,0,0,this.ibxUK.width,this.ibxUK.height)
}
}
this.EGgJe=function()
{
if(this.oOZtD())
{
WA_photoAlbumActionThumb(this.LFSwC,this.sxCjq,true)
}
}
this.XIicF=function()
{
if(this.oOZtD())
{
WA_photoAlbumActionThumb(this.LFSwC,this.sxCjq,false)
}
}
this.rxeKt=function(fOofH)
{
OkiXr(this.dctOI>0)
var mBKWx=""
if(this.rraxd())
{
mBKWx+=this.PHVRg();
}
if(this.oOZtD())
{
mBKWx+=this.AWWoC();
};
if((this.dctOI==1)||(this.dctOI==2))
{
if(this.YQKKe_layout.bg_fullpage_img.length>0)
{
this.BTZtr=this.adiQl()+"-graphic-fullpage-bg";
mBKWx+="<div id='"+this.BTZtr+"' style=\"";
mBKWx+="position:absolute;z-index:0;";
if(this.YQKKe_layout.bg_fullpage_img_type==0)
{
mBKWx+="background-image:url('"+this.YQKKe_layout.bg_fullpage_img+"');";
mBKWx+="background-repeat: repeat;";
}
mBKWx+="\" ";
mBKWx+=">";
if(this.YQKKe_layout.bg_fullpage_img_type==1)
{
mBKWx+="<img src='"+this.YQKKe_layout.bg_fullpage_img+"' width=100% height=100% border=0 >";
}
mBKWx+="</div>";
}
else
{
var DmbmZ=this.YQKKe_layout.bg_fullpage_grad
this.TjVKr_global=new WA_GraphicElement(this.adiQl()+"-graphic-global-bg",0,false)
this.TjVKr_global.DmbmZ=DmbmZ
this.TjVKr_global.draw=function()
{
var DmbmZ=this.DmbmZ
var DmbmZ_bg=false
if(DmbmZ.has_gradient)
{
var aRfvH=this.rect().width
var bUPUU=this.rect().height
var xg1=DmbmZ.pt1.x*aRfvH/100
var yg1=DmbmZ.pt1.y*bUPUU/100
var xg2=DmbmZ.pt2.x*aRfvH/100
var yg2=DmbmZ.pt2.y*bUPUU/100
DmbmZ_bg=RqCcL(xg1,yg1,xg2,yg2,DmbmZ.col1,DmbmZ.col2)
}
else
{
DmbmZ_bg=DmbmZ.col1
}
WA_bg(this.canvasId(),this.rect().width,this.rect().height,0,0,'',[DmbmZ_bg],false,0,1)
}
mBKWx+=this.TjVKr_global.toHtml();
}
}
var IZLbO=document.getElementById(fOofH);
IZLbO.innerHTML=mBKWx
IZLbO.style.display="block" 
{
WA_registerAlbum(LFSwC)
}
if(this.fCQKC()==false)
{
this.IQYYf()
}
}
this.MCAAP=function()
{
var dVcjG="wa-dialog-container"
if(this.mOKRA()==false) return;
if(this.dctOI==0)
if(this.YQKKe_layout.plugin_fullscreen_url.length>0)
{
window.open(this.YQKKe_layout.plugin_fullscreen_url)
return;
}
this.GFmod=-1;
this.NdfHY()
var vxotC=this.vxotC
var iBWPH=new Rect(0,0,getWindowSize().width,getWindowSize().height)
var bSiCf=new XnaqJ(LFSwC,vxotC)
bSiCf.sxCjq=this.sxCjq
if(this.dctOI==0)
{
bSiCf.dctOI=1
}
else
if(this.dctOI==1)
{
bSiCf.dctOI=2
}
vxotC.album_object=bSiCf;
bSiCf.ibxUK.copy(iBWPH)
bSiCf.gjdvu=vxotC.layout.selector_fullpage
if(bSiCf.dctOI==2)
{
bSiCf.gjdvu=false
}
bSiCf.YQKKe_previewZone=vxotC.layout.preview_fullpage
wa_global_photo_album.fullpage_object=bSiCf
bSiCf.rxeKt(dVcjG)
return bSiCf
}
this.oTgnK=function()
{
if(this.cCPKg()==false) return;
this.RHgCk()
var dVcjG="wa-dialog-container"
var vxotC=this.vxotC
vxotC.album_object=vxotC.rIQYm;
wa_global_photo_album.fullpage_object=false 
if(this.dctOI==1)
{
OkiXr(false)
var IZLbO=document.getElementById(dVcjG);
IZLbO.innerHTML=""
IZLbO.style.display="none" 

WA_exec_delayedCallback(this,this.XIicF)
return vxotC.rIQYm
}
if(this.dctOI==2)
{
vxotC.album_object.sxCjq=this.sxCjq
return vxotC.album_object.MCAAP()
}
}
this.RHgCk=function()
{
if(this.ioQKH())
{
this.MJxoU=false
clearTimeout(this.cpqft)
this.cpqft=false;
}
}
this.onFullScreenKeydown=function(k)
{
if(k==27)
{
this.oTgnK()
return false;
}
BsciL(this.LFSwC,[k])
return false;
}
}
function jMmmH(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 bSiCf=wa_global_photo_album.fullpage_object
var LFSwC=bSiCf.LFSwC
var WtUAn=bSiCf.iLoqV_preview_obj
if(WtUAn.DQudH)
{
var onJXO=html_getLayer(WtUAn.HthiT)
if(onJXO)
{
var scrollVal=-(3*delta)
if(isMSIE())scrollVal*=3
onJXO.scrollTop+=scrollVal
}
}
else
{
if(delta>0) NRseM(LFSwC);
if(delta<0) vBUeZ(LFSwC);
}
}
if(b_default)
if(e.preventDefault)
e.preventDefault();
e.returnValue=!b_default;
}
function OkiXr(eLLMb)
{
if(eLLMb==false)
{
var jBhlD=window;
if(jBhlD.removeEventListener)
jBhlD.removeEventListener('DOMMouseScroll',jMmmH,false);
jBhlD.onmousewheel=document.onmousewheel=null;
}
else
{
var jBhlD=window;
if(jBhlD.addEventListener)
jBhlD.addEventListener('DOMMouseScroll',jMmmH,false);
jBhlD.onmousewheel=document.onmousewheel=jMmmH;
}
}
function RqCcL(STPLI,uBpEc,Jrkar,FWrsd,cJbrt,XcqNb)
{
var sqnDb=""
sqnDb+="(";
sqnDb+=STPLI+";"+uBpEc+";"+Jrkar+";"+FWrsd+";";
sqnDb+=cJbrt+";";
sqnDb+=XcqNb;
sqnDb+=")";
return sqnDb;
}
function WA_photoAlbumAction(LFSwC,bIrLH)
{
var bSiCf=WDpjJ(LFSwC)
var hYVmY=bSiCf.lovVx[bIrLH]
var n_action=hYVmY.n_action
if((n_action=="<")||(n_action=="up"))
{
bSiCf.QEvqt=Math.max(0,bSiCf.QEvqt-1)
jWRWC(LFSwC)
}
if((n_action==">")||(n_action=="down"))
{
bSiCf.QEvqt=Math.min(bSiCf.CVetx_pages-1,bSiCf.QEvqt+1)
jWRWC(LFSwC)
}
if(n_action=="diapo")
{
YiHHt(LFSwC)
}
if(n_action=="+")
{
bSiCf.MCAAP()
}
}
function WA_photoAlbumIncrease(LFSwC,bIrLH)
{
var bSiCf=WDpjJ(LFSwC)
bSiCf.sxCjq=bIrLH
bSiCf.MCAAP()
}
function YiHHt(LFSwC)
{
var bSiCf=WDpjJ(LFSwC)
if(bSiCf.ioQKH()==false)
{
var CVetx_increase=0;
var QBVEj=bSiCf;
while(QBVEj.mOKRA())
{
QBVEj=QBVEj.MCAAP()
CVetx_increase++}
if(CVetx_increase>0)
{
QBVEj.CVetx_decrease_view_when_diaporama_stop=CVetx_increase;
WA_goNextDiaporama(LFSwC)
QBVEj.tcnkk()
return;
}
}
if(bSiCf.ioQKH())
{
vJTCG(LFSwC)
}
else
{
WA_goNextDiaporama(LFSwC)
}
if(bSiCf.rraxd())
{
var hYVmY=bSiCf.lovVx_by_action["diapo"]
hYVmY.draw()
}
}
function vJTCG(LFSwC)
{
var bSiCf=WDpjJ(LFSwC)
if(bSiCf.ioQKH())
{
bSiCf.RHgCk()
if(bSiCf.CVetx_decrease_view_when_diaporama_stop)
{
var QBVEj=bSiCf;
for(var n=0;n<bSiCf.CVetx_decrease_view_when_diaporama_stop;n++)
{
QBVEj=QBVEj.oTgnK() 
}
return;
}
}
if(bSiCf.rraxd())
{
var hYVmY=bSiCf.lovVx_by_action["diapo"]
hYVmY.draw()
}
}
function WA_goNextDiaporama(LFSwC)
{
var YQKKe=kvDRl(LFSwC)
var iqghJ=QaMRp(LFSwC)
var bSiCf=WDpjJ(LFSwC)
var bIrLH=(bSiCf.sxCjq+1)%iqghJ.length;
if(YQKKe.diaporama.random)
{
bIrLH=Math.round((iqghJ.length-1)*Math.random());
}
WA_photoAlbumActionThumb(LFSwC,bIrLH)
bSiCf.cpqft=wa_timeout("WA_goNextDiaporama('"+LFSwC+"')",YQKKe.diaporama.time*1000)
}
function DqDPf(LFSwC,bIrLH)
{
var bSiCf=WDpjJ(LFSwC)
if(bIrLH<0)
{
bSiCf.IQYYf()
return false;
}
if(bIrLH>bSiCf.CVetx_images-1)
{
bSiCf.IQYYf()
return false;
}
WA_photoAlbumActionThumb(LFSwC,bIrLH)
return true;
}
function vBUeZ(LFSwC)
{
var bSiCf=WDpjJ(LFSwC)
if(bSiCf.ioQKH()) return false;
return DqDPf(LFSwC,bSiCf.sxCjq+1)
}
function NRseM(LFSwC)
{
var bSiCf=WDpjJ(LFSwC)
if(bSiCf.ioQKH()) return false;
return DqDPf(LFSwC,bSiCf.sxCjq-1)
}
function WA_clickAlbumPreview(LFSwC)
{
var bSiCf=WDpjJ(LFSwC)
if(bSiCf.fCQKC()) return;
if(bSiCf.ioQKH())
{
vJTCG(LFSwC)
}
var vDbEp=bSiCf.GFmod
if(vDbEp!=-1)
{
if(vDbEp==2)vBUeZ(LFSwC)
if(vDbEp==1)
{
if(bSiCf.cCPKg())
{
bSiCf.oTgnK()
}
else
if(bSiCf.mOKRA())
{
bSiCf.MCAAP()
}
}
if(vDbEp==0)NRseM(LFSwC)
}
}
function WA_mouseoutAlbumPreview(e,LFSwC)
{
var bSiCf=WDpjJ(LFSwC)
bSiCf.DLaFS.setVisible(false)
bSiCf.GFmod=-1;
}
function WA_mousemoveAlbumPreview(e,LFSwC)
{
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 bSiCf=WDpjJ(LFSwC)
var xrfHk=document.getElementById(bSiCf.DLaFS.divId())
var pt=html_findPos(xrfHk.offsetParent)
var x=posx-pt.x+1;
var y=posy-pt.y+1;
var n_pos=-1
var eSarn=false;
var NpudX=0;
var PkDiP=30;
if(bSiCf.frcRX!=true)
if(bSiCf.ioQKH()==false)
{
if((x>0)&&(x<bSiCf.iBWPH_preview.width))
if((y>0)&&(y<bSiCf.iBWPH_preview.height))
{
n_pos=1;
if(x<bSiCf.iBWPH_preview.width*0.3)n_pos=0;
if(x>bSiCf.iBWPH_preview.width*(1-0.3))n_pos=2;
}
if((x<NpudX)||(x>bSiCf.iBWPH_preview.width-NpudX-PkDiP))eSarn=true;
if((y<NpudX)||(y>bSiCf.iBWPH_preview.height-NpudX-PkDiP))eSarn=true;
}
bSiCf.guJVt=new Point(x,y);
bSiCf.GFmod=n_pos;
bSiCf.uEoHT=eSarn;
bSiCf.NdfHY();
}
function jWRWC(LFSwC)
{
var bSiCf=WDpjJ(LFSwC)
var TcRTJ=document.getElementById(bSiCf.xjaTH)
if(!TcRTJ)return;
var BLgQg;
var IIYFw=0;
var size_thumb=bSiCf.XTZbN;
var tBIgA=bSiCf.tBIgA;
var OTuGH=0;
var fuAkD=(size_thumb+2*bSiCf.ncCnQ_thumbnail+tBIgA);
var leISY=bSiCf.CVetx_cols*bSiCf.CVetx_rows;
if(bSiCf.QqAfV)
{
OTuGH=bSiCf.QEvqt*bSiCf.CVetx_cols*fuAkD
}
else
{
OTuGH=bSiCf.QEvqt*bSiCf.CVetx_rows*fuAkD
}
if(bSiCf.QqAfV)
{
BLgQg="scrollLeft"
IIYFw=TcRTJ.scrollLeft
}
else
{
BLgQg="scrollTop"
IIYFw=TcRTJ.scrollTop
}
if(IIYFw==OTuGH)
{
return;
}
if(bSiCf.m_tween_slider)
{
bSiCf.m_tween_slider.stop()
}
var ZcGAj=0.7;
bSiCf.m_tween_slider=new Tween(TcRTJ,BLgQg,Tween.strongEaseOut,IIYFw,OTuGH,ZcGAj);
bSiCf.m_tween_slider.onMotionFinished=VaQWf
bSiCf.m_tween_slider.bSiCf=bSiCf
bSiCf.m_tween_slider.start() 
}
function VaQWf()
{
var bSiCf=this.bSiCf
bSiCf.HUMVa()
}
function GMWRY(LFSwC)
{
return wa_global_photo_album[LFSwC]
}
function WDpjJ(LFSwC)
{
return wa_global_photo_album[LFSwC].album_object
}
function QaMRp(LFSwC)
{
return wa_global_photo_album[LFSwC].def
}
function qEItP(LFSwC)
{
return wa_global_photo_album[LFSwC].src_folder
}
function kvDRl(LFSwC)
{
return wa_global_photo_album[LFSwC].layout
}
function NiBgm(GrZOX)
{
var LFSwC=GrZOX[0]
WA_addHandler(LFSwC,"mousewheel",dIKCl)
WA_addHandler(LFSwC,"keydown",BsciL)
var dVcjG="photo-album-main-"+LFSwC
var vxotC=GMWRY(LFSwC)
var iBWPH=new Rect()
iBWPH.copy(vxotC.size_container) 
var bSiCf=new XnaqJ(LFSwC,vxotC) 
vxotC.album_object=bSiCf;
vxotC.rIQYm=bSiCf 
bSiCf.ibxUK.copy(iBWPH)
bSiCf.gjdvu=vxotC.layout.selector
bSiCf.YQKKe_previewZone=vxotC.layout.preview
bSiCf.rxeKt(dVcjG) 

var bSiCf=WDpjJ(LFSwC)
var UfKvE=document.wa_global_query_info
if(UfKvE)
{
if(LFSwC==UfKvE.m_unid)
{
bSiCf.sxCjq=UfKvE.m_index_item
bSiCf.MCAAP()
return;
}
}
if(bSiCf.fCQKC())
{
YiHHt(LFSwC)
return;
}
}
function WA_registerAlbum(LFSwC)
{
WDpjJ(LFSwC).cNDTx()
}
function BsciL(LFSwC,GrZOX)
{
var sTJxK=GrZOX[0]
if(sTJxK==37) return NRseM(LFSwC);
if(sTJxK==39) return vBUeZ(LFSwC);
return true;
}
function dIKCl(LFSwC,tbVvU)
{
var BArth=tbVvU[0] 
var bSiCf=WDpjJ(LFSwC)
if(bSiCf.iLoqV_preview_obj)
{
var WtUAn=bSiCf.iLoqV_preview_obj
if(WtUAn.DQudH)
{
var onJXO=html_getLayer(WtUAn.HthiT)
onJXO.scrollTop+=-(3*BArth)
return true;
}
}
if(BArth>0)return NRseM(LFSwC);
if(BArth<0)return vBUeZ(LFSwC);
return true;
}
function WA_PhotoAlbum_resizeUI()
{
if(wa_global_photo_album.fullpage_object)
{
var bSiCf=wa_global_photo_album.fullpage_object
if(wa_global_photo_album.kHpMd)
{
clearTimeout(wa_global_photo_album.kHpMd);
}
var iBWPH=new Rect(0,0,getWindowSize().width,getWindowSize().height)
bSiCf.ibxUK.copy(iBWPH)
bSiCf.VpXlj()
wa_global_photo_album.kHpMd=wa_timeout("WA_PhotoAlbum_delayed_resizeUI()",1000)
}
}
function WA_PhotoAlbum_delayed_resizeUI()
{
if(wa_global_photo_album.fullpage_object)
{
wa_global_photo_album.kHpMd=false
var bSiCf=wa_global_photo_album.fullpage_object
bSiCf.EGgJe()
}
}
function WA_loadPhotoAlbums()
{
for(var sTJxK in wa_global_photo_album)
{
var vxotC=wa_global_photo_album[sTJxK]
var qWWUb=Translator.m_lang_for_filename
if(qWWUb.length>0)qWWUb="_"+qWWUb;
WA_loadScript(vxotC.src_folder+'/photo-album-definition'+qWWUb+'.js?v='+vxotC.id_modif,NiBgm,[sTJxK]);
}
}

-->
