<!--
 
function JscFF(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 dLiIK(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 eTqTh(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 IbRku=new RGBColor(col)
IbRku.a=0
grad.addColorStop(1,col);grad.addColorStop(0,IbRku.toRGB());
c.fillStyle=grad;
c.beginPath();c.rect(x,y,8,14);c.fill()
c.fillStyle=old_fill
}
function pvkSH(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 gpLer(name,SGJwS,oGxkK)
{
var n=SGJwS.indexOf("%")
if(n>-1)
{
SGJwS=wa_evaluate(SGJwS.replace("%","/100"))
return Math.round(SGJwS*oGxkK)
}
SGJwS=parseFloat(SGJwS)
return Math.round(SGJwS)
}
function oNJSQ(xWsDW,fbguX,nLlLB)
{
var x=gpLer("x",xWsDW.x,fbguX)
var y=gpLer("y",xWsDW.y,nLlLB)
if(xWsDW.x.indexOf("%")==-1)fbguX=fbguX-x
if(xWsDW.y.indexOf("%")==-1)nLlLB=nLlLB-y 

var lx=gpLer("lx",xWsDW.lx,fbguX)
var ly=gpLer("ly",xWsDW.ly,nLlLB)
return new Rect(x,y,lx,ly)
}
function WA_change_tool_button(VemIV,NYvUG,over)
{
var SnpNo=kuucf(VemIV)
if(SnpNo&&SnpNo.dQiMu)
{
var tQNTJ=SnpNo.dQiMu[NYvUG]
if(tQNTJ)
{
tQNTJ.qjpOo=over
tQNTJ.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=="<")
{
JscFF(c,0,0,lx,false)
}
if(type==">")
{
JscFF(c,0,0,lx,true)
}
if(type=="down")
{
c.rotate(-Math.PI/2);c.translate(-lx,0);
JscFF(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);
JscFF(c,0,0,lx,false);
c.translate(0,ly);c.rotate(-Math.PI/2);
}
if(type=="+")
{
dLiIK(c,0,0,lx,12,4)
}
if(type=="diapo")
{
eTqTh(c,0,0,lx,current_col)
}
if(type=="stop")
{
pvkSH(c,0,0,lx,current_col)
}
}
HeMuJ.prototype=new Tween();
HeMuJ.prototype.constructor=Tween;
HeMuJ.superclass=Tween.prototype;
function HeMuJ(obj,jlvxO,LpxvR,dMnXk,ApvVm)
{
this.targetObject=obj;
this.init(new Object(),'a',jlvxO,LpxvR,dMnXk,ApvVm);
this.onMotionChanged=function(evt)
{
var v=evt.target.getPosition();
var reJJa=this.targetObject;
v=Math.round(v*100)/100
reJJa.setOpacity(v/100);
}
}
function onMouseOnPreviewComment(VemIV,xhWHr,qsbuR)
{
var SnpNo=kuucf(VemIV)
var joQPU=SnpNo.mWxmX_preview_obj 
var old=SnpNo.WDAUp
SnpNo.WDAUp=xhWHr;
joQPU.dEboV=xhWHr
if(SnpNo.WDAUp)
SnpNo.qjRWq=-1;

if(qsbuR)
wa_timeout(Delegate.create(joQPU,joQPU.DSDOk),200);
else
wa_timeout(Delegate.create(joQPU,joQPU.AYTsI),200);
}
fwNIw.prototype=new Tween();
fwNIw.prototype.constructor=Tween;
fwNIw.superclass=Tween.prototype;
function fwNIw(obj,jlvxO,LpxvR,dMnXk,ApvVm)
{
this.targetObject=obj;
this.init(new Object(),'a',jlvxO,LpxvR,dMnXk,ApvVm);
this.onMotionChanged=function(evt)
{
var v=evt.target.getPosition();
var joQPU=this.targetObject;
joQPU.CHFmg=v
joQPU.PQPIU()
}
this.onMotionFinished=function(evt)
{
var joQPU=this.targetObject;
if(joQPU.Fxumj==false)
{
joQPU.xAZZl.setVisible(false)
html_SetVisibility(joQPU.Ywhxj,false)
}
joQPU.setOverflow(joQPU.dEboV)
}
}
function KsHuA(VemIV,XHGhw)
{
this.neclH=VemIV
this.XHGhw=XHGhw
this.Ywhxj=this.XHGhw+"comment-text-div"
this.dEboV=false;
this.Fxumj=false;
this.CHFmg=0;
this.toHtml=function()
{
var Vxeef=""
this.xAZZl=new WA_GraphicElement(this.XHGhw+"-graphic-comment-bg",500,false)
this.xAZZl.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())
}
Vxeef+=this.xAZZl.toHtml() 
Vxeef+="<div id='"+this.Ywhxj+"' ";
Vxeef+="onmouseover=\"javascript:onMouseOnPreviewComment('"+this.neclH+"',true)\" ";
Vxeef+="onmouseout=\"javascript:onMouseOnPreviewComment('"+this.neclH+"',false)\" ";
Vxeef+=" style=\"font-family:Arial;font-size:13px;color:#ffffff;margin:2px;text-align:center;"
Vxeef+="overflow:auto;visibility:hidden;"
Vxeef+="position:absolute;"
Vxeef+="z-index:5250;"
Vxeef+="\">";
Vxeef+="</div>";
return Vxeef
}
this.gHLoN=function()
{
this.xAZZl.registerDynamicCanvas();
}
this.ZPcKt=function(ADmON,mRTkA,fbguX,nLlLB)
{
this.CxIkY=new Rect(ADmON,mRTkA,fbguX,nLlLB)
this.KRsVF(ADmON,mRTkA,fbguX,nLlLB)
}
this.KRsVF=function(ADmON,mRTkA,fbguX,nLlLB)
{
if(nLlLB<=0)
{
this.xAZZl.setVisible(false)
html_SetVisibility(this.Ywhxj,false)
return;
}
this.xAZZl.setRect(ADmON,mRTkA,fbguX,nLlLB)
html_SetGeometry(this.Ywhxj,ADmON,mRTkA,fbguX,nLlLB)
}
this.setOverflow=function(TlHDA)
{
var reJJa=html_getLayer(this.Ywhxj)
var UWMsI=((TlHDA)?"auto":"hidden")
reJJa.style.overflow=UWMsI 
}
this.dgDBj=function()
{
this.oZnoa=true
wa_timeout(Delegate.create(this,this.KUgPY),300);
}
this.KUgPY=function()
{
if(this.oZnoa!=true)return;
this.oZnoa=false
this.CDuHH("chargement en cours...")
}
this.CDuHH=function(Vxeef)
{
this.qJrsa=Vxeef
this.vqimL(Vxeef)
}
this.BmfQB=function(Vxeef)
{
this.oZnoa=false
this.EbEiU=0;
this.Fxumj=true
this.vqimL(Vxeef)
}
this.vqimL=function(Vxeef)
{
this.qJrsa=Vxeef
var xWsDW=this.CxIkY
if(!xWsDW)return;
var reJJa=html_getLayer(this.Ywhxj)
reJJa.style.overflow="hidden"
this.KRsVF(xWsDW.x,xWsDW.y+xWsDW.height-1,xWsDW.width,1)
html_writeContent(this.Ywhxj,this.qJrsa)
if(isMSIE())
{
WA_exec_delayedCallback(this,this.FgUAQ)
}
else
{
this.FgUAQ()
}
}
this.FgUAQ=function()
{
var xWsDW=this.CxIkY
var reJJa=html_getLayer(this.Ywhxj)
this.EbEiU=reJJa.scrollHeight+4;
this.EbEiU=Math.min(this.EbEiU,xWsDW.height*0.8);
this.CHFmg=0
this.DSDOk()
}
this.PQPIU=function()
{
var Vxeef=this.qJrsa;
var xWsDW=this.CxIkY
var reJJa=html_getLayer(this.Ywhxj)
var XHfhi=this.CHFmg
var nLlLB=XHfhi
this.KRsVF(xWsDW.x,xWsDW.y+xWsDW.height-nLlLB,xWsDW.width,nLlLB)
WA_exec_delayedCallback(this,this.okqlT)
}
this.DSDOk=function()
{
this.AOUOO(true)
}
this.AYTsI=function()
{
this.AOUOO(false)
}
this.AOUOO=function(Aubhu)
{
var xWsDW=this.CxIkY
if(this.gjfQj)
{
this.gjfQj.stop()
this.gjfQj=false;
}
var iaxOp=Math.min(xWsDW.height*0.2,this.EbEiU);
iaxOp=Math.min(40,iaxOp);
if((iaxOp<20)&&(this.EbEiU>iaxOp))
{
this.Fxumj=false
}
if(this.dEboV)iaxOp=this.EbEiU
var BQetY=this.CHFmg;
var dIAKk=iaxOp;
if(this.Fxumj==false)
{
BQetY=this.CHFmg;
dIAKk=0;
}
if(Aubhu)
{
this.setOverflow(false)
}
if(this.dEboV!=true)
{
var reJJa=html_getLayer(this.Ywhxj)
reJJa.scrollTop=0
}
this.gjfQj=new fwNIw(this,Tween.strongEaseOut,BQetY,dIAKk,0.5)
this.gjfQj.start()
}
this.okqlT=function()
{
this.xAZZl.setVisible(this.Fxumj)
html_SetVisibility(this.Ywhxj,this.Fxumj)
}
}
function WA_photoAlbumActionThumb(VemIV,NYvUG,NWWLS)
{
var SnpNo=kuucf(VemIV)
if(SnpNo.spaKW()==false)return 
var vDqBg=SnpNo.hTkIB;
var unbYJ_img=document.getElementById(vDqBg)
if(NYvUG==-1) NYvUG=0;
var WXuXX=rlAlO(VemIV)[NYvUG]
var BAsAT=SnpNo.XkveW()
var cSDZt=BAsAT.border_size 
if(NWWLS!=true)
if(SnpNo.Fgsfs==NYvUG)
{
return;
}
if(SnpNo.wFSNk) return;
SnpNo.wFSNk=true
var iaxOp_size=new Size(SnpNo.jcNWk_preview.width-2*cSDZt,SnpNo.jcNWk_preview.height-2*cSDZt)
var iaxOp_reso=SnpNo.pldWn_layout.max_img_resolution
var src_folder=dbAnF(VemIV)
var oGxkK=new Size(WXuXX.size.w,WXuXX.size.h)
oGxkK.scale(iaxOp_size)
if(iaxOp_reso>0)
{
var iaxOp_size_album=new Size(iaxOp_reso,iaxOp_reso)
oGxkK.scale(iaxOp_size_album)
}
var XPSiC=new Image();
if(isMSIE())
{
XPSiC=document.getElementById(SnpNo.mKohC) 
XPSiC.width=oGxkK.width
XPSiC.height=oGxkK.height
}
XPSiC.UxJbS=0.2
XPSiC.QekYu=0.1
XPSiC.qbpKv_img=NYvUG
XPSiC.LGxDF=WXuXX
XPSiC.mWxmX_preview_obj=SnpNo.mWxmX_preview_obj
XPSiC.KpWoW=SnpNo.KpWoW
XPSiC.TNpsQ=Tween.strongEaseOut
XPSiC.unbYJ_img=unbYJ_img
XPSiC.kIalW=document.getElementById(SnpNo.KpWoW.divId())
XPSiC.SnpNo=SnpNo 
XPSiC.CApuu=oGxkK;
XPSiC.loaded=false;
XPSiC.onload=function()
{
KatrJ(this,this.unbYJ_img)
}
XPSiC.onerror=function()
{
vncjT(this,false)
}
XPSiC.onabort=function()
{
vncjT(this,false)
}
XPSiC.src=src_folder+"/"+WXuXX.th+"?v="+WXuXX.mod;

SnpNo.mWxmX_preview_obj.dgDBj()
}
function KatrJ(XPSiC_obj,unbYJ_img)
{
if(isMobileBrowser())
{
var SnpNo=XPSiC_obj.SnpNo
SnpNo.Fgsfs=XPSiC_obj.qbpKv_img
XPSiC_obj.KpWoW.setOpacity(1);
html_SetOpacity(XPSiC_obj.unbYJ_img,1)
eioYN(XPSiC_obj,XPSiC_obj.unbYJ_img)
vncjT(XPSiC_obj,true)
return;
}
var fuhQD=new HeMuJ(XPSiC_obj.KpWoW,XPSiC_obj.TNpsQ,100,0,XPSiC_obj.UxJbS);
fuhQD.XPSiC_obj=XPSiC_obj
fuhQD.start()
var pksVN=new OpacityTween(unbYJ_img,XPSiC_obj.TNpsQ,100,0,XPSiC_obj.UxJbS);
pksVN.XPSiC_obj=XPSiC_obj
pksVN.unbYJ_img=unbYJ_img
pksVN.onMotionFinished=LZpqM
pksVN.start()
}
function LZpqM()
{
var XPSiC_obj=this.XPSiC_obj 
var NYvUG=XPSiC_obj.qbpKv_img
var SnpNo=XPSiC_obj.SnpNo
SnpNo.Fgsfs=NYvUG 
var ApvVm=0.1
eioYN(this.XPSiC_obj,this.unbYJ_img)
var RWbTi=new HeMuJ(XPSiC_obj.KpWoW,XPSiC_obj.TNpsQ,0,100,XPSiC_obj.QekYu);
RWbTi.XPSiC_obj=XPSiC_obj
RWbTi.start()
var QVpRA=new OpacityTween(this.unbYJ_img,this.XPSiC_obj.TNpsQ,0,100,this.XPSiC_obj.QekYu);
QVpRA.XPSiC_obj=this.XPSiC_obj
QVpRA.unbYJ_img=this.unbYJ_img
QVpRA.onMotionFinished=IsuSJ
QVpRA.start() 
}
function IsuSJ()
{
vncjT(this.XPSiC_obj,true)
}
function vncjT(XPSiC_obj,vbavD)
{
var NYvUG=XPSiC_obj.qbpKv_img
var SnpNo=XPSiC_obj.SnpNo
SnpNo.wFSNk=false;
var NYvUG=SnpNo.Fgsfs 
{
SnpNo.PFVoN=Math.floor(NYvUG/(SnpNo.vITgl_cols*SnpNo.vITgl_rows))
MxGer(SnpNo.VemIV)
}
SnpNo.rwSJt()
SnpNo.oOeSD()
}
function eioYN(XPSiC_obj,unbYJ_img)
{
var SnpNo=XPSiC_obj.SnpNo
var oGxkK=XPSiC_obj.CApuu
SnpNo.lbIko.width=oGxkK.width
SnpNo.lbIko.height=oGxkK.height
unbYJ_img.width=oGxkK.width;
unbYJ_img.height=oGxkK.height;
unbYJ_img.src=XPSiC_obj.src;
var BAsAT=SnpNo.XkveW()
var UgXCp=new RGBColor(BAsAT.border_col)
var cSDZt=BAsAT.border_size
if(UgXCp.a==0) cSDZt=0;
var ANFcW=SnpNo.jcNWk_preview
var jpFnD=BAsAT.shadow;
var mvoTx=0;
if(jpFnD)mvoTx=6
var x0=Math.round((ANFcW.width-(oGxkK.width+2*cSDZt))/2)
var y0=Math.round((ANFcW.height-(oGxkK.height+2*cSDZt))/2)
SnpNo.KpWoW.setRect(x0,y0,oGxkK.width+2*cSDZt,oGxkK.height+2*cSDZt)
SnpNo.mWxmX_preview_obj.ZPcKt(x0+cSDZt,y0+cSDZt,oGxkK.width,oGxkK.height);
var bEoWF=SnpNo.pldWn_layout
var mWxmX=""
var url=XPSiC_obj.LGxDF.url
if(bEoWF.disp_comment)
{
if(bEoWF.disp_comment_img_number)
mWxmX+="<b>"+(XPSiC_obj.qbpKv_img+1)+"/"+SnpNo.vITgl_images+"</b>"
if(bEoWF.disp_comment_img_fn)
{
if(mWxmX.length>0)mWxmX+="<br>"
mWxmX+="("+XPSiC_obj.LGxDF.fn+")"
}
if(XPSiC_obj.LGxDF.comment.length>0)
{
if(mWxmX.length>0)mWxmX+="<br>"
mWxmX+=XPSiC_obj.LGxDF.comment
}
if(url.length>0)
{
if(mWxmX.length>0)mWxmX+="<br>"
mWxmX+="<br><a href='"+url+"' target=_blank "
mWxmX+="style='color:#0000ff;' "
var EulrB=SnpNo.mWxmX_preview_obj.neclH
mWxmX+="onmouseover=\"javascript:_onMouseOnPreviewComment('"+EulrB+"',true)\" ";
mWxmX+=">";
mWxmX+="@ link"
mWxmX+="</a><br><br>"
}
}
var uDIVj=document.getElementById(SnpNo.uDIVj_preview_id)
html_SetPosition(uDIVj,cSDZt+x0,cSDZt+y0)
if(mWxmX.length>0)
{
SnpNo.mWxmX_preview_obj.BmfQB(mWxmX)
}
else
{
SnpNo.mWxmX_preview_obj.okqlT(false);
}
}
function WA_photoAlbumChangeImageSize(unbYJ_img,oGxkK,DqsbQ)
{
var dec=3
unbYJ_img.width=oGxkK
unbYJ_img.height=oGxkK
unbYJ_img.style.borderWidth=DqsbQ
}
function WA_photoAlbumThumbOver(unbYJ,VemIV,NYvUG)
{
var SnpNo=kuucf(VemIV)
var WXuXX_def=rlAlO(VemIV)[NYvUG]
var vDqBg=SnpNo.oDvXK(NYvUG)
var unbYJ_img=document.getElementById(vDqBg)
unbYJ.SnpNo=SnpNo;
unbYJ.unbYJ_img=unbYJ_img
var dec=2
WA_photoAlbumChangeImageSize(unbYJ_img,SnpNo.xtgCw-2*dec,SnpNo.xLngI_thumbnail+dec)
}
function WA_photoAlbumThumbOut(unbYJ)
{
var unbYJ_img=unbYJ.unbYJ_img;
var SnpNo=unbYJ.SnpNo
WA_photoAlbumChangeImageSize(unbYJ_img,SnpNo.xtgCw,SnpNo.xLngI_thumbnail)
}
function iwccO(VemIV,rkmFt)
{
this.VemIV=VemIV;
this.EwYtI=25;
this.xnQTI=rkmFt;
this.vVdXX="photo-album-toolbar-"+this.VemIV
this.EYvvp=("photo-album-scroll-content"+this.VemIV)
this.jcNWk_selector_slider=null;
this.ZBvoU=null;
this.jcNWk_preview=null;
this.vITgl_cols=0;
this.vITgl_rows=0;
this.Zebut=new Array()
this.PFVoN=0;
this.vITgl_pages=1
this.ccFLL=true;
this.QNNgP=false
this.rvBgc=40
this.lbIko=new Size(0,0)
this.FovGW=false;
this.qjRWq=-1;
this.Fgsfs=-1;
this.vITgl_images=this.xnQTI.def.length
this.MTKOZ=false;
this.OXTtj=new Rect(0,0,100,100)
this.pldWn_layout=TPtAj(this.VemIV)
var pldWn=this.pldWn_layout
if(pldWn.diaporama&&(pldWn.diaporama.startup))this.MTKOZ=true;
this.emgsK=false;
this.pldWn_previewZone=false;
this.xpFEo=0;
this.odVSb=function()
{
if(this==this.xnQTI.album_object) return true;
return false;
}
this.XHGhw=function()
{
return this.VemIV+this.xpFEo
}
this.HVbmK=function()
{
var pldWn=TPtAj(VemIV)
var alXOx=this.AVasZ();
this.QNNgP=alXOx.nav_has_horz_flow
if(this.QNNgP==false)
{
this.Zebut.push("up")
this.Zebut.push("down")
}
else
{
this.Zebut.push("<")
this.Zebut.push(">")
}
if(this.wZGbv())
{
this.Zebut.push("+")
}
else
if(this.cwmGV())
{
this.Zebut.push("-")
}
if(pldWn.diaporama)
{
this.Zebut.push("diapo")
}
if((alXOx.nav_but_orient==5)||(alXOx.nav_but_orient==3))
{
this.ccFLL=false;
}
var canvas_bg=""
this.bILQs=new WA_GraphicElement(this.XHGhw()+"-graphic-selector-bg",50,alXOx.bg_shadow)
this.bILQs.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,1,alXOx.bg_border_col,[alXOx.bg_col],alXOx.bg_shadow,0)
}
canvas_bg+=this.bILQs.toHtml() 
this.xAZZl_toolbar=new WA_GraphicElement(this.XHGhw()+"-graphic-toolbar-bg",50,alXOx.bg_shadow)
this.xAZZl_toolbar.ccFLL=this.ccFLL 
this.xAZZl_toolbar.draw=function()
{
var pxYtU_toolbar=false;
if(this.ccFLL)
{
pxYtU_toolbar=DbkQq(0,0,0,this.rect().height/2,alXOx.toolbar_bg_col1,alXOx.toolbar_bg_col2)
}
else
{
pxYtU_toolbar=DbkQq(0,0,this.rect().width/2,0,alXOx.toolbar_bg_col1,alXOx.toolbar_bg_col2)
}
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,1,alXOx.toolbar_border_col,[pxYtU_toolbar],alXOx.toolbar_shadow,0)
}
canvas_bg+=this.xAZZl_toolbar.toHtml() 
this.dQiMu=new Array()
this.dQiMu_by_action=new Array()
for(var n=0;n<this.Zebut.length;n++)
{
var n_action=this.Zebut[n]
var tQNTJ=new WA_GraphicElement(this.XHGhw()+"-graphic-toolbar-but"+n,70,false)
tQNTJ.n_action=n_action
tQNTJ.SnpNo=this
tQNTJ.qjpOo=false
tQNTJ.EwYtI=this.EwYtI
tQNTJ.JpBNb=alXOx.toolbar_but_col1
tQNTJ.mhvrj=alXOx.toolbar_but_col2
tQNTJ.draw=function()
{
var aGWmR=this.EwYtI
var YrmnR=this.n_action
if(YrmnR=="diapo")
{
if(this.SnpNo.njlnl())YrmnR="stop"
}
var DqhZC=(this.qjpOo)?this.mhvrj:this.JpBNb
WA_toolbar_button(this.canvasId(),aGWmR,aGWmR,YrmnR,DqhZC,true)
}
this.dQiMu.push(tQNTJ)
var rVNva_action=n_action
if(rVNva_action=="up")rVNva_action="<"
if(rVNva_action=="down")rVNva_action=">"
this.dQiMu_by_action[rVNva_action]=tQNTJ
canvas_bg+="<div id='"+tQNTJ.divId()+"-href' onclick=\"javascript:WA_photoAlbumAction('"+this.VemIV+"',"+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.VemIV+"',"+n+",true)";
canvas_bg+="\" ";
canvas_bg+="onmouseout=\"";
canvas_bg+="WA_change_tool_button('"+this.VemIV+"',"+n+",false)";
canvas_bg+="\" ";
canvas_bg+=">";
canvas_bg+="</div>";
canvas_bg+=tQNTJ.toHtml()
}
canvas_bg+="<div id='"+this.EYvvp+"' style=\"";
canvas_bg+="position:absolute;z-index:100;";
canvas_bg+="overflow:hidden;";
canvas_bg+="\"></div>";
return canvas_bg;
}
this.tkoLs=function()
{
var alXOx=this.AVasZ();
var r1_rect=this.jcNWk_selector_slider;
var Vxeef="" 
var min_size=Math.min(r1_rect.width,r1_rect.height)
var size_thumb=alXOx.th_size.size;
if(alXOx.th_size.percent) size_thumb=Math.round(size_thumb*(min_size)/100);
var image_spacing=Math.max(0,Math.round((alXOx.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.vITgl_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.vITgl_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.vITgl_images
var nb_pages=(nb_images/(this.vITgl_cols*this.vITgl_rows));
if(nb_pages>Math.floor(nb_pages)) nb_pages=Math.floor(nb_pages)+1;
this.vITgl_pages=nb_pages
this.xtgCw=size_thumb;
this.bOcbu=image_spacing;
this.xLngI_thumbnail=size_border_thumbnail
var n_image=0;
var nb_item_x=this.vITgl_cols*nb_pages
var nb_item_y=this.vITgl_rows;
var nb_item_per_page=this.vITgl_cols*this.vITgl_rows 
if(this.QNNgP==false)
{
nb_item_x=this.vITgl_cols
nb_item_y=this.vITgl_rows*nb_pages;
}
Vxeef+="<table border=0 cellpadding=0 cellspacing=0 width=100% height=100% >";
Vxeef+="<tr>"
Vxeef+="<td "
if((this.QNNgP==false)||(this.vITgl_pages==1))
{
Vxeef+="align=center"
}
Vxeef+=">" 
Vxeef+="<table border=0 cellpadding="+(image_spacing/2)+" cellspacing=0  width=10px>";
for(var mRTkA=0;mRTkA<nb_item_y;mRTkA++)
{
Vxeef+="<tr>" 
for(var ADmON=0;ADmON<nb_item_x;ADmON++)
{
Vxeef+="<td>"
var ind_img=0;
var nx_0=Math.floor(ADmON/this.vITgl_cols)
var diff0=ADmON-nx_0*this.vITgl_cols;
ind_img=nx_0*nb_item_per_page+(mRTkA*this.vITgl_cols)+diff0
if(ind_img<nb_images)
{
var WXuXX=this.xnQTI.def[ind_img]
var otHsE=this.xnQTI.src_folder+"/th_"+WXuXX.th+"?v="+WXuXX.mod_th
Vxeef+="<a href=\"";
if(this.spaKW())
{
Vxeef+="javascript:WA_photoAlbumActionThumb('"+VemIV+"',"+ind_img+")"
}
else
{
Vxeef+="javascript:WA_photoAlbumIncrease('"+VemIV+"',"+ind_img+")"
}
Vxeef+="\" "
Vxeef+="onmouseover=\"WA_photoAlbumThumbOver(this,'"+VemIV+"',"+ind_img+")\" "
Vxeef+="onmouseout=\"WA_photoAlbumThumbOut(this)\" "
Vxeef+=">"
Vxeef+="<img id='"+this.oDvXK(ind_img)+"' width="+size_thumb+"px height="+size_thumb+"px src='"+otHsE+"' ";
Vxeef+="style='";
if(size_border_thumbnail>0)
{
Vxeef+="border-color:"+alXOx.selector_img_border_color+";";
Vxeef+="border-width:"+size_border_thumbnail+"px;border-style:solid;";
}
Vxeef+="' ";
Vxeef+=">"
Vxeef+="</a>"
n_image++;
}
Vxeef+="</td>"
}
if(this.ccFLL)
if(this.vITgl_pages>1)
{
for(var ADmON=0;ADmON<this.vITgl_cols;ADmON++)
{
var ivSjg=size_thumb+2*size_border_thumbnail
Vxeef+="<td>"
Vxeef+="<div  style='width:"+(ivSjg)+"px;height:"+ivSjg+"px;'></div>";
Vxeef+="</td>"
}
}
Vxeef+="</tr>"
}
if(this.ccFLL==false)
if(this.vITgl_pages>1)
{
for(var mRTkA=0;mRTkA<this.vITgl_rows;mRTkA++)
{
Vxeef+="<tr>"
var ivSjg=size_thumb+2*size_border_thumbnail
Vxeef+="<td colspan="+this.vITgl_cols+">"
Vxeef+="<div  style='width:"+(ivSjg)+"px;height:"+ivSjg+"px;'></div>";
Vxeef+="</td>"
Vxeef+="</tr>"
}
}
Vxeef+="</table>" 
Vxeef+="</td>"
Vxeef+="</tr>"
Vxeef+="</table>"
return Vxeef;
}
this.oDvXK=function(NYvUG)
{
return this.XHGhw()+"-th-img"+NYvUG
}
this.PrBcG=function()
{
var BAsAT=this.XkveW();
if(BAsAT==false) return;
var WXuXX=this.xnQTI.def[0]
this.hTkIB="photo-album-preview-img-"+this.XHGhw()
this.mKohC=this.hTkIB+"-cache"
this.uDIVj_preview_id="photo-album-preview-img-div"+this.XHGhw()
this.vlQlc="photo-album-preview-zone"+this.XHGhw()
var Vxeef=""
Vxeef+="<div  id='"+this.vlQlc+"' style=\"";
Vxeef+="position:absolute;z-index:500;";
Vxeef+="\" ";
Vxeef+="onclick=\"WA_clickAlbumPreview('"+this.VemIV+"')\" ";
Vxeef+="onmousemove=\"javascript:WA_mousemoveAlbumPreview(event,'"+this.VemIV+"')\" ";
Vxeef+="onmouseout=\"javascript:WA_mouseoutAlbumPreview(event,'"+this.VemIV+"')\" ";
Vxeef+=">";
Vxeef+="<div style='position:absolute;z-index:450;left:0px;top:0px;";
Vxeef+="width:100%;height:100%;background-color:#000000;";
Vxeef+="filter:alpha(opacity=0);-moz-opacity:0;opacity:0;' "
Vxeef+="></div>"
this.mWxmX_preview_obj=new KsHuA(this.VemIV,this.XHGhw());
Vxeef+=this.mWxmX_preview_obj.toHtml() 
this.KpWoW=new WA_GraphicElement(this.XHGhw()+"-graphic-img-bg",50,BAsAT.shadow)
this.KpWoW.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,0,'',[BAsAT.border_col],this.shadow(),0,this.opacity())
}
Vxeef+=this.KpWoW.toHtml() 
Vxeef+="<div id='"+this.uDIVj_preview_id+"' style=\"";
Vxeef+="position:absolute;z-index:100;";
Vxeef+="left:0px;";
Vxeef+="top:0px;";
Vxeef+="\" ";
Vxeef+=">";
Vxeef+="<img  id='"+this.hTkIB+"' border=0 >";
if(isMSIE())
{
Vxeef+="<img style='position:absolute;left:0px;top:0px;visibility:hidden;' id='"+this.mKohC+"'>"
}
else
{
Vxeef+="<img style='position:absolute;left:0px;top:0px;display:none;' id='"+this.mKohC+"'>"
}
Vxeef+="</div>";
this.KAnhl=new WA_GraphicElement(this.XHGhw()+"-graphic-arrow0",300,true)
this.KAnhl.setImage("intuisphere.png",new Rect(97,49,46,47))
this.KAnhl.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,0,'',["#ffffff"],this.shadow(),0,this.opacity(),true)
var fbguX=Math.round(this.rect().width*0.8);
var nLlLB=Math.round(this.rect().height*0.8);
WA_drawImage(this.canvasId(),this.img_src(),6+(this.rect().width-fbguX)/2,6+(this.rect().height-nLlLB)/2,fbguX,nLlLB,this.img_clip(),this.opacity(),false)
}
this.qZefL=new WA_GraphicElement(this.XHGhw()+"-graphic-arrow1",300,true)
this.qZefL.setImage("intuisphere.png",new Rect(2,49,46,47))
this.qZefL.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,0,'',["#ffffff"],this.shadow(),0,this.opacity(),true)
var fbguX=Math.round(this.rect().width*0.8);
var nLlLB=Math.round(this.rect().height*0.8);
WA_drawImage(this.canvasId(),this.img_src(),6+(this.rect().width-fbguX)/2,6+(this.rect().height-nLlLB)/2,fbguX,nLlLB,this.img_clip(),this.opacity(),false)
}
Vxeef+=this.KAnhl.toHtml()
Vxeef+=this.qZefL.toHtml() 
this.JvLkq=new WA_GraphicElement(this.XHGhw()+"-graphic-cursor-zoom",400,false)
this.JvLkq.setSize(30,30)
this.JvLkq.setImage("intuisphere.png",new Rect(0,0,48,48))
this.JvLkq.draw=function()
{
WA_drawImage(this.canvasId(),this.img_src(),0,0,this.rect().width,this.rect().height,this.img_clip())
}
Vxeef+=this.JvLkq.toHtml() 
Vxeef+="</div>";
return Vxeef;
}
this.gHLoN=function()
{
if(this.TDxgC())
{
this.bILQs.registerDynamicCanvas();
this.xAZZl_toolbar.registerDynamicCanvas();
for(var n=0;n<this.dQiMu.length;n++)
{
var tQNTJ=this.dQiMu[n]
tQNTJ.registerDynamicCanvas();
}
}
if(this.spaKW())
{
this.mWxmX_preview_obj.gHLoN()
this.KpWoW.registerDynamicCanvas();
this.KAnhl.registerDynamicCanvas();
this.qZefL.registerDynamicCanvas();
this.JvLkq.registerDynamicCanvas();
this.JvLkq.setVisible(false)
}
if(this.xAZZl_global)
this.xAZZl_global.registerDynamicCanvas();
this.jVIti()
}
this.njlnl=function()
{
return(this.DWnpC)?true:false;
}
this.hHExP=function()
{
return(this.PFVoN>0)
}
this.OJODh=function()
{
return(this.PFVoN<this.vITgl_pages-1)
}
this.CEXuL=function()
{
return(this.Fgsfs>0);
}
this.SGosH=function()
{
return(this.Fgsfs<this.xnQTI.def.length-1);
}
this.eWLfC=function()
{
if(this.TDxgC())
{
var alXOx=this.AVasZ() 
var fbguX=this.OXTtj.width
var nLlLB=this.OXTtj.height
var r0=alXOx.rect
var r0_rect=oNJSQ(r0,fbguX,nLlLB)
r0_rect.x+=this.OXTtj.x
r0_rect.y+=this.OXTtj.y
var r1_rect=r0_rect.clone() 
var AvuOU_toolbar=r0_rect.clone()
var vITgl_buttons=this.Zebut.length 
var DpEYF=5
var JQCAi=this.EwYtI+DpEYF*2
var qjonk=(vITgl_buttons*this.EwYtI)
if(alXOx.nav_but_orient==1)
{
r1_rect.y+=JQCAi;
r1_rect.height-=JQCAi;
AvuOU_toolbar.x=AvuOU_toolbar.x+(AvuOU_toolbar.width-qjonk)/2;
AvuOU_toolbar.width=qjonk
AvuOU_toolbar.y+=DpEYF;
AvuOU_toolbar.height=this.EwYtI;
}
if(alXOx.nav_but_orient==5)
{
r1_rect.width-=JQCAi;
AvuOU_toolbar.y=AvuOU_toolbar.y+(AvuOU_toolbar.height-qjonk)/2;
AvuOU_toolbar.height=qjonk
AvuOU_toolbar.x+=r1_rect.width+DpEYF;
AvuOU_toolbar.width=this.EwYtI;
}
if(alXOx.nav_but_orient==7)
{
r1_rect.height-=JQCAi;
AvuOU_toolbar.x=AvuOU_toolbar.x+(AvuOU_toolbar.width-qjonk)/2;
AvuOU_toolbar.width=qjonk
AvuOU_toolbar.y+=r1_rect.height+DpEYF;
AvuOU_toolbar.height=this.EwYtI;
}
if(alXOx.nav_but_orient==3)
{
r1_rect.width-=JQCAi;
r1_rect.x+=JQCAi;
AvuOU_toolbar.y=AvuOU_toolbar.y+(AvuOU_toolbar.height-qjonk)/2;
AvuOU_toolbar.height=qjonk
AvuOU_toolbar.x+=DpEYF;
AvuOU_toolbar.width=this.EwYtI;
}
this.jcNWk_selector_slider=r1_rect
this.ZBvoU=AvuOU_toolbar 
var DahUs=this.jcNWk_selector_slider;
this.bILQs.setRect(DahUs.x,DahUs.y,DahUs.width,DahUs.height)
html_SetRect(this.EYvvp,r1_rect) 
var AvuOU=this.ZBvoU
this.xAZZl_toolbar.setRect(AvuOU.x,AvuOU.y,AvuOU.width,AvuOU.height)
var lx_button=this.EwYtI
var ly_button=lx_button
var iWvIU=AvuOU_toolbar.x
var mRTkA_but0=AvuOU_toolbar.y
for(var n=0;n<this.dQiMu.length;n++)
{
var tQNTJ=this.dQiMu[n]
var UJjHh=iWvIU
var mRTkA_but=mRTkA_but0
if(this.ccFLL)
{
UJjHh+=n*lx_button;
}
else
{
mRTkA_but+=n*ly_button;
}
tQNTJ.setRect(UJjHh,mRTkA_but,lx_button,ly_button)
html_SetGeometry(tQNTJ.divId()+"-href",UJjHh,mRTkA_but,lx_button,ly_button)
}
var unbYJ_selector=document.getElementById(this.EYvvp)
if(unbYJ_selector)
{
unbYJ_selector.innerHTML=this.tkoLs();
}
this.oOeSD()
}
}
this.wZGbv=function()
{
if((this.xpFEo==1)&&(this.TDxgC()==true)) return true;
if((this.xpFEo==0)&&(this.pldWn_layout.has_full_page_config)) return true;
return false;
}
this.cwmGV=function()
{
if(this.xpFEo==1) return true;
if(this.xpFEo==2) return true;
return false;
}
this.Hwqoi=function()
{
return this.MTKOZ;
}
this.AVasZ=function()
{
return this.emgsK;
}
this.XkveW=function()
{
return this.pldWn_previewZone;
}
this.TDxgC=function()
{
if(this.AVasZ()) return true;
return false;
}
this.spaKW=function()
{
if(this.XkveW()) return true;
return false;
}
this.oOeSD=function()
{
if(this.TDxgC()==false)return
var EYMeg=this.dQiMu_by_action["<"]
EYMeg.setVisible(this.hHExP())
var gZwJY=this.dQiMu_by_action[">"]
gZwJY.setVisible(this.OJODh())
}
this.rwSJt=function()
{
var BAsAT=this.XkveW();
var fbguX=this.OXTtj.width
var nLlLB=this.OXTtj.height
var DahUs=BAsAT.rect
var DahUs_rect=oNJSQ(DahUs,fbguX,nLlLB)
if(this.xpFEo==2)
{
DahUs_rect=new Rect(0,0,fbguX,nLlLB)
}
DahUs_rect.x+=this.OXTtj.x
DahUs_rect.y+=this.OXTtj.y 

if((DahUs.x=="0%")&&(DahUs.y=="0%")&&(DahUs.lx=="100%")&&(DahUs.ly=="100%"))
{
var dec=8;
DahUs_rect.x+=dec
DahUs_rect.y+=dec
DahUs_rect.width-=2*dec
DahUs_rect.height-=2*dec 
}
var AvuOU_rect=DahUs_rect.clone()
this.jcNWk_preview=AvuOU_rect
html_SetRect(this.vlQlc,this.jcNWk_preview)
this.qbFng()
this.CfgBO()
}
this.AFWfI=function()
{
if(this.njlnl()) return;
if(this.spaKW()==false)return;
var TNpsQ=Tween.regularEaseOut
var ApvVm=0.3
if((!this.WWfYm)||(this.WWfYm.isRunning()==false))
{
if(this.WWfYm)this.WWfYm.stop()
this.WWfYm=new HeMuJ(this.KAnhl,TNpsQ,0,100,ApvVm)
this.WWfYm.onMotionFinished=this.pvfwf
this.WWfYm.m_count=0
this.WWfYm.start()
}
if((!this.rEcAq)||(this.rEcAq.isRunning()==false))
{
if(this.rEcAq)this.rEcAq.stop()
this.rEcAq=new HeMuJ(this.qZefL,TNpsQ,0,100,ApvVm)
this.rEcAq.onMotionFinished=this.pvfwf
this.rEcAq.m_count=0
this.rEcAq.start()
}
}
this.pvfwf=function()
{
if(this.m_count>=3)
{
return;
}
this.yoyo()
this.m_count++}
this.qbFng=function()
{
if(this.odVSb()==false)return;
if(this.spaKW()==false)return
if(isMobileBrowser())return
var CNOkF=30
var SnpNo=this;
var Tmagk=SnpNo.eqElr
var n_pos=SnpNo.qjRWq;
if((n_pos!=-1)&&(SnpNo.FovGW==false)&&(SnpNo.WDAUp!=true))
{
var GWotn=true;
if(n_pos==0)
{
if(SnpNo.CEXuL()==false)GWotn=false;
SnpNo.JvLkq.setImage("intuisphere.png",new Rect(97,49,46,47))
}
else
if(n_pos==1)
{
if(SnpNo.cwmGV())
{
SnpNo.JvLkq.setImage("intuisphere.png",new Rect(48,0,48,48))
}
else
if(SnpNo.wZGbv())
{
SnpNo.JvLkq.setImage("intuisphere.png",new Rect(0,0,48,48))
}
else
{
GWotn=false;
}
}
else
if(n_pos==2)
{
if(SnpNo.SGosH()==false)GWotn=false;
SnpNo.JvLkq.setImage("intuisphere.png",new Rect(0,49,46,47))
}
SnpNo.JvLkq.setPosition(Tmagk.x,Tmagk.y,CNOkF,CNOkF);
SnpNo.JvLkq.setVisible(GWotn)
}
else
{
SnpNo.JvLkq.setVisible(false)
}
}
this.CfgBO=function()
{
if(this.spaKW()==false)return
if((this.njlnl()==false)&&(this.lbIko.width>0))
{
var rvBgc=40
var x_arrow0=(this.jcNWk_preview.width-this.lbIko.width)/2
var x_arrow1=(x_arrow0+this.lbIko.width-rvBgc)
var y_arrow0=(this.jcNWk_preview.height-this.lbIko.height)/2+(this.lbIko.height-rvBgc)/2 
this.KAnhl.setRect(x_arrow0,y_arrow0,rvBgc,rvBgc)
this.qZefL.setRect(x_arrow1,y_arrow0,rvBgc,rvBgc)
this.KAnhl.setVisible(this.CEXuL())
this.qZefL.setVisible(this.SGosH())
}
else
{
this.KAnhl.setVisible(false)
this.qZefL.setVisible(false)
}
this.KAnhl.setOpacity(0)
this.qZefL.setOpacity(0)
}
this.jVIti=function()
{
if(this.spaKW())
{
this.rwSJt()
var NYvUG=this.Fgsfs 
WA_photoAlbumActionThumb(this.VemIV,NYvUG,true)
this.rwSJt()
}
this.eWLfC()
if(this.xAZZl_global)
{
this.xAZZl_global.setRect(0,0,this.OXTtj.width,this.OXTtj.height);
}
if(this.VCAql)
{
html_SetGeometry(this.VCAql,0,0,this.OXTtj.width,this.OXTtj.height)
}
}
this.Fmnve=function()
{
if(this.spaKW())
{
WA_photoAlbumActionThumb(this.VemIV,this.Fgsfs,true)
}
}
this.EKIfs=function(lhtIT)
{
bOgqa(this.xpFEo>0)
var Vxeef=""
if(this.TDxgC())
{
Vxeef+=this.HVbmK();
}
if(this.spaKW())
{
Vxeef+=this.PrBcG();
};
if((this.xpFEo==1)||(this.xpFEo==2))
{
if(this.pldWn_layout.bg_fullpage_img.length>0)
{
this.VCAql=this.XHGhw()+"-graphic-fullpage-bg";
Vxeef+="<div id='"+this.VCAql+"' style=\"";
Vxeef+="position:absolute;z-index:0;";
if(this.pldWn_layout.bg_fullpage_img_type==0)
{
Vxeef+="background-image:url('"+this.pldWn_layout.bg_fullpage_img+"');";
Vxeef+="background-repeat: repeat;";
}
Vxeef+="\" ";
Vxeef+=">";
if(this.pldWn_layout.bg_fullpage_img_type==1)
{
Vxeef+="<img src='"+this.pldWn_layout.bg_fullpage_img+"' width=100% height=100% border=0 >";
}
Vxeef+="</div>";
}
else
{
var pxYtU=this.pldWn_layout.bg_fullpage_grad
this.xAZZl_global=new WA_GraphicElement(this.XHGhw()+"-graphic-global-bg",0,false)
this.xAZZl_global.pxYtU=pxYtU
this.xAZZl_global.draw=function()
{
var pxYtU=this.pxYtU
var pxYtU_bg=false
if(pxYtU.has_gradient)
{
var fbguX=this.rect().width
var nLlLB=this.rect().height
var xg1=pxYtU.pt1.x*fbguX/100
var yg1=pxYtU.pt1.y*nLlLB/100
var xg2=pxYtU.pt2.x*fbguX/100
var yg2=pxYtU.pt2.y*nLlLB/100
pxYtU_bg=DbkQq(xg1,yg1,xg2,yg2,pxYtU.col1,pxYtU.col2)
}
else
{
pxYtU_bg=pxYtU.col1
}
WA_bg(this.canvasId(),this.rect().width,this.rect().height,0,0,'',[pxYtU_bg],false,0,1)
}
Vxeef+=this.xAZZl_global.toHtml();
}
}
var ssUVW=document.getElementById(lhtIT);
ssUVW.innerHTML=Vxeef
ssUVW.style.display="block"
if(navigator.userAgent.match(/opera/i))
{
wa_timeout("WA_registerAlbum('"+this.VemIV+"') ",0)
}
else
{
WA_registerAlbum(VemIV)
}
if(this.Hwqoi()==false)
{
this.AFWfI()
}
}
this.nHpQi=function()
{
var opKIk="wa-dialog-container"
if(this.wZGbv()==false) return;
if(this.xpFEo==0)
if(this.pldWn_layout.plugin_fullscreen_url.length>0)
{
window.open(this.pldWn_layout.plugin_fullscreen_url)
return;
}
this.qjRWq=-1;
this.qbFng()
var xnQTI=this.xnQTI
var jcNWk=new Rect(0,0,getWindowSize().width,getWindowSize().height)
var SnpNo=new iwccO(VemIV,xnQTI)
SnpNo.Fgsfs=this.Fgsfs
if(this.xpFEo==0)
{
SnpNo.xpFEo=1
}
else
if(this.xpFEo==1)
{
SnpNo.xpFEo=2
}
xnQTI.album_object=SnpNo;
SnpNo.OXTtj.copy(jcNWk)
SnpNo.emgsK=xnQTI.layout.selector_fullpage
if(SnpNo.xpFEo==2)
{
SnpNo.emgsK=false
}
SnpNo.pldWn_previewZone=xnQTI.layout.preview_fullpage
wa_global_photo_album.fullpage_object=SnpNo
SnpNo.EKIfs(opKIk)
return SnpNo
}
this.YTJAV=function()
{
if(this.cwmGV()==false) return;
this.xsvGe()
var opKIk="wa-dialog-container"
var xnQTI=this.xnQTI
xnQTI.album_object=xnQTI.nJCbE;
wa_global_photo_album.fullpage_object=false 
if(this.xpFEo==1)
{
bOgqa(false)
var ssUVW=document.getElementById(opKIk);
ssUVW.innerHTML=""
ssUVW.style.display="none"
WA_photoAlbumActionThumb(this.VemIV,this.Fgsfs,true)
return xnQTI.nJCbE
}
if(this.xpFEo==2)
{
xnQTI.album_object.Fgsfs=this.Fgsfs
return xnQTI.album_object.nHpQi()
}
}
this.xsvGe=function()
{
if(this.njlnl())
{
this.MTKOZ=false
clearTimeout(this.DWnpC)
this.DWnpC=false;
}
}
this.onFullScreenKeydown=function(k)
{
if(k==27)
{
this.YTJAV()
return false;
}
KALTr(this.VemIV,[k])
return false;
}
}
function BDNlT(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 SnpNo=wa_global_photo_album.fullpage_object
var VemIV=SnpNo.VemIV
var joQPU=SnpNo.mWxmX_preview_obj
if(joQPU.dEboV)
{
var reJJa=html_getLayer(joQPU.Ywhxj)
if(reJJa)
{
var scrollVal=-(3*delta)
if(isMSIE())scrollVal*=3
reJJa.scrollTop+=scrollVal
}
}
else
{
if(delta>0)b_default=ATHsh(VemIV);
if(delta<0)b_default=JsDpL(VemIV);
}
}
if(b_default)
if(e.preventDefault)
e.preventDefault();
e.returnValue=!b_default;
}
function bOgqa(TlHDA)
{
if(TlHDA==false)
{
var guXqc=window;
if(guXqc.removeEventListener)
guXqc.removeEventListener('DOMMouseScroll',BDNlT,false);
guXqc.onmousewheel=document.onmousewheel=null;
}
else
{
var guXqc=window;
if(guXqc.addEventListener)
guXqc.addEventListener('DOMMouseScroll',BDNlT,false);
guXqc.onmousewheel=document.onmousewheel=BDNlT;
}
}
function DbkQq(urCec,HbdHF,vgFuZ,HhpZg,fMEJc,xBPoD)
{
var CMFVT=""
CMFVT+="(";
CMFVT+=urCec+";"+HbdHF+";"+vgFuZ+";"+HhpZg+";";
CMFVT+=fMEJc+";";
CMFVT+=xBPoD;
CMFVT+=")";
return CMFVT;
}
function WA_photoAlbumAction(VemIV,NYvUG)
{
var SnpNo=kuucf(VemIV)
var tQNTJ=SnpNo.dQiMu[NYvUG]
var n_action=tQNTJ.n_action
if((n_action=="<")||(n_action=="up"))
{
SnpNo.PFVoN=Math.max(0,SnpNo.PFVoN-1)
MxGer(VemIV)
}
if((n_action==">")||(n_action=="down"))
{
SnpNo.PFVoN=Math.min(SnpNo.vITgl_pages-1,SnpNo.PFVoN+1)
MxGer(VemIV)
}
if(n_action=="diapo")
{
gTaSY(VemIV)
}
if(n_action=="+")
{
SnpNo.nHpQi()
}
}
function WA_photoAlbumIncrease(VemIV,NYvUG)
{
var SnpNo=kuucf(VemIV)
SnpNo.Fgsfs=NYvUG
SnpNo.nHpQi()
}
function gTaSY(VemIV)
{
var SnpNo=kuucf(VemIV)
if(SnpNo.njlnl()==false)
{
var vITgl_increase=0;
var XeabT=SnpNo;
while(XeabT.wZGbv())
{
XeabT=XeabT.nHpQi()
vITgl_increase++}
if(vITgl_increase>0)
{
XeabT.vITgl_decrease_view_when_diaporama_stop=vITgl_increase;
WA_goNextDiaporama(VemIV)
XeabT.CfgBO()
return;
}
}
if(SnpNo.njlnl())
{
jAbVP(VemIV)
}
else
{
WA_goNextDiaporama(VemIV)
}
if(SnpNo.TDxgC())
{
var tQNTJ=SnpNo.dQiMu_by_action["diapo"]
tQNTJ.draw()
}
}
function jAbVP(VemIV)
{
var SnpNo=kuucf(VemIV)
if(SnpNo.njlnl())
{
SnpNo.xsvGe()
if(SnpNo.vITgl_decrease_view_when_diaporama_stop)
{
var XeabT=SnpNo;
for(var n=0;n<SnpNo.vITgl_decrease_view_when_diaporama_stop;n++)
{
XeabT=XeabT.YTJAV() 
}
return;
}
}
if(SnpNo.TDxgC())
{
var tQNTJ=SnpNo.dQiMu_by_action["diapo"]
tQNTJ.draw()
}
}
function WA_goNextDiaporama(VemIV)
{
var pldWn=TPtAj(VemIV)
var omRlD=rlAlO(VemIV)
var SnpNo=kuucf(VemIV)
var NYvUG=(SnpNo.Fgsfs+1)%omRlD.length;
if(pldWn.diaporama.random)
{
NYvUG=Math.round((omRlD.length-1)*Math.random());
}
WA_photoAlbumActionThumb(VemIV,NYvUG)
SnpNo.DWnpC=wa_timeout("WA_goNextDiaporama('"+VemIV+"')",pldWn.diaporama.time*1000)
}
function orqDV(VemIV,NYvUG)
{
var SnpNo=kuucf(VemIV)
if(NYvUG<0)
{
SnpNo.AFWfI()
return false;
}
if(NYvUG>SnpNo.vITgl_images-1)
{
SnpNo.AFWfI()
return false;
}
WA_photoAlbumActionThumb(VemIV,NYvUG)
return true;
}
function JsDpL(VemIV)
{
var SnpNo=kuucf(VemIV)
if(SnpNo.njlnl()) return false;
return orqDV(VemIV,SnpNo.Fgsfs+1)
}
function ATHsh(VemIV)
{
var SnpNo=kuucf(VemIV)
if(SnpNo.njlnl()) return false;
return orqDV(VemIV,SnpNo.Fgsfs-1)
}
function WA_clickAlbumPreview(VemIV)
{
var SnpNo=kuucf(VemIV)
if(SnpNo.Hwqoi()) return;
if(SnpNo.njlnl())
{
jAbVP(VemIV)
}
var qJEAF=SnpNo.qjRWq
if(qJEAF!=-1)
{
if(qJEAF==2)JsDpL(VemIV)
if(qJEAF==1)
{
if(SnpNo.cwmGV())
{
SnpNo.YTJAV()
}
else
if(SnpNo.wZGbv())
{
SnpNo.nHpQi()
}
}
if(qJEAF==0)ATHsh(VemIV)
}
}
function WA_mouseoutAlbumPreview(e,VemIV)
{
var SnpNo=kuucf(VemIV)
SnpNo.JvLkq.setVisible(false)
SnpNo.qjRWq=-1;
}
function WA_mousemoveAlbumPreview(e,VemIV)
{
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 SnpNo=kuucf(VemIV)
var YLdPr=document.getElementById(SnpNo.JvLkq.divId())
var pt=html_findPos(YLdPr.offsetParent)
var x=posx-pt.x+1;
var y=posy-pt.y+1;
var n_pos=-1
var anfoR=false;
var hevLq=0;
var UoSPl=30;
if(SnpNo.WDAUp!=true)
if(SnpNo.njlnl()==false)
{
if((x>0)&&(x<SnpNo.jcNWk_preview.width))
if((y>0)&&(y<SnpNo.jcNWk_preview.height))
{
n_pos=1;
if(x<SnpNo.jcNWk_preview.width*0.3)n_pos=0;
if(x>SnpNo.jcNWk_preview.width*(1-0.3))n_pos=2;
}
if((x<hevLq)||(x>SnpNo.jcNWk_preview.width-hevLq-UoSPl))anfoR=true;
if((y<hevLq)||(y>SnpNo.jcNWk_preview.height-hevLq-UoSPl))anfoR=true;
}
SnpNo.eqElr=new Point(x,y);
SnpNo.qjRWq=n_pos;
SnpNo.FovGW=anfoR;
SnpNo.qbFng();
}
function MxGer(VemIV)
{
var SnpNo=kuucf(VemIV)
var unbYJ=document.getElementById(SnpNo.EYvvp)
if(!unbYJ)return;
var PlLnO;
var pXSoQ=0;
var size_thumb=SnpNo.xtgCw;
var bOcbu=SnpNo.bOcbu;
var eQYRB=0;
var Cqeae=(size_thumb+2*SnpNo.xLngI_thumbnail+bOcbu);
var NgQWU=SnpNo.vITgl_cols*SnpNo.vITgl_rows;
if(SnpNo.QNNgP)
{
eQYRB=SnpNo.PFVoN*SnpNo.vITgl_cols*Cqeae
}
else
{
eQYRB=SnpNo.PFVoN*SnpNo.vITgl_rows*Cqeae
}
if(SnpNo.QNNgP)
{
PlLnO="scrollLeft"
pXSoQ=unbYJ.scrollLeft
}
else
{
PlLnO="scrollTop"
pXSoQ=unbYJ.scrollTop
}
if(pXSoQ==eQYRB)
{
return;
}
if(SnpNo.m_tween_slider)
{
SnpNo.m_tween_slider.stop()
}
var ApvVm=0.7;
SnpNo.m_tween_slider=new Tween(unbYJ,PlLnO,Tween.strongEaseOut,pXSoQ,eQYRB,ApvVm);
SnpNo.m_tween_slider.onMotionFinished=OnQxS
SnpNo.m_tween_slider.SnpNo=SnpNo
SnpNo.m_tween_slider.start() 
}
function OnQxS()
{
var SnpNo=this.SnpNo
SnpNo.oOeSD()
}
function hpZEr(VemIV)
{
return wa_global_photo_album[VemIV]
}
function kuucf(VemIV)
{
return wa_global_photo_album[VemIV].album_object
}
function rlAlO(VemIV)
{
return wa_global_photo_album[VemIV].def
}
function dbAnF(VemIV)
{
return wa_global_photo_album[VemIV].src_folder
}
function TPtAj(VemIV)
{
return wa_global_photo_album[VemIV].layout
}
function LqUIe(fgmeo)
{
var VemIV=fgmeo[0] 


WA_addHandler(VemIV,"mousewheel",RfpbJ)
WA_addHandler(VemIV,"keydown",KALTr)
var opKIk="photo-album-main-"+VemIV
var xnQTI=hpZEr(VemIV)
var jcNWk=new Rect()
jcNWk.copy(xnQTI.size_container) 
var SnpNo=new iwccO(VemIV,xnQTI) 
xnQTI.album_object=SnpNo;
xnQTI.nJCbE=SnpNo 
SnpNo.OXTtj.copy(jcNWk)
SnpNo.emgsK=xnQTI.layout.selector
SnpNo.pldWn_previewZone=xnQTI.layout.preview
SnpNo.EKIfs(opKIk) 

var SnpNo=kuucf(VemIV)
var sgLRn=document.wa_global_query_info
if(sgLRn)
{
if(VemIV==sgLRn.m_unid)
{
SnpNo.Fgsfs=sgLRn.m_index_item
SnpNo.nHpQi()
return;
}
}
if(SnpNo.Hwqoi())
{
gTaSY(VemIV)
return;
}
}
function WA_registerAlbum(VemIV)
{
kuucf(VemIV).gHLoN()
}
function KALTr(VemIV,fgmeo)
{
var ZeMho=fgmeo[0]
if(ZeMho==37) return ATHsh(VemIV);
if(ZeMho==39) return JsDpL(VemIV);
return true;
}
function RfpbJ(VemIV,KXsWf)
{
var RlMTr=KXsWf[0] 
var SnpNo=kuucf(VemIV)
if(SnpNo.mWxmX_preview_obj)
{
var joQPU=SnpNo.mWxmX_preview_obj
if(joQPU.dEboV)
{
var reJJa=html_getLayer(joQPU.Ywhxj)
reJJa.scrollTop+=-(3*RlMTr)
return true;
}
}
if(RlMTr>0)return ATHsh(VemIV);
if(RlMTr<0)return JsDpL(VemIV);
return true;
}
function WA_PhotoAlbum_resizeUI()
{
if(wa_global_photo_album.fullpage_object)
{
var SnpNo=wa_global_photo_album.fullpage_object
if(wa_global_photo_album.fVIIF)
{
clearTimeout(wa_global_photo_album.fVIIF);
}
var jcNWk=new Rect(0,0,getWindowSize().width,getWindowSize().height)
SnpNo.OXTtj.copy(jcNWk)
SnpNo.jVIti()
wa_global_photo_album.fVIIF=wa_timeout("WA_PhotoAlbum_delayed_resizeUI()",1000)
}
}
function WA_PhotoAlbum_delayed_resizeUI()
{
if(wa_global_photo_album.fullpage_object)
{
wa_global_photo_album.fVIIF=false
var SnpNo=wa_global_photo_album.fullpage_object
SnpNo.Fmnve()
}
}
function WA_loadPhotoAlbums()
{
for(var ZeMho in wa_global_photo_album)
{
var xnQTI=wa_global_photo_album[ZeMho]
var SoLLY=Translator.m_lang_for_filename
if(SoLLY.length>0)SoLLY="_"+SoLLY;
WA_loadScript(xnQTI.src_folder+'/photo-album-definition'+SoLLY+'.js?v='+xnQTI.id_modif,LqUIe,[ZeMho]);
}
}

-->
