<!--
 
function OGogx(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 NLOVc(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 XVigE(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 HERWn=new RGBColor(col)
HERWn.a=0
grad.addColorStop(1,col);grad.addColorStop(0,HERWn.toRGB());
c.fillStyle=grad;
c.beginPath();c.rect(x,y,8,14);c.fill()
c.fillStyle=old_fill
}
function RBAwp(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 EJekO(name,SpJZw,oRmOS)
{
var n=SpJZw.indexOf("%")
if(n>-1)
{
SpJZw=wa_evaluate(SpJZw.replace("%","/100"))
return Math.round(SpJZw*oRmOS)
}
SpJZw=parseFloat(SpJZw)
return Math.round(SpJZw)
}
function OqRZw(lAlih,dZJHU,NhCIO)
{
var x=EJekO("x",lAlih.x,dZJHU)
var y=EJekO("y",lAlih.y,NhCIO)
if(lAlih.x.indexOf("%")==-1)dZJHU=dZJHU-x
if(lAlih.y.indexOf("%")==-1)NhCIO=NhCIO-y 

var lx=EJekO("lx",lAlih.lx,dZJHU)
var ly=EJekO("ly",lAlih.ly,NhCIO)
return new Rect(x,y,lx,ly)
}
function WA_change_tool_button(BYZXl,khhOd,over)
{
var gFCmm=ZKbHt(BYZXl)
if(gFCmm&&gFCmm.dbARD)
{
var mLsvu=gFCmm.dbARD[khhOd]
if(mLsvu)
{
mLsvu.whSMt=over
mLsvu.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=="<")
{
OGogx(c,0,0,lx,false)
}
if(type==">")
{
OGogx(c,0,0,lx,true)
}
if(type=="down")
{
c.rotate(-Math.PI/2);c.translate(-lx,0);
OGogx(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);
OGogx(c,0,0,lx,false);
c.translate(0,ly);c.rotate(-Math.PI/2);
}
if(type=="+")
{
NLOVc(c,0,0,lx,12,4)
}
if(type=="diapo")
{
XVigE(c,0,0,lx,current_col)
}
if(type=="stop")
{
RBAwp(c,0,0,lx,current_col)
}
}
xuBXT.prototype=new Tween();
xuBXT.prototype.constructor=Tween;
xuBXT.superclass=Tween.prototype;
function xuBXT(obj,LQrUv,twsnN,dBcTq,BjbjH)
{
this.targetObject=obj;
this.init(new Object(),'a',LQrUv,twsnN,dBcTq,BjbjH);
this.onMotionChanged=function(evt)
{
var v=evt.target.getPosition();
var gSRYh=this.targetObject;
v=Math.round(v*100)/100
gSRYh.setOpacity(v/100);
}
}
function wRBaS(BYZXl,gMJJK)
{
var gFCmm=ZKbHt(BYZXl)
var bumfm=gFCmm.eMwWl_preview_obj 
gFCmm.urLIg=gMJJK;
bumfm.nDhLX=gMJJK
bumfm.kHSpS() 
}
JJHwO.prototype=new Tween();
JJHwO.prototype.constructor=Tween;
JJHwO.superclass=Tween.prototype;
function JJHwO(obj,LQrUv,twsnN,dBcTq,BjbjH)
{
this.targetObject=obj;
this.init(new Object(),'a',LQrUv,twsnN,dBcTq,BjbjH);
this.onMotionChanged=function(evt)
{
var v=evt.target.getPosition();
var bumfm=this.targetObject;
bumfm.AgOoL=v
bumfm.YfZvq()
}
this.onMotionFinished=function(evt)
{
var bumfm=this.targetObject;
bumfm.setOverflow(bumfm.nDhLX)
}
}
function RKCoj(BYZXl,rAxmX)
{
this.ctEHI=BYZXl
this.rAxmX=rAxmX
this.skPts=this.rAxmX+"comment-text-div"
this.nDhLX=false;
this.UmkGB=false;
this.AgOoL=0;
this.toHtml=function()
{
var jAYDb=""
this.LmiGY=new WA_GraphicElement(this.rAxmX+"-graphic-comment-bg",200,false)
this.LmiGY.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,0,0,'',['rgba(0,0,0,0.6)'],this.shadow(),0,this.opacity())
}
jAYDb+=this.LmiGY.toHtml() 
jAYDb+="<div id='"+this.skPts+"' ";
jAYDb+="onmouseover=\"javascript:_onMouseOnPreviewComment('"+this.ctEHI+"',true)\" ";
jAYDb+="onmouseout=\"javascript:_onMouseOnPreviewComment('"+this.ctEHI+"',false)\" ";
jAYDb+=" style=\"color:#ffffff;margin:2px;text-align:center;overflow:auto;"
jAYDb+="position:absolute;"
jAYDb+="z-index:1250;"
jAYDb+="\">";
jAYDb+="</div>";
return jAYDb
}
this.WWZYV=function()
{
this.LmiGY.registerDynamicCanvas();
}
this.TWdsW=function(McsLd,QlQGg,dZJHU,NhCIO)
{
this.UIpjf=new Rect(McsLd,QlQGg,dZJHU,NhCIO)
}
this.FmSLn=function(McsLd,QlQGg,dZJHU,NhCIO)
{
this.LmiGY.setRect(McsLd,QlQGg,dZJHU,NhCIO)
html_SetGeometry(this.skPts,McsLd,QlQGg,dZJHU,NhCIO)
}
this.pjJgn=function(jAYDb)
{
this.EfOPx=jAYDb;
var lAlih=this.UIpjf
var gSRYh=html_getLayer(this.skPts) 
html_SetSize(gSRYh,lAlih.width,10);
html_writeContent(this.skPts,jAYDb)
this.AXXsl=gSRYh.scrollHeight+4;
this.AXXsl=Math.min(this.AXXsl,lAlih.height*0.8);
}
this.setOverflow=function(TTHYs)
{
var gSRYh=html_getLayer(this.skPts)
var ZqUZR=((TTHYs)?"auto":"hidden")
gSRYh.style.overflow=ZqUZR 
}
this.YfZvq=function()
{
var jAYDb=this.EfOPx;
var lAlih=this.UIpjf
var gSRYh=html_getLayer(this.skPts)
var IECRl=this.AgOoL
var NhCIO=IECRl
this.FmSLn(lAlih.x,lAlih.y+lAlih.height-NhCIO,lAlih.width,NhCIO)
}
this.kHSpS=function()
{
var lAlih=this.UIpjf
if(this.AEMce)
{
this.AEMce.stop()
this.AEMce=false;
}
{
var CPQuc=Math.min(lAlih.height*0.2,this.AXXsl);
CPQuc=Math.min(40,CPQuc);
if((CPQuc<20)&&(this.AXXsl>CPQuc))
{
this.UmkGB=false
}
if(this.nDhLX)CPQuc=this.AXXsl
var IkEVW=this.AgOoL;
var LfBBd=CPQuc;
if(this.UmkGB==false)
{
IkEVW=this.AgOoL;
LfBBd=0;
}
this.setOverflow(false)
this.AEMce=new JJHwO(this,Tween.strongEaseOut,IkEVW,LfBBd,0.5)
this.AEMce.start()
}
}
this.xDGAs=function(TTHYs)
{
this.UmkGB=TTHYs
this.kHSpS() 
this.LmiGY.setVisible(true)
html_SetVisibility(this.skPts,true)
}
}
function WA_photoAlbumActionThumb(BYZXl,khhOd,muMom)
{
var gFCmm=ZKbHt(BYZXl)
if(gFCmm.rJZlL()==false)return 
var MHlQr=gFCmm.QsEXG;
var dmGRY_img=document.getElementById(MHlQr)
if(khhOd==-1) khhOd=0;
var IDsxV=sJxOK(BYZXl)[khhOd]
var gxkaF=gFCmm.uuXti()
var WswPV=gxkaF.border_size 
if(muMom!=true)
if(gFCmm.ITsMl==khhOd)
{
return;
}
if(gFCmm.TvuRr) return;
gFCmm.TvuRr=true
var CPQuc_size=new Size(gFCmm.NrHwg_preview.width-2*WswPV,gFCmm.NrHwg_preview.height-2*WswPV)
var CPQuc_reso=gFCmm.CNRFg_layout.max_img_resolution
var src_folder=vrYnQ(BYZXl)
var oRmOS=new Size(IDsxV.size.w,IDsxV.size.h)
oRmOS.scale(CPQuc_size)
if(CPQuc_reso>0)
{
var CPQuc_size_album=new Size(CPQuc_reso,CPQuc_reso)
oRmOS.scale(CPQuc_size_album)
}
var CsBKb=new Image();
if(isMSIE())
{
CsBKb=document.getElementById(gFCmm.MKVjM) 
CsBKb.width=oRmOS.width
CsBKb.height=oRmOS.height
}
CsBKb.eIeob=0.2
CsBKb.pQgWD=0.1
CsBKb.XDskN_img=khhOd
CsBKb.dAKDx=IDsxV
CsBKb.eMwWl_preview_obj=gFCmm.eMwWl_preview_obj
CsBKb.oDSOm=gFCmm.oDSOm
CsBKb.EulsL=Tween.strongEaseOut
CsBKb.dmGRY_img=dmGRY_img
CsBKb.vviPR=document.getElementById(gFCmm.oDSOm.divId())
CsBKb.gFCmm=gFCmm 
CsBKb.gvFmq=oRmOS;
CsBKb.loaded=false;
CsBKb.onload=function()
{
ohnZe(this,this.dmGRY_img)
}
CsBKb.onerror=function()
{
lZrbX(this,false)
}
CsBKb.onabort=function()
{
lZrbX(this,false)
}
CsBKb.src=src_folder+"/"+IDsxV.th+"?v="+IDsxV.mod;
}
function ohnZe(CsBKb_obj,dmGRY_img)
{
if(isMobileBrowser())
{
var gFCmm=CsBKb_obj.gFCmm
gFCmm.ITsMl=CsBKb_obj.XDskN_img
CsBKb_obj.oDSOm.setOpacity(1);
html_SetOpacity(CsBKb_obj.dmGRY_img,1)
SCkWg(CsBKb_obj,CsBKb_obj.dmGRY_img)
lZrbX(CsBKb_obj,true)
return;
}
var afUsX=new xuBXT(CsBKb_obj.oDSOm,CsBKb_obj.EulsL,100,0,CsBKb_obj.eIeob);
afUsX.CsBKb_obj=CsBKb_obj
afUsX.start()
var swpwL=new OpacityTween(dmGRY_img,CsBKb_obj.EulsL,100,0,CsBKb_obj.eIeob);
swpwL.CsBKb_obj=CsBKb_obj
swpwL.dmGRY_img=dmGRY_img
swpwL.onMotionFinished=PeSXu
swpwL.start()
}
function PeSXu()
{
var CsBKb_obj=this.CsBKb_obj 
var khhOd=CsBKb_obj.XDskN_img
var gFCmm=CsBKb_obj.gFCmm
gFCmm.ITsMl=khhOd 
var BjbjH=0.1
SCkWg(this.CsBKb_obj,this.dmGRY_img)
var WmDIM=new xuBXT(CsBKb_obj.oDSOm,CsBKb_obj.EulsL,0,100,CsBKb_obj.pQgWD);
WmDIM.CsBKb_obj=CsBKb_obj
WmDIM.start()
var hAFCY=new OpacityTween(this.dmGRY_img,this.CsBKb_obj.EulsL,0,100,this.CsBKb_obj.pQgWD);
hAFCY.CsBKb_obj=this.CsBKb_obj
hAFCY.dmGRY_img=this.dmGRY_img
hAFCY.onMotionFinished=cYqnT
hAFCY.start() 
}
function cYqnT()
{
lZrbX(this.CsBKb_obj,true)
}
function lZrbX(CsBKb_obj,MRidL)
{
var khhOd=CsBKb_obj.XDskN_img
var gFCmm=CsBKb_obj.gFCmm
gFCmm.TvuRr=false;
var khhOd=gFCmm.ITsMl 
{
gFCmm.vHDgu=Math.floor(khhOd/(gFCmm.Mnvpm_cols*gFCmm.Mnvpm_rows))
AWPEC(gFCmm.BYZXl)
}
gFCmm.PsReq()
gFCmm.eknoI()
}
function SCkWg(CsBKb_obj,dmGRY_img)
{
var gFCmm=CsBKb_obj.gFCmm
var oRmOS=CsBKb_obj.gvFmq
gFCmm.JUrUC.width=oRmOS.width
gFCmm.JUrUC.height=oRmOS.height
dmGRY_img.width=oRmOS.width;
dmGRY_img.height=oRmOS.height;
dmGRY_img.src=CsBKb_obj.src;
var gxkaF=gFCmm.uuXti()
var fDXvd=new RGBColor(gxkaF.border_col)
var WswPV=gxkaF.border_size
if(fDXvd.a==0) WswPV=0;
var TvRMj=gFCmm.NrHwg_preview
var vKbCJ=gxkaF.shadow;
var oPvjs=0;
if(vKbCJ)oPvjs=6
var x0=Math.round((TvRMj.width-(oRmOS.width+2*WswPV))/2)
var y0=Math.round((TvRMj.height-(oRmOS.height+2*WswPV))/2)
gFCmm.oDSOm.setRect(x0,y0,oRmOS.width+2*WswPV,oRmOS.height+2*WswPV) 
gFCmm.eMwWl_preview_obj.TWdsW(x0+WswPV,y0+WswPV,oRmOS.width,oRmOS.height);
var guBLF=gFCmm.CNRFg_layout
var eMwWl=""
var url=CsBKb_obj.dAKDx.url
if(guBLF.disp_comment)
{
if(guBLF.disp_comment_img_number)
eMwWl+="<b>"+(CsBKb_obj.XDskN_img+1)+"/"+gFCmm.Mnvpm_images+"</b><br>"
if(guBLF.disp_comment_img_fn)
eMwWl+="("+CsBKb_obj.dAKDx.fn+")<br>"
eMwWl+=CsBKb_obj.dAKDx.comment+"<br>" 
}
if(eMwWl.length>0)
{
gFCmm.eMwWl_preview_obj.pjJgn(eMwWl)
gFCmm.eMwWl_preview_obj.xDGAs(true);
}
else
{
gFCmm.eMwWl_preview_obj.xDGAs(false);
}
var tefMg=document.getElementById(gFCmm.tefMg_preview_id)
html_SetPosition(tefMg,WswPV+x0,WswPV+y0)
}
function WA_photoAlbumChangeImageSize(dmGRY_img,oRmOS,nvgjv)
{
var dec=3
dmGRY_img.width=oRmOS
dmGRY_img.height=oRmOS
dmGRY_img.style.borderWidth=nvgjv
}
function WA_photoAlbumThumbOver(dmGRY,BYZXl,khhOd)
{
var gFCmm=ZKbHt(BYZXl)
var IDsxV_def=sJxOK(BYZXl)[khhOd]
var MHlQr=gFCmm.gCaHa(khhOd)
var dmGRY_img=document.getElementById(MHlQr)
dmGRY.gFCmm=gFCmm;
dmGRY.dmGRY_img=dmGRY_img
var dec=2
WA_photoAlbumChangeImageSize(dmGRY_img,gFCmm.RLRor-2*dec,gFCmm.WpmZK_thumbnail+dec)
}
function WA_photoAlbumThumbOut(dmGRY)
{
var dmGRY_img=dmGRY.dmGRY_img;
var gFCmm=dmGRY.gFCmm
WA_photoAlbumChangeImageSize(dmGRY_img,gFCmm.RLRor,gFCmm.WpmZK_thumbnail)
}
function jAGlL(BYZXl,nqjQE)
{
this.BYZXl=BYZXl;
this.nXFQY=25;
this.jxXuf=nqjQE;
this.SQGMU="photo-album-toolbar-"+this.BYZXl
this.hoCHd=("photo-album-scroll-content"+this.BYZXl)
this.NrHwg_selector_slider=null;
this.EDFYa=null;
this.NrHwg_preview=null;
this.Mnvpm_cols=0;
this.Mnvpm_rows=0;
this.kYBjA=new Array()
this.vHDgu=0;
this.Mnvpm_pages=1
this.OpXZu=true;
this.JALiL=false
this.qbArL=40
this.JUrUC=new Size(0,0)
this.EfxXS=false;
this.LoktU=-1;
this.ITsMl=-1;
this.Mnvpm_images=this.jxXuf.def.length
this.YpfTS=false;
this.vOAec=new Rect(0,0,100,100)
this.CNRFg_layout=eVJYi(this.BYZXl)
var CNRFg=this.CNRFg_layout
if(CNRFg.diaporama&&(CNRFg.diaporama.startup))this.YpfTS=true;
this.hBiUh=false;
this.CNRFg_previewZone=false;
this.UPWwp=0;
this.GXPZL=function()
{
if(this==this.jxXuf.album_object) return true;
return false;
}
this.rAxmX=function()
{
return this.BYZXl+this.UPWwp
}
this.PqOQp=function()
{
var CNRFg=eVJYi(BYZXl)
var bJDlC=this.PYGSi();
this.JALiL=bJDlC.nav_has_horz_flow
if(this.JALiL==false)
{
this.kYBjA.push("up")
this.kYBjA.push("down")
}
else
{
this.kYBjA.push("<")
this.kYBjA.push(">")
}
if(this.eXXcj())
{
this.kYBjA.push("+")
}
else
if(this.FfDjd())
{
this.kYBjA.push("-")
}
if(CNRFg.diaporama)
{
this.kYBjA.push("diapo")
}
if((bJDlC.nav_but_orient==5)||(bJDlC.nav_but_orient==3))
{
this.OpXZu=false;
}
var canvas_bg=""
this.katGs=new WA_GraphicElement(this.rAxmX()+"-graphic-selector-bg",50,bJDlC.bg_shadow)
this.katGs.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,1,bJDlC.bg_border_col,[bJDlC.bg_col],bJDlC.bg_shadow,0)
}
canvas_bg+=this.katGs.toHtml() 
this.LmiGY_toolbar=new WA_GraphicElement(this.rAxmX()+"-graphic-toolbar-bg",50,bJDlC.bg_shadow)
this.LmiGY_toolbar.OpXZu=this.OpXZu 
this.LmiGY_toolbar.draw=function()
{
var LgUDO_toolbar=false;
if(this.OpXZu)
{
LgUDO_toolbar=ToIOk(0,0,0,this.rect().height/2,bJDlC.toolbar_bg_col1,bJDlC.toolbar_bg_col2)
}
else
{
LgUDO_toolbar=ToIOk(0,0,this.rect().width/2,0,bJDlC.toolbar_bg_col1,bJDlC.toolbar_bg_col2)
}
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,1,bJDlC.toolbar_border_col,[LgUDO_toolbar],bJDlC.toolbar_shadow,0)
}
canvas_bg+=this.LmiGY_toolbar.toHtml() 
this.dbARD=new Array()
this.dbARD_by_action=new Array()
for(var n=0;n<this.kYBjA.length;n++)
{
var n_action=this.kYBjA[n]
var mLsvu=new WA_GraphicElement(this.rAxmX()+"-graphic-toolbar-but"+n,70,false)
mLsvu.n_action=n_action
mLsvu.gFCmm=this
mLsvu.whSMt=false
mLsvu.nXFQY=this.nXFQY
mLsvu.AeSCj=bJDlC.toolbar_but_col1
mLsvu.aEdIG=bJDlC.toolbar_but_col2
mLsvu.draw=function()
{
var cqvum=this.nXFQY
var VDWAO=this.n_action
if(VDWAO=="diapo")
{
if(this.gFCmm.jEkds())VDWAO="stop"
}
var jbxhm=(this.whSMt)?this.aEdIG:this.AeSCj
WA_toolbar_button(this.canvasId(),cqvum,cqvum,VDWAO,jbxhm,true)
}
this.dbARD.push(mLsvu)
var LCcae_action=n_action
if(LCcae_action=="up")LCcae_action="<"
if(LCcae_action=="down")LCcae_action=">"
this.dbARD_by_action[LCcae_action]=mLsvu
canvas_bg+="<div id='"+mLsvu.divId()+"-href' onclick=\"javascript:WA_photoAlbumAction('"+this.BYZXl+"',"+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.BYZXl+"',"+n+",true)";
canvas_bg+="\" ";
canvas_bg+="onmouseout=\"";
canvas_bg+="WA_change_tool_button('"+this.BYZXl+"',"+n+",false)";
canvas_bg+="\" ";
canvas_bg+=">";
canvas_bg+="</div>";
canvas_bg+=mLsvu.toHtml()
}
canvas_bg+="<div id='"+this.hoCHd+"' style=\"";
canvas_bg+="position:absolute;z-index:100;";
canvas_bg+="overflow:hidden;";
canvas_bg+="\"></div>";
return canvas_bg;
}
this.UmfEs=function()
{
var bJDlC=this.PYGSi();
var r1_rect=this.NrHwg_selector_slider;
var jAYDb="" 
var min_size=Math.min(r1_rect.width,r1_rect.height)
var size_thumb=bJDlC.th_size.size;
if(bJDlC.th_size.percent) size_thumb=Math.round(size_thumb*(min_size)/100);
var image_spacing=Math.max(0,Math.round((bJDlC.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.Mnvpm_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.Mnvpm_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.Mnvpm_images
var nb_pages=(nb_images/(this.Mnvpm_cols*this.Mnvpm_rows));
if(nb_pages>Math.floor(nb_pages)) nb_pages=Math.floor(nb_pages)+1;
this.Mnvpm_pages=nb_pages
this.RLRor=size_thumb;
this.GUTtM=image_spacing;
this.WpmZK_thumbnail=size_border_thumbnail
var n_image=0;
var nb_item_x=this.Mnvpm_cols*nb_pages
var nb_item_y=this.Mnvpm_rows;
var nb_item_per_page=this.Mnvpm_cols*this.Mnvpm_rows 
if(this.JALiL==false)
{
nb_item_x=this.Mnvpm_cols
nb_item_y=this.Mnvpm_rows*nb_pages;
}
jAYDb+="<table border=0 cellpadding=0 cellspacing=0 width=100% height=100% >";
jAYDb+="<tr>"
jAYDb+="<td "
if((this.JALiL==false)||(this.Mnvpm_pages==1))
{
jAYDb+="align=center"
}
jAYDb+=">" 
jAYDb+="<table border=0 cellpadding="+(image_spacing/2)+" cellspacing=0  width=10px>";
for(var QlQGg=0;QlQGg<nb_item_y;QlQGg++)
{
jAYDb+="<tr>" 
for(var McsLd=0;McsLd<nb_item_x;McsLd++)
{
jAYDb+="<td>"
var ind_img=0;
var nx_0=Math.floor(McsLd/this.Mnvpm_cols)
var diff0=McsLd-nx_0*this.Mnvpm_cols;
ind_img=nx_0*nb_item_per_page+(QlQGg*this.Mnvpm_cols)+diff0
if(ind_img<nb_images)
{
var IDsxV=this.jxXuf.def[ind_img]
var TTmXn=this.jxXuf.src_folder+"/th_"+IDsxV.th+"?v="+IDsxV.mod_th
jAYDb+="<a href=\"";
if(this.rJZlL())
{
jAYDb+="javascript:WA_photoAlbumActionThumb('"+BYZXl+"',"+ind_img+")"
}
else
{
jAYDb+="javascript:WA_photoAlbumIncrease('"+BYZXl+"',"+ind_img+")"
}
jAYDb+="\" "
jAYDb+="onmouseover=\"WA_photoAlbumThumbOver(this,'"+BYZXl+"',"+ind_img+")\" "
jAYDb+="onmouseout=\"WA_photoAlbumThumbOut(this)\" "
jAYDb+=">"
jAYDb+="<img id='"+this.gCaHa(ind_img)+"' width="+size_thumb+"px height="+size_thumb+"px src='"+TTmXn+"' ";
jAYDb+="style='";
if(size_border_thumbnail>0)
{
jAYDb+="border-color:"+bJDlC.selector_img_border_color+";";
jAYDb+="border-width:"+size_border_thumbnail+"px;border-style:solid;";
}
jAYDb+="' ";
jAYDb+=">"
jAYDb+="</a>"
n_image++;
}
jAYDb+="</td>"
}
if(this.OpXZu)
if(this.Mnvpm_pages>1)
{
for(var McsLd=0;McsLd<this.Mnvpm_cols;McsLd++)
{
var GUeMV=size_thumb+2*size_border_thumbnail
jAYDb+="<td>"
jAYDb+="<div  style='width:"+(GUeMV)+"px;height:"+GUeMV+"px;'></div>";
jAYDb+="</td>"
}
}
jAYDb+="</tr>"
}
if(this.OpXZu==false)
if(this.Mnvpm_pages>1)
{
for(var QlQGg=0;QlQGg<this.Mnvpm_rows;QlQGg++)
{
jAYDb+="<tr>"
var GUeMV=size_thumb+2*size_border_thumbnail
jAYDb+="<td colspan="+this.Mnvpm_cols+">"
jAYDb+="<div  style='width:"+(GUeMV)+"px;height:"+GUeMV+"px;'></div>";
jAYDb+="</td>"
jAYDb+="</tr>"
}
}
jAYDb+="</table>" 
jAYDb+="</td>"
jAYDb+="</tr>"
jAYDb+="</table>"
return jAYDb;
}
this.gCaHa=function(khhOd)
{
return this.rAxmX()+"-th-img"+khhOd
}
this.KKxYf=function()
{
var gxkaF=this.uuXti();
if(gxkaF==false) return;
var IDsxV=this.jxXuf.def[0]
this.QsEXG="photo-album-preview-img-"+this.rAxmX()
this.MKVjM=this.QsEXG+"-cache"
this.tefMg_preview_id="photo-album-preview-img-div"+this.rAxmX()
this.xsqEv="photo-album-preview-zone"+this.rAxmX()
var jAYDb=""
jAYDb+="<div  id='"+this.xsqEv+"' style=\"";
jAYDb+="position:absolute;z-index:500;";
jAYDb+="\" ";
jAYDb+="onclick=\"WA_clickAlbumPreview('"+this.BYZXl+"')\" ";
jAYDb+="onmousemove=\"javascript:WA_mousemoveAlbumPreview(event,'"+this.BYZXl+"')\" ";
jAYDb+="onmouseout=\"javascript:WA_mouseoutAlbumPreview(event,'"+this.BYZXl+"')\" ";
jAYDb+=">";
jAYDb+="<div style='position:absolute;z-index:450;left:0px;top:0px;";
jAYDb+="width:100%;height:100%;background-color:#000000;";
jAYDb+="filter:alpha(opacity=0);-moz-opacity:0;opacity:0;' "
jAYDb+="></div>"
this.eMwWl_preview_obj=new RKCoj(this.BYZXl,this.rAxmX());
jAYDb+=this.eMwWl_preview_obj.toHtml() 
this.oDSOm=new WA_GraphicElement(this.rAxmX()+"-graphic-img-bg",50,gxkaF.shadow)
this.oDSOm.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,0,'',[gxkaF.border_col],this.shadow(),0,this.opacity())
}
jAYDb+=this.oDSOm.toHtml() 
jAYDb+="<div id='"+this.tefMg_preview_id+"' style=\"";
jAYDb+="position:absolute;z-index:100;";
jAYDb+="left:0px;";
jAYDb+="top:0px;";
jAYDb+="\" ";
jAYDb+=">";
jAYDb+="<img  id='"+this.QsEXG+"' border=0 >";
if(isMSIE())
{
jAYDb+="<img style='position:absolute;left:0px;top:0px;visibility:hidden;' id='"+this.MKVjM+"'>"
}
else
{
jAYDb+="<img style='position:absolute;left:0px;top:0px;display:none;' id='"+this.MKVjM+"'>"
}
jAYDb+="</div>";
this.Wkwtd=new WA_GraphicElement(this.rAxmX()+"-graphic-arrow0",300,true)
this.Wkwtd.setImage("intuisphere.png",new Rect(97,49,46,47))
this.Wkwtd.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,0,'',["#ffffff"],this.shadow(),0,this.opacity(),true)
var dZJHU=Math.round(this.rect().width*0.8);
var NhCIO=Math.round(this.rect().height*0.8);
WA_drawImage(this.canvasId(),this.img_src(),6+(this.rect().width-dZJHU)/2,6+(this.rect().height-NhCIO)/2,dZJHU,NhCIO,this.img_clip(),this.opacity(),false)
}
this.FUlJU=new WA_GraphicElement(this.rAxmX()+"-graphic-arrow1",300,true)
this.FUlJU.setImage("intuisphere.png",new Rect(2,49,46,47))
this.FUlJU.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,0,'',["#ffffff"],this.shadow(),0,this.opacity(),true)
var dZJHU=Math.round(this.rect().width*0.8);
var NhCIO=Math.round(this.rect().height*0.8);
WA_drawImage(this.canvasId(),this.img_src(),6+(this.rect().width-dZJHU)/2,6+(this.rect().height-NhCIO)/2,dZJHU,NhCIO,this.img_clip(),this.opacity(),false)
}
jAYDb+=this.Wkwtd.toHtml()
jAYDb+=this.FUlJU.toHtml() 
this.mLkRq=new WA_GraphicElement(this.rAxmX()+"-graphic-cursor-zoom",400,false)
this.mLkRq.setSize(30,30)
this.mLkRq.setImage("intuisphere.png",new Rect(0,0,48,48))
this.mLkRq.draw=function()
{
WA_drawImage(this.canvasId(),this.img_src(),0,0,this.rect().width,this.rect().height,this.img_clip())
}
jAYDb+=this.mLkRq.toHtml() 
jAYDb+="</div>";
return jAYDb;
}
this.WWZYV=function()
{
if(this.VFaOs())
{
this.katGs.registerDynamicCanvas();
this.LmiGY_toolbar.registerDynamicCanvas();
for(var n=0;n<this.dbARD.length;n++)
{
var mLsvu=this.dbARD[n]
mLsvu.registerDynamicCanvas();
}
}
if(this.rJZlL())
{
this.eMwWl_preview_obj.WWZYV()
this.oDSOm.registerDynamicCanvas();
this.Wkwtd.registerDynamicCanvas();
this.FUlJU.registerDynamicCanvas();
this.mLkRq.registerDynamicCanvas();
this.mLkRq.setVisible(false)
}
if(this.LmiGY_global)
this.LmiGY_global.registerDynamicCanvas();
this.SiMTD()
}
this.jEkds=function()
{
return(this.aHBrT)?true:false;
}
this.wgBvF=function()
{
return(this.vHDgu>0)
}
this.enAHd=function()
{
return(this.vHDgu<this.Mnvpm_pages-1)
}
this.iwKhZ=function()
{
return(this.ITsMl>0);
}
this.SrlTT=function()
{
return(this.ITsMl<this.jxXuf.def.length-1);
}
this.FRRea=function()
{
if(this.VFaOs())
{
var bJDlC=this.PYGSi() 
var dZJHU=this.vOAec.width
var NhCIO=this.vOAec.height
var r0=bJDlC.rect
var r0_rect=OqRZw(r0,dZJHU,NhCIO)
r0_rect.x+=this.vOAec.x
r0_rect.y+=this.vOAec.y
var r1_rect=r0_rect.clone() 
var LuppX_toolbar=r0_rect.clone()
var Mnvpm_buttons=this.kYBjA.length 
var TKhDs=5
var OiNUA=this.nXFQY+TKhDs*2
var GsEHh=(Mnvpm_buttons*this.nXFQY)
if(bJDlC.nav_but_orient==1)
{
r1_rect.y+=OiNUA;
r1_rect.height-=OiNUA;
LuppX_toolbar.x=LuppX_toolbar.x+(LuppX_toolbar.width-GsEHh)/2;
LuppX_toolbar.width=GsEHh
LuppX_toolbar.y+=TKhDs;
LuppX_toolbar.height=this.nXFQY;
}
if(bJDlC.nav_but_orient==5)
{
r1_rect.width-=OiNUA;
LuppX_toolbar.y=LuppX_toolbar.y+(LuppX_toolbar.height-GsEHh)/2;
LuppX_toolbar.height=GsEHh
LuppX_toolbar.x+=r1_rect.width+TKhDs;
LuppX_toolbar.width=this.nXFQY;
}
if(bJDlC.nav_but_orient==7)
{
r1_rect.height-=OiNUA;
LuppX_toolbar.x=LuppX_toolbar.x+(LuppX_toolbar.width-GsEHh)/2;
LuppX_toolbar.width=GsEHh
LuppX_toolbar.y+=r1_rect.height+TKhDs;
LuppX_toolbar.height=this.nXFQY;
}
if(bJDlC.nav_but_orient==3)
{
r1_rect.width-=OiNUA;
r1_rect.x+=OiNUA;
LuppX_toolbar.y=LuppX_toolbar.y+(LuppX_toolbar.height-GsEHh)/2;
LuppX_toolbar.height=GsEHh
LuppX_toolbar.x+=TKhDs;
LuppX_toolbar.width=this.nXFQY;
}
this.NrHwg_selector_slider=r1_rect
this.EDFYa=LuppX_toolbar 
var srZQp=this.NrHwg_selector_slider;
this.katGs.setRect(srZQp.x,srZQp.y,srZQp.width,srZQp.height)
html_SetRect(this.hoCHd,r1_rect) 
var LuppX=this.EDFYa
this.LmiGY_toolbar.setRect(LuppX.x,LuppX.y,LuppX.width,LuppX.height)
var lx_button=this.nXFQY
var ly_button=lx_button
var hrmmA=LuppX_toolbar.x
var QlQGg_but0=LuppX_toolbar.y
for(var n=0;n<this.dbARD.length;n++)
{
var mLsvu=this.dbARD[n]
var fGaYY=hrmmA
var QlQGg_but=QlQGg_but0
if(this.OpXZu)
{
fGaYY+=n*lx_button;
}
else
{
QlQGg_but+=n*ly_button;
}
mLsvu.setRect(fGaYY,QlQGg_but,lx_button,ly_button)
html_SetGeometry(mLsvu.divId()+"-href",fGaYY,QlQGg_but,lx_button,ly_button)
}
var dmGRY_selector=document.getElementById(this.hoCHd)
if(dmGRY_selector)
{
dmGRY_selector.innerHTML=this.UmfEs();
}
this.eknoI()
}
}
this.eXXcj=function()
{
if((this.UPWwp==1)&&(this.VFaOs()==true)) return true;
if((this.UPWwp==0)&&(this.CNRFg_layout.has_full_page_config)) return true;
return false;
}
this.FfDjd=function()
{
if(this.UPWwp==1) return true;
if(this.UPWwp==2) return true;
return false;
}
this.CgKKi=function()
{
return this.YpfTS;
}
this.PYGSi=function()
{
return this.hBiUh;
}
this.uuXti=function()
{
return this.CNRFg_previewZone;
}
this.VFaOs=function()
{
if(this.PYGSi()) return true;
return false;
}
this.rJZlL=function()
{
if(this.uuXti()) return true;
return false;
}
this.eknoI=function()
{
if(this.VFaOs()==false)return
var ATPbC=this.dbARD_by_action["<"]
ATPbC.setVisible(this.wgBvF())
var DWcch=this.dbARD_by_action[">"]
DWcch.setVisible(this.enAHd())
}
this.PsReq=function()
{
var gxkaF=this.uuXti();
var dZJHU=this.vOAec.width
var NhCIO=this.vOAec.height
var srZQp=gxkaF.rect
var srZQp_rect=OqRZw(srZQp,dZJHU,NhCIO)
if(this.UPWwp==2)
{
srZQp_rect=new Rect(0,0,dZJHU,NhCIO)
}
srZQp_rect.x+=this.vOAec.x
srZQp_rect.y+=this.vOAec.y 

if((srZQp.x=="0%")&&(srZQp.y=="0%")&&(srZQp.lx=="100%")&&(srZQp.ly=="100%"))
{
var dec=8;
srZQp_rect.x+=dec
srZQp_rect.y+=dec
srZQp_rect.width-=2*dec
srZQp_rect.height-=2*dec 
}
var LuppX_rect=srZQp_rect.clone()
this.NrHwg_preview=LuppX_rect
html_SetRect(this.xsqEv,this.NrHwg_preview)
this.Vxtdm()
this.JmvQb()
}
this.sMXri=function()
{
if(this.jEkds()) return;
if(this.rJZlL()==false)return;
var EulsL=Tween.regularEaseOut
var BjbjH=0.3
if((!this.DbWFT)||(this.DbWFT.isRunning()==false))
{
if(this.DbWFT)this.DbWFT.stop()
this.DbWFT=new xuBXT(this.Wkwtd,EulsL,0,100,BjbjH)
this.DbWFT.onMotionFinished=this.ffusN
this.DbWFT.m_count=0
this.DbWFT.start()
}
if((!this.ecZLJ)||(this.ecZLJ.isRunning()==false))
{
if(this.ecZLJ)this.ecZLJ.stop()
this.ecZLJ=new xuBXT(this.FUlJU,EulsL,0,100,BjbjH)
this.ecZLJ.onMotionFinished=this.ffusN
this.ecZLJ.m_count=0
this.ecZLJ.start()
}
}
this.ffusN=function()
{
if(this.m_count>=3)
{
return;
}
this.yoyo()
this.m_count++}
this.Vxtdm=function()
{
if(this.GXPZL()==false)return;
if(this.rJZlL()==false)return
if(isMobileBrowser())return
var Shwbg=30
var gFCmm=this;
var lKPCY=gFCmm.osXqA
var n_pos=gFCmm.LoktU;
if((n_pos!=-1)&&(gFCmm.EfxXS==false))
{
var wQdnf=true;
if(n_pos==0)
{
if(gFCmm.iwKhZ()==false)wQdnf=false;
gFCmm.mLkRq.setImage("intuisphere.png",new Rect(97,49,46,47))
}
else
if(n_pos==1)
{
if(gFCmm.FfDjd())
{
gFCmm.mLkRq.setImage("intuisphere.png",new Rect(48,0,48,48))
}
else
if(gFCmm.eXXcj())
{
gFCmm.mLkRq.setImage("intuisphere.png",new Rect(0,0,48,48))
}
else
{
wQdnf=false;
}
}
else
if(n_pos==2)
{
if(gFCmm.SrlTT()==false)wQdnf=false;
gFCmm.mLkRq.setImage("intuisphere.png",new Rect(0,49,46,47))
}
gFCmm.mLkRq.setPosition(lKPCY.x,lKPCY.y,Shwbg,Shwbg);
gFCmm.mLkRq.setVisible(wQdnf)
}
else
{
gFCmm.mLkRq.setVisible(false)
}
}
this.JmvQb=function()
{
if(this.rJZlL()==false)return
if((this.jEkds()==false)&&(this.JUrUC.width>0))
{
var qbArL=40
var x_arrow0=(this.NrHwg_preview.width-this.JUrUC.width)/2
var x_arrow1=(x_arrow0+this.JUrUC.width-qbArL)
var y_arrow0=(this.NrHwg_preview.height-this.JUrUC.height)/2+(this.JUrUC.height-qbArL)/2 
this.Wkwtd.setRect(x_arrow0,y_arrow0,qbArL,qbArL)
this.FUlJU.setRect(x_arrow1,y_arrow0,qbArL,qbArL)
this.Wkwtd.setVisible(this.iwKhZ())
this.FUlJU.setVisible(this.SrlTT())
}
else
{
this.Wkwtd.setVisible(false)
this.FUlJU.setVisible(false)
}
this.Wkwtd.setOpacity(0)
this.FUlJU.setOpacity(0)
}
this.SiMTD=function()
{
if(this.rJZlL())
{
this.PsReq()
var khhOd=this.ITsMl 
WA_photoAlbumActionThumb(this.BYZXl,khhOd,true)
this.PsReq()
}
this.FRRea()
if(this.LmiGY_global)
{
this.LmiGY_global.setRect(0,0,this.vOAec.width,this.vOAec.height);
}
if(this.ZePqa)
{
html_SetGeometry(this.ZePqa,0,0,this.vOAec.width,this.vOAec.height)
}
}
this.efYdH=function()
{
if(this.rJZlL())
{
WA_photoAlbumActionThumb(this.BYZXl,this.ITsMl,true)
}
}
this.xdtBs=function(FTgEv)
{
var jAYDb=""
if(this.VFaOs())
{
jAYDb+=this.PqOQp();
}
if(this.rJZlL())
{
jAYDb+=this.KKxYf();
};
if((this.UPWwp==1)||(this.UPWwp==2))
{
if(this.CNRFg_layout.bg_fullpage_img.length>0)
{
this.ZePqa=this.rAxmX()+"-graphic-fullpage-bg";
jAYDb+="<div id='"+this.ZePqa+"' style=\"";
jAYDb+="position:absolute;z-index:0;";
if(this.CNRFg_layout.bg_fullpage_img_type==0)
{
jAYDb+="background-image:url('"+this.CNRFg_layout.bg_fullpage_img+"');";
jAYDb+="background-repeat: repeat;";
}
jAYDb+="\" ";
jAYDb+=">";
if(this.CNRFg_layout.bg_fullpage_img_type==1)
{
jAYDb+="<img src='"+this.CNRFg_layout.bg_fullpage_img+"' width=100% height=100% border=0 >";
}
jAYDb+="</div>";
}
else
{
var LgUDO=this.CNRFg_layout.bg_fullpage_grad
this.LmiGY_global=new WA_GraphicElement(this.rAxmX()+"-graphic-global-bg",0,false)
this.LmiGY_global.LgUDO=LgUDO
this.LmiGY_global.draw=function()
{
var LgUDO=this.LgUDO
var LgUDO_bg=false
if(LgUDO.has_gradient)
{
var dZJHU=this.rect().width
var NhCIO=this.rect().height
var xg1=LgUDO.pt1.x*dZJHU/100
var yg1=LgUDO.pt1.y*NhCIO/100
var xg2=LgUDO.pt2.x*dZJHU/100
var yg2=LgUDO.pt2.y*NhCIO/100
LgUDO_bg=ToIOk(xg1,yg1,xg2,yg2,LgUDO.col1,LgUDO.col2)
}
else
{
LgUDO_bg=LgUDO.col1
}
WA_bg(this.canvasId(),this.rect().width,this.rect().height,0,0,'',[LgUDO_bg],false,0,1)
}
jAYDb+=this.LmiGY_global.toHtml();
}
}
var QDBlD=document.getElementById(FTgEv);
QDBlD.innerHTML=jAYDb
QDBlD.style.display="block"
if(navigator.userAgent.match(/opera/i))
{
wa_timeout("WA_registerAlbum('"+this.BYZXl+"') ",0)
}
else
{
WA_registerAlbum(BYZXl)
}
if(this.CgKKi()==false)
{
this.sMXri()
}
}
this.CaQlU=function()
{
var DPQWI="wa-dialog-container"
if(this.eXXcj()==false) return;
if(this.UPWwp==0)
if(this.CNRFg_layout.plugin_fullscreen_url.length>0)
{
window.open(this.CNRFg_layout.plugin_fullscreen_url)
return;
}
this.LoktU=-1;
this.Vxtdm()
var jxXuf=this.jxXuf
var NrHwg=new Rect(0,0,getWindowSize().width,getWindowSize().height)
var gFCmm=new jAGlL(BYZXl,jxXuf)
gFCmm.ITsMl=this.ITsMl
if(this.UPWwp==0)
{
gFCmm.UPWwp=1
}
else
if(this.UPWwp==1)
{
gFCmm.UPWwp=2
}
jxXuf.album_object=gFCmm;
gFCmm.vOAec.copy(NrHwg)
gFCmm.hBiUh=jxXuf.layout.selector_fullpage
if(gFCmm.UPWwp==2)
{
gFCmm.hBiUh=false
}
gFCmm.CNRFg_previewZone=jxXuf.layout.preview_fullpage
wa_global_photo_album.fullpage_object=gFCmm
gFCmm.xdtBs(DPQWI)
return gFCmm
}
this.XNHjL=function()
{
if(this.FfDjd()==false) return;
this.ccLjQ()
var DPQWI="wa-dialog-container"
var jxXuf=this.jxXuf
jxXuf.album_object=jxXuf.uTdou;
wa_global_photo_album.fullpage_object=false
if(this.UPWwp==1)
{
var QDBlD=document.getElementById(DPQWI);
QDBlD.innerHTML=""
QDBlD.style.display="none"
WA_photoAlbumActionThumb(this.BYZXl,this.ITsMl,true)
return jxXuf.uTdou
}
if(this.UPWwp==2)
{
jxXuf.album_object.ITsMl=this.ITsMl
return jxXuf.album_object.CaQlU()
}
}
this.ccLjQ=function()
{
if(this.jEkds())
{
this.YpfTS=false
clearTimeout(this.aHBrT)
this.aHBrT=false;
}
}
this.onFullScreenKeydown=function(k)
{
if(k==27)
{
this.XNHjL()
return false;
}
xCvhW(this.BYZXl,[k])
return false;
}
}
function ToIOk(LMuhc,bNtaf,dXvuL,diiJM,SwNub,HxITc)
{
var iRdSU=""
iRdSU+="(";
iRdSU+=LMuhc+";"+bNtaf+";"+dXvuL+";"+diiJM+";";
iRdSU+=SwNub+";";
iRdSU+=HxITc;
iRdSU+=")";
return iRdSU;
}
function WA_photoAlbumAction(BYZXl,khhOd)
{
var gFCmm=ZKbHt(BYZXl)
var mLsvu=gFCmm.dbARD[khhOd]
var n_action=mLsvu.n_action
if((n_action=="<")||(n_action=="up"))
{
gFCmm.vHDgu=Math.max(0,gFCmm.vHDgu-1)
AWPEC(BYZXl)
}
if((n_action==">")||(n_action=="down"))
{
gFCmm.vHDgu=Math.min(gFCmm.Mnvpm_pages-1,gFCmm.vHDgu+1)
AWPEC(BYZXl)
}
if(n_action=="diapo")
{
BAQDl(BYZXl)
}
if(n_action=="+")
{
gFCmm.CaQlU()
}
}
function WA_photoAlbumIncrease(BYZXl,khhOd)
{
var gFCmm=ZKbHt(BYZXl)
gFCmm.ITsMl=khhOd
gFCmm.CaQlU()
}
function BAQDl(BYZXl)
{
var gFCmm=ZKbHt(BYZXl)
if(gFCmm.jEkds()==false)
{
var Mnvpm_increase=0;
var bPguX=gFCmm;
while(bPguX.eXXcj())
{
bPguX=bPguX.CaQlU()
Mnvpm_increase++}
if(Mnvpm_increase>0)
{
bPguX.Mnvpm_decrease_view_when_diaporama_stop=Mnvpm_increase;
WA_goNextDiaporama(BYZXl)
bPguX.JmvQb()
return;
}
}
if(gFCmm.jEkds())
{
AMifV(BYZXl)
}
else
{
WA_goNextDiaporama(BYZXl)
}
if(gFCmm.VFaOs())
{
var mLsvu=gFCmm.dbARD_by_action["diapo"]
mLsvu.draw()
}
}
function AMifV(BYZXl)
{
var gFCmm=ZKbHt(BYZXl)
if(gFCmm.jEkds())
{
gFCmm.ccLjQ()
if(gFCmm.Mnvpm_decrease_view_when_diaporama_stop)
{
var bPguX=gFCmm;
for(var n=0;n<gFCmm.Mnvpm_decrease_view_when_diaporama_stop;n++)
{
bPguX=bPguX.XNHjL() 
}
return;
}
}
if(gFCmm.VFaOs())
{
var mLsvu=gFCmm.dbARD_by_action["diapo"]
mLsvu.draw()
}
}
function WA_goNextDiaporama(BYZXl)
{
var CNRFg=eVJYi(BYZXl)
var NSkYn=sJxOK(BYZXl)
var gFCmm=ZKbHt(BYZXl)
var khhOd=(gFCmm.ITsMl+1)%NSkYn.length;
if(CNRFg.diaporama.random)
{
khhOd=Math.round((NSkYn.length-1)*Math.random());
}
WA_photoAlbumActionThumb(BYZXl,khhOd)
gFCmm.aHBrT=wa_timeout("WA_goNextDiaporama('"+BYZXl+"')",CNRFg.diaporama.time*1000)
}
function iOWbi(BYZXl,khhOd)
{
var gFCmm=ZKbHt(BYZXl)
if(khhOd<0)
{
gFCmm.sMXri()
return false;
}
if(khhOd>gFCmm.Mnvpm_images-1)
{
gFCmm.sMXri()
return false;
}
WA_photoAlbumActionThumb(BYZXl,khhOd)
return true;
}
function iqcSQ(BYZXl)
{
var gFCmm=ZKbHt(BYZXl)
if(gFCmm.jEkds()) return false;
return iOWbi(BYZXl,gFCmm.ITsMl+1)
}
function htnXl(BYZXl)
{
var gFCmm=ZKbHt(BYZXl)
if(gFCmm.jEkds()) return false;
return iOWbi(BYZXl,gFCmm.ITsMl-1)
}
function WA_clickAlbumPreview(BYZXl)
{
var gFCmm=ZKbHt(BYZXl)
if(gFCmm.CgKKi()) return;
if(gFCmm.jEkds())
{
AMifV(BYZXl)
}
var xUdBK=gFCmm.LoktU
if(xUdBK!=-1)
{
if(xUdBK==2)iqcSQ(BYZXl)
if(xUdBK==1)
{
if(gFCmm.FfDjd())
{
gFCmm.XNHjL()
}
else
if(gFCmm.eXXcj())
{
gFCmm.CaQlU()
}
}
if(xUdBK==0)htnXl(BYZXl)
}
}
function WA_mouseoutAlbumPreview(e,BYZXl)
{
var gFCmm=ZKbHt(BYZXl)
gFCmm.mLkRq.setVisible(false)
gFCmm.LoktU=-1;
}
function WA_mousemoveAlbumPreview(e,BYZXl)
{
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 gFCmm=ZKbHt(BYZXl)
var ZeMLh=document.getElementById(gFCmm.mLkRq.divId())
var pt=html_findPos(ZeMLh.offsetParent)
var x=posx-pt.x+1;
var y=posy-pt.y+1;
var n_pos=-1
var wDcvb=false;
var xKvdj=0;
var DHXmo=30;
if(gFCmm.urLIg!=true)
if(gFCmm.jEkds()==false)
{
if((x>0)&&(x<gFCmm.NrHwg_preview.width))
if((y>0)&&(y<gFCmm.NrHwg_preview.height))
{
n_pos=1;
if(x<gFCmm.NrHwg_preview.width*0.3)n_pos=0;
if(x>gFCmm.NrHwg_preview.width*(1-0.3))n_pos=2;
}
if((x<xKvdj)||(x>gFCmm.NrHwg_preview.width-xKvdj-DHXmo))wDcvb=true;
if((y<xKvdj)||(y>gFCmm.NrHwg_preview.height-xKvdj-DHXmo))wDcvb=true;
}
gFCmm.osXqA=new Point(x,y);
gFCmm.LoktU=n_pos;
gFCmm.EfxXS=wDcvb;
gFCmm.Vxtdm();
}
function AWPEC(BYZXl)
{
var gFCmm=ZKbHt(BYZXl)
var dmGRY=document.getElementById(gFCmm.hoCHd)
if(!dmGRY)return;
var IPbfw;
var TgoKq=0;
var size_thumb=gFCmm.RLRor;
var GUTtM=gFCmm.GUTtM;
var CJrDr=0;
var xUgZL=(size_thumb+2*gFCmm.WpmZK_thumbnail+GUTtM);
var tZaiw=gFCmm.Mnvpm_cols*gFCmm.Mnvpm_rows;
if(gFCmm.JALiL)
{
CJrDr=gFCmm.vHDgu*gFCmm.Mnvpm_cols*xUgZL
}
else
{
CJrDr=gFCmm.vHDgu*gFCmm.Mnvpm_rows*xUgZL
}
if(gFCmm.JALiL)
{
IPbfw="scrollLeft"
TgoKq=dmGRY.scrollLeft
}
else
{
IPbfw="scrollTop"
TgoKq=dmGRY.scrollTop
}
if(TgoKq==CJrDr)
{
return;
}
if(gFCmm.m_tween_slider)
{
gFCmm.m_tween_slider.stop()
}
var BjbjH=0.7;
gFCmm.m_tween_slider=new Tween(dmGRY,IPbfw,Tween.strongEaseOut,TgoKq,CJrDr,BjbjH);
gFCmm.m_tween_slider.onMotionFinished=sQAmB
gFCmm.m_tween_slider.gFCmm=gFCmm
gFCmm.m_tween_slider.start() 
}
function sQAmB()
{
var gFCmm=this.gFCmm
gFCmm.eknoI()
}
function MmaqL(BYZXl)
{
return wa_global_photo_album[BYZXl]
}
function ZKbHt(BYZXl)
{
return wa_global_photo_album[BYZXl].album_object
}
function sJxOK(BYZXl)
{
return wa_global_photo_album[BYZXl].def
}
function vrYnQ(BYZXl)
{
return wa_global_photo_album[BYZXl].src_folder
}
function eVJYi(BYZXl)
{
return wa_global_photo_album[BYZXl].layout
}
function XCNRA(BkMsU)
{
var BYZXl=BkMsU[0]
WA_addHandler(BYZXl,"mousewheel",sdjJb)
WA_addHandler(BYZXl,"keydown",xCvhW)
var DPQWI="photo-album-main-"+BYZXl
var jxXuf=MmaqL(BYZXl)
var NrHwg=new Rect()
NrHwg.copy(jxXuf.size_container) 
var gFCmm=new jAGlL(BYZXl,jxXuf) 
jxXuf.album_object=gFCmm;
jxXuf.uTdou=gFCmm 
gFCmm.vOAec.copy(NrHwg)
gFCmm.hBiUh=jxXuf.layout.selector
gFCmm.CNRFg_previewZone=jxXuf.layout.preview
gFCmm.xdtBs(DPQWI) 

var gFCmm=ZKbHt(BYZXl)
var rmjLr=document.wa_global_query_info
if(rmjLr)
{
if(BYZXl==rmjLr.m_unid)
{
gFCmm.ITsMl=rmjLr.m_index_item
gFCmm.CaQlU()
return;
}
}
if(gFCmm.CgKKi())
{
BAQDl(BYZXl)
return;
}
}
function WA_registerAlbum(BYZXl)
{
ZKbHt(BYZXl).WWZYV()
}
function xCvhW(BYZXl,BkMsU)
{
var QAtKn=BkMsU[0]
if(QAtKn==37) return htnXl(BYZXl);
if(QAtKn==39) return iqcSQ(BYZXl);
return true;
}
function sdjJb(BYZXl,wgRmm)
{
var GcbnC=wgRmm[0] 
if(GcbnC>0)return htnXl(BYZXl);
if(GcbnC<0)return iqcSQ(BYZXl);
return true;
}
function WA_PhotoAlbum_resizeUI()
{
if(wa_global_photo_album.fullpage_object)
{
var gFCmm=wa_global_photo_album.fullpage_object
if(wa_global_photo_album.BdfOo)
{
clearTimeout(wa_global_photo_album.BdfOo);
}
var NrHwg=new Rect(0,0,getWindowSize().width,getWindowSize().height)
gFCmm.vOAec.copy(NrHwg)
gFCmm.SiMTD()
wa_global_photo_album.BdfOo=wa_timeout("WA_PhotoAlbum_delayed_resizeUI()",1000)
}
}
function WA_PhotoAlbum_delayed_resizeUI()
{
if(wa_global_photo_album.fullpage_object)
{
wa_global_photo_album.BdfOo=false
var gFCmm=wa_global_photo_album.fullpage_object
gFCmm.efYdH()
}
}
function WA_loadPhotoAlbums()
{
for(var QAtKn in wa_global_photo_album)
{
var jxXuf=wa_global_photo_album[QAtKn]
var eSCts=Translator.m_lang_for_filename
if(eSCts.length>0)eSCts="_"+eSCts;
WA_loadScript(jxXuf.src_folder+'/photo-album-definition'+eSCts+'.js?v='+jxXuf.id_modif,XCNRA,[QAtKn]);
}
}

-->
