<!--
 
function ifuDJ(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 pxEBr(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 QSoiW(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 SAfGk=new RGBColor(col)
SAfGk.a=0
grad.addColorStop(1,col);grad.addColorStop(0,SAfGk.toRGB());
c.fillStyle=grad;
c.beginPath();c.rect(x,y,8,14);c.fill()
c.fillStyle=old_fill
}
function NgOFC(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 NjhVx(name,CEljY,KlfSN)
{
var n=CEljY.indexOf("%")
if(n>-1)
{
CEljY=wa_evaluate(CEljY.replace("%","/100"))
return Math.round(CEljY*KlfSN)
}
CEljY=parseFloat(CEljY)
return Math.round(CEljY)
}
function BkHlh(Fbtcd,BeLMu,DPYGK)
{
var x=NjhVx("x",Fbtcd.x,BeLMu)
var y=NjhVx("y",Fbtcd.y,DPYGK)
if(Fbtcd.x.indexOf("%")==-1)BeLMu=BeLMu-x
if(Fbtcd.y.indexOf("%")==-1)DPYGK=DPYGK-y 

var lx=NjhVx("lx",Fbtcd.lx,BeLMu)
var ly=NjhVx("ly",Fbtcd.ly,DPYGK)
return new Rect(x,y,lx,ly)
}
function WA_change_tool_button(VMDZc,vmVdH,over)
{
var iZnTI=YDWum(VMDZc)
if(iZnTI&&iZnTI.hTmxe)
{
var SJpnx=iZnTI.hTmxe[vmVdH]
if(SJpnx)
{
SJpnx.kFafD=over
SJpnx.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=="<")
{
ifuDJ(c,0,0,lx,false)
}
if(type==">")
{
ifuDJ(c,0,0,lx,true)
}
if(type=="down")
{
c.rotate(-Math.PI/2);c.translate(-lx,0);
ifuDJ(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);
ifuDJ(c,0,0,lx,false);
c.translate(0,ly);c.rotate(-Math.PI/2);
}
if(type=="+")
{
pxEBr(c,0,0,lx,12,4)
}
if(type=="diapo")
{
QSoiW(c,0,0,lx,current_col)
}
if(type=="stop")
{
NgOFC(c,0,0,lx,current_col)
}
}
vjXvT.prototype=new Tween();
vjXvT.prototype.constructor=Tween;
vjXvT.superclass=Tween.prototype;
function vjXvT(obj,mRrli,XeVas,wDChU,wugSt)
{
this.targetObject=obj;
this.init(new Object(),'a',mRrli,XeVas,wDChU,wugSt);
this.onMotionChanged=function(evt)
{
var v=evt.target.getPosition();
var cIAkk=this.targetObject;
v=Math.round(v*100)/100
cIAkk.setOpacity(v/100);
}
}
function onMouseOnPreviewComment(VMDZc,DHcFi,cVPsx)
{
var iZnTI=YDWum(VMDZc)
var qRgBJ=iZnTI.ExAeq_preview_obj 
var old=iZnTI.tglRo
iZnTI.tglRo=DHcFi;
qRgBJ.Qcgha=DHcFi
if(iZnTI.tglRo)
iZnTI.pASJK=-1;

if(cVPsx)
wa_timeout(Delegate.create(qRgBJ,qRgBJ.cxLKG),200);
else
wa_timeout(Delegate.create(qRgBJ,qRgBJ.FYBbl),200);
}
EgrxU.prototype=new Tween();
EgrxU.prototype.constructor=Tween;
EgrxU.superclass=Tween.prototype;
function EgrxU(obj,mRrli,XeVas,wDChU,wugSt)
{
this.targetObject=obj;
this.init(new Object(),'a',mRrli,XeVas,wDChU,wugSt);
this.onMotionChanged=function(evt)
{
var v=evt.target.getPosition();
var qRgBJ=this.targetObject;
qRgBJ.YipIW=v
qRgBJ.hURIO()
}
this.onMotionFinished=function(evt)
{
var qRgBJ=this.targetObject;
if(qRgBJ.ZTiam==false)
{
qRgBJ.MqeaP.setVisible(false)
html_SetVisibility(qRgBJ.BTkMP,false)
}
qRgBJ.setOverflow(qRgBJ.Qcgha)
}
}
function DJWpB(VMDZc,MiJoa)
{
this.onfOC=VMDZc
this.MiJoa=MiJoa
this.BTkMP=this.MiJoa+"comment-text-div"
this.Qcgha=false;
this.ZTiam=false;
this.YipIW=0;
this.toHtml=function()
{
var kVooQ=""
this.MqeaP=new WA_GraphicElement(this.MiJoa+"-graphic-comment-bg",500,false)
this.MqeaP.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())
}
kVooQ+=this.MqeaP.toHtml() 
kVooQ+="<div id='"+this.BTkMP+"' ";
kVooQ+="onmouseover=\"javascript:onMouseOnPreviewComment('"+this.onfOC+"',true)\" ";
kVooQ+="onmouseout=\"javascript:onMouseOnPreviewComment('"+this.onfOC+"',false)\" ";
kVooQ+=" style=\"font-family:Arial;font-size:13px;color:#ffffff;margin:2px;text-align:center;"
kVooQ+="overflow:auto;visibility:hidden;"
kVooQ+="position:absolute;"
kVooQ+="z-index:5250;"
kVooQ+="\">";
kVooQ+="</div>";
return kVooQ
}
this.Bgwmd=function()
{
this.MqeaP.registerDynamicCanvas();
}
this.pcrov=function(KQLXm,rYeGl,BeLMu,DPYGK)
{
this.iTxQU=new Rect(KQLXm,rYeGl,BeLMu,DPYGK)
this.LgRcE(KQLXm,rYeGl,BeLMu,DPYGK)
}
this.LgRcE=function(KQLXm,rYeGl,BeLMu,DPYGK)
{
if(DPYGK<=0)
{
this.MqeaP.setVisible(false)
html_SetVisibility(this.BTkMP,false)
return;
}
this.MqeaP.setRect(KQLXm,rYeGl,BeLMu,DPYGK)
html_SetGeometry(this.BTkMP,KQLXm,rYeGl,BeLMu,DPYGK)
}
this.setOverflow=function(jKJbj)
{
var cIAkk=html_getLayer(this.BTkMP)
var RSAiV=((jKJbj)?"auto":"hidden")
cIAkk.style.overflow=RSAiV 
}
this.teSll=function()
{
this.ZWikR=true
wa_timeout(Delegate.create(this,this.PIbbZ),300);
}
this.PIbbZ=function()
{
if(this.ZWikR!=true)return;
this.ZWikR=false
this.qQPbx("chargement en cours...")
}
this.qQPbx=function(kVooQ)
{
this.jDics=kVooQ
this.vRimY(kVooQ)
}
this.dTQKe=function(kVooQ)
{
this.ZWikR=false
this.XvseQ=0;
this.ZTiam=true
this.vRimY(kVooQ)
}
this.vRimY=function(kVooQ)
{
this.jDics=kVooQ
var Fbtcd=this.iTxQU
if(!Fbtcd)return;
var cIAkk=html_getLayer(this.BTkMP)
cIAkk.style.overflow="hidden"
this.LgRcE(Fbtcd.x,Fbtcd.y+Fbtcd.height-1,Fbtcd.width,1)
html_writeContent(this.BTkMP,this.jDics)
if(isMSIE())
{
WA_exec_delayedCallback(this,this.tmflo)
}
else
{
this.tmflo()
}
}
this.tmflo=function()
{
var Fbtcd=this.iTxQU
var cIAkk=html_getLayer(this.BTkMP)
this.XvseQ=cIAkk.scrollHeight+4;
this.XvseQ=Math.min(this.XvseQ,Fbtcd.height*0.8);
this.YipIW=0
this.cxLKG()
}
this.hURIO=function()
{
var kVooQ=this.jDics;
var Fbtcd=this.iTxQU
var cIAkk=html_getLayer(this.BTkMP)
var PhPeP=this.YipIW
var DPYGK=PhPeP
this.LgRcE(Fbtcd.x,Fbtcd.y+Fbtcd.height-DPYGK,Fbtcd.width,DPYGK)
WA_exec_delayedCallback(this,this.SdQGY)
}
this.cxLKG=function()
{
this.vdPjl(true)
}
this.FYBbl=function()
{
this.vdPjl(false)
}
this.vdPjl=function(UcJld)
{
var Fbtcd=this.iTxQU
if(this.norHY)
{
this.norHY.stop()
this.norHY=false;
}
var QIPjU=Math.min(Fbtcd.height*0.2,this.XvseQ);
QIPjU=Math.min(40,QIPjU);
if((QIPjU<20)&&(this.XvseQ>QIPjU))
{
this.ZTiam=false
}
if(this.Qcgha)QIPjU=this.XvseQ
var IFkqc=this.YipIW;
var vhvHN=QIPjU;
if(this.ZTiam==false)
{
IFkqc=this.YipIW;
vhvHN=0;
}
if(UcJld)
{
this.setOverflow(false)
}
if(this.Qcgha!=true)
{
var cIAkk=html_getLayer(this.BTkMP)
cIAkk.scrollTop=0
}
this.norHY=new EgrxU(this,Tween.strongEaseOut,IFkqc,vhvHN,0.5)
this.norHY.start()
}
this.SdQGY=function()
{
this.MqeaP.setVisible(this.ZTiam)
html_SetVisibility(this.BTkMP,this.ZTiam)
}
}
function WA_photoAlbumActionThumb(VMDZc,vmVdH,eBWeG)
{
var iZnTI=YDWum(VMDZc)
if(iZnTI.YglCA()==false)return 
var msVYH=iZnTI.LEjSr;
var oVkvH_img=document.getElementById(msVYH)
if(vmVdH==-1) vmVdH=0;
var xHcej=llZdb(VMDZc)[vmVdH]
var lMaAq=iZnTI.YmgMS()
var PkfQv=lMaAq.border_size 
if(eBWeG!=true)
if(iZnTI.DbYIq==vmVdH)
{
return;
}
if(iZnTI.APNkl) return;
iZnTI.APNkl=true
var QIPjU_size=new Size(iZnTI.hLNOl_preview.width-2*PkfQv,iZnTI.hLNOl_preview.height-2*PkfQv)
var QIPjU_reso=iZnTI.nNApk_layout.max_img_resolution
var src_folder=AxFFf(VMDZc)
var KlfSN=new Size(xHcej.size.w,xHcej.size.h)
KlfSN.scale(QIPjU_size)
if(QIPjU_reso>0)
{
var QIPjU_size_album=new Size(QIPjU_reso,QIPjU_reso)
KlfSN.scale(QIPjU_size_album)
}
var BsANH=new Image();
if(isMSIE())
{
BsANH=document.getElementById(iZnTI.phqrD) 
BsANH.width=KlfSN.width
BsANH.height=KlfSN.height
}
BsANH.FmkRM=0.2
BsANH.MOIAb=0.1
BsANH.IagUj_img=vmVdH
BsANH.cdTUP=xHcej
BsANH.ExAeq_preview_obj=iZnTI.ExAeq_preview_obj
BsANH.pfoli=iZnTI.pfoli
BsANH.hKAFA=Tween.strongEaseOut
BsANH.oVkvH_img=oVkvH_img
BsANH.dNKxm=document.getElementById(iZnTI.pfoli.divId())
BsANH.iZnTI=iZnTI 
BsANH.eOqWF=KlfSN;
BsANH.loaded=false;
BsANH.onload=function()
{
AZqhY(this,this.oVkvH_img)
}
BsANH.onerror=function()
{
WSRYQ(this,false)
}
BsANH.onabort=function()
{
WSRYQ(this,false)
}
BsANH.src=src_folder+"/"+xHcej.th+"?v="+xHcej.mod;

iZnTI.ExAeq_preview_obj.teSll()
}
function AZqhY(BsANH_obj,oVkvH_img)
{
if(isMobileBrowser())
{
var iZnTI=BsANH_obj.iZnTI
iZnTI.DbYIq=BsANH_obj.IagUj_img
BsANH_obj.pfoli.setOpacity(1);
html_SetOpacity(BsANH_obj.oVkvH_img,1)
SIDqY(BsANH_obj,BsANH_obj.oVkvH_img)
WSRYQ(BsANH_obj,true)
return;
}
var jxqOi=new vjXvT(BsANH_obj.pfoli,BsANH_obj.hKAFA,100,0,BsANH_obj.FmkRM);
jxqOi.BsANH_obj=BsANH_obj
jxqOi.start()
var JfkLT=new OpacityTween(oVkvH_img,BsANH_obj.hKAFA,100,0,BsANH_obj.FmkRM);
JfkLT.BsANH_obj=BsANH_obj
JfkLT.oVkvH_img=oVkvH_img
JfkLT.onMotionFinished=lwbvF
JfkLT.start()
}
function lwbvF()
{
var BsANH_obj=this.BsANH_obj 
var vmVdH=BsANH_obj.IagUj_img
var iZnTI=BsANH_obj.iZnTI
iZnTI.DbYIq=vmVdH 
var wugSt=0.1
SIDqY(this.BsANH_obj,this.oVkvH_img)
var xIOnr=new vjXvT(BsANH_obj.pfoli,BsANH_obj.hKAFA,0,100,BsANH_obj.MOIAb);
xIOnr.BsANH_obj=BsANH_obj
xIOnr.start()
var YPCui=new OpacityTween(this.oVkvH_img,this.BsANH_obj.hKAFA,0,100,this.BsANH_obj.MOIAb);
YPCui.BsANH_obj=this.BsANH_obj
YPCui.oVkvH_img=this.oVkvH_img
YPCui.onMotionFinished=jTiSO
YPCui.start() 
}
function jTiSO()
{
WSRYQ(this.BsANH_obj,true)
}
function WSRYQ(BsANH_obj,tGmlg)
{
var vmVdH=BsANH_obj.IagUj_img
var iZnTI=BsANH_obj.iZnTI
iZnTI.APNkl=false;
var vmVdH=iZnTI.DbYIq 
{
iZnTI.MSGpM=Math.floor(vmVdH/(iZnTI.ItrfL_cols*iZnTI.ItrfL_rows))
NMavd(iZnTI.VMDZc)
}
iZnTI.TASiB()
iZnTI.fuoUl()
}
function SIDqY(BsANH_obj,oVkvH_img)
{
var iZnTI=BsANH_obj.iZnTI
var KlfSN=BsANH_obj.eOqWF
iZnTI.UpbQp.width=KlfSN.width
iZnTI.UpbQp.height=KlfSN.height
oVkvH_img.width=KlfSN.width;
oVkvH_img.height=KlfSN.height;
oVkvH_img.src=BsANH_obj.src;
var lMaAq=iZnTI.YmgMS()
var lHJwX=new RGBColor(lMaAq.border_col)
var PkfQv=lMaAq.border_size
if(lHJwX.a==0) PkfQv=0;
var IIpYo=iZnTI.hLNOl_preview
var fMQDL=lMaAq.shadow;
var tKWlq=0;
if(fMQDL)tKWlq=6
var x0=Math.round((IIpYo.width-(KlfSN.width+2*PkfQv))/2)
var y0=Math.round((IIpYo.height-(KlfSN.height+2*PkfQv))/2)
iZnTI.pfoli.setRect(x0,y0,KlfSN.width+2*PkfQv,KlfSN.height+2*PkfQv)
iZnTI.ExAeq_preview_obj.pcrov(x0+PkfQv,y0+PkfQv,KlfSN.width,KlfSN.height);
var rWVKl=iZnTI.nNApk_layout
var ExAeq=""
var url=BsANH_obj.cdTUP.url
if(rWVKl.disp_comment)
{
if(rWVKl.disp_comment_img_number)
ExAeq+="<b>"+(BsANH_obj.IagUj_img+1)+"/"+iZnTI.ItrfL_images+"</b>"
if(rWVKl.disp_comment_img_fn)
{
if(ExAeq.length>0)ExAeq+="<br>"
ExAeq+="("+BsANH_obj.cdTUP.fn+")"
}
if(BsANH_obj.cdTUP.comment.length>0)
{
if(ExAeq.length>0)ExAeq+="<br>"
ExAeq+=BsANH_obj.cdTUP.comment
}
if(url.length>0)
{
if(ExAeq.length>0)ExAeq+="<br>"
ExAeq+="<br><a href='"+url+"' target=_blank "
ExAeq+="style='color:#0000ff;' "
var xHeUX=iZnTI.ExAeq_preview_obj.onfOC
ExAeq+="onmouseover=\"javascript:_onMouseOnPreviewComment('"+xHeUX+"',true)\" ";
ExAeq+=">";
ExAeq+="@ link"
ExAeq+="</a><br><br>"
}
}
var dvsxr=document.getElementById(iZnTI.dvsxr_preview_id)
html_SetPosition(dvsxr,PkfQv+x0,PkfQv+y0)
if(ExAeq.length>0)
{
iZnTI.ExAeq_preview_obj.dTQKe(ExAeq)
}
else
{
iZnTI.ExAeq_preview_obj.SdQGY(false);
}
}
function WA_photoAlbumChangeImageSize(oVkvH_img,KlfSN,rZIcw)
{
var dec=3
oVkvH_img.width=KlfSN
oVkvH_img.height=KlfSN
oVkvH_img.style.borderWidth=rZIcw
}
function WA_photoAlbumThumbOver(oVkvH,VMDZc,vmVdH)
{
var iZnTI=YDWum(VMDZc)
var xHcej_def=llZdb(VMDZc)[vmVdH]
var msVYH=iZnTI.cNDXx(vmVdH)
var oVkvH_img=document.getElementById(msVYH)
oVkvH.iZnTI=iZnTI;
oVkvH.oVkvH_img=oVkvH_img
var dec=2
WA_photoAlbumChangeImageSize(oVkvH_img,iZnTI.osSjv-2*dec,iZnTI.QoBGV_thumbnail+dec)
}
function WA_photoAlbumThumbOut(oVkvH)
{
var oVkvH_img=oVkvH.oVkvH_img;
var iZnTI=oVkvH.iZnTI
WA_photoAlbumChangeImageSize(oVkvH_img,iZnTI.osSjv,iZnTI.QoBGV_thumbnail)
}
function oIYjc(VMDZc,uLEuv)
{
this.VMDZc=VMDZc;
this.JENeB=25;
this.iOMFQ=uLEuv;
this.FEBFW="photo-album-toolbar-"+this.VMDZc
this.mJJvw=("photo-album-scroll-content"+this.VMDZc)
this.hLNOl_selector_slider=null;
this.QdQti=null;
this.hLNOl_preview=null;
this.ItrfL_cols=0;
this.ItrfL_rows=0;
this.EnWrw=new Array()
this.MSGpM=0;
this.ItrfL_pages=1
this.Hmfld=true;
this.NfBOd=false
this.rGEGV=40
this.UpbQp=new Size(0,0)
this.ilwDJ=false;
this.pASJK=-1;
this.DbYIq=-1;
this.ItrfL_images=this.iOMFQ.def.length
this.rMWbV=false;
this.Duwdf=new Rect(0,0,100,100)
this.nNApk_layout=cpjVj(this.VMDZc)
var nNApk=this.nNApk_layout
if(nNApk.diaporama&&(nNApk.diaporama.startup))this.rMWbV=true;
this.FpNMv=false;
this.nNApk_previewZone=false;
this.qSAxC=0;
this.tlRAG=function()
{
if(this==this.iOMFQ.album_object) return true;
return false;
}
this.MiJoa=function()
{
return this.VMDZc+this.qSAxC
}
this.XPigr=function()
{
var nNApk=cpjVj(VMDZc)
var OGPkm=this.MHELa();
this.NfBOd=OGPkm.nav_has_horz_flow
if(this.NfBOd==false)
{
this.EnWrw.push("up")
this.EnWrw.push("down")
}
else
{
this.EnWrw.push("<")
this.EnWrw.push(">")
}
if(this.MJZlq())
{
this.EnWrw.push("+")
}
else
if(this.NxRXt())
{
this.EnWrw.push("-")
}
if(nNApk.diaporama)
{
this.EnWrw.push("diapo")
}
if((OGPkm.nav_but_orient==5)||(OGPkm.nav_but_orient==3))
{
this.Hmfld=false;
}
var canvas_bg=""
this.dLVHR=new WA_GraphicElement(this.MiJoa()+"-graphic-selector-bg",50,OGPkm.bg_shadow)
this.dLVHR.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,1,OGPkm.bg_border_col,[OGPkm.bg_col],OGPkm.bg_shadow,0)
}
canvas_bg+=this.dLVHR.toHtml() 
this.MqeaP_toolbar=new WA_GraphicElement(this.MiJoa()+"-graphic-toolbar-bg",50,OGPkm.bg_shadow)
this.MqeaP_toolbar.Hmfld=this.Hmfld 
this.MqeaP_toolbar.draw=function()
{
var kTUil_toolbar=false;
if(this.Hmfld)
{
kTUil_toolbar=agEOf(0,0,0,this.rect().height/2,OGPkm.toolbar_bg_col1,OGPkm.toolbar_bg_col2)
}
else
{
kTUil_toolbar=agEOf(0,0,this.rect().width/2,0,OGPkm.toolbar_bg_col1,OGPkm.toolbar_bg_col2)
}
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,1,OGPkm.toolbar_border_col,[kTUil_toolbar],OGPkm.toolbar_shadow,0)
}
canvas_bg+=this.MqeaP_toolbar.toHtml() 
this.hTmxe=new Array()
this.hTmxe_by_action=new Array()
for(var n=0;n<this.EnWrw.length;n++)
{
var n_action=this.EnWrw[n]
var SJpnx=new WA_GraphicElement(this.MiJoa()+"-graphic-toolbar-but"+n,70,false)
SJpnx.n_action=n_action
SJpnx.iZnTI=this
SJpnx.kFafD=false
SJpnx.JENeB=this.JENeB
SJpnx.lPtNw=OGPkm.toolbar_but_col1
SJpnx.jShQj=OGPkm.toolbar_but_col2
SJpnx.draw=function()
{
var oYVpM=this.JENeB
var Bdglv=this.n_action
if(Bdglv=="diapo")
{
if(this.iZnTI.XQmZH())Bdglv="stop"
}
var uXppi=(this.kFafD)?this.jShQj:this.lPtNw
WA_toolbar_button(this.canvasId(),oYVpM,oYVpM,Bdglv,uXppi,true)
}
this.hTmxe.push(SJpnx)
var Mgreg_action=n_action
if(Mgreg_action=="up")Mgreg_action="<"
if(Mgreg_action=="down")Mgreg_action=">"
this.hTmxe_by_action[Mgreg_action]=SJpnx
canvas_bg+="<div id='"+SJpnx.divId()+"-href' onclick=\"javascript:WA_photoAlbumAction('"+this.VMDZc+"',"+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.VMDZc+"',"+n+",true)";
canvas_bg+="\" ";
canvas_bg+="onmouseout=\"";
canvas_bg+="WA_change_tool_button('"+this.VMDZc+"',"+n+",false)";
canvas_bg+="\" ";
canvas_bg+=">";
canvas_bg+="</div>";
canvas_bg+=SJpnx.toHtml()
}
canvas_bg+="<div id='"+this.mJJvw+"' style=\"";
canvas_bg+="position:absolute;z-index:100;";
canvas_bg+="overflow:hidden;";
canvas_bg+="\"></div>";
return canvas_bg;
}
this.xNNGG=function()
{
var OGPkm=this.MHELa();
var r1_rect=this.hLNOl_selector_slider;
var kVooQ="" 
var min_size=Math.min(r1_rect.width,r1_rect.height)
var size_thumb=OGPkm.th_size.size;
if(OGPkm.th_size.percent) size_thumb=Math.round(size_thumb*(min_size)/100);
var image_spacing=Math.max(0,Math.round((OGPkm.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.ItrfL_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.ItrfL_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.ItrfL_images
var nb_pages=(nb_images/(this.ItrfL_cols*this.ItrfL_rows));
if(nb_pages>Math.floor(nb_pages)) nb_pages=Math.floor(nb_pages)+1;
this.ItrfL_pages=nb_pages
this.osSjv=size_thumb;
this.pOHsA=image_spacing;
this.QoBGV_thumbnail=size_border_thumbnail
var n_image=0;
var nb_item_x=this.ItrfL_cols*nb_pages
var nb_item_y=this.ItrfL_rows;
var nb_item_per_page=this.ItrfL_cols*this.ItrfL_rows 
if(this.NfBOd==false)
{
nb_item_x=this.ItrfL_cols
nb_item_y=this.ItrfL_rows*nb_pages;
}
kVooQ+="<table border=0 cellpadding=0 cellspacing=0 width=100% height=100% >";
kVooQ+="<tr>"
kVooQ+="<td "
if((this.NfBOd==false)||(this.ItrfL_pages==1))
{
kVooQ+="align=center"
}
kVooQ+=">" 
kVooQ+="<table border=0 cellpadding="+(image_spacing/2)+" cellspacing=0  width=10px>";
for(var rYeGl=0;rYeGl<nb_item_y;rYeGl++)
{
kVooQ+="<tr>" 
for(var KQLXm=0;KQLXm<nb_item_x;KQLXm++)
{
kVooQ+="<td>"
var ind_img=0;
var nx_0=Math.floor(KQLXm/this.ItrfL_cols)
var diff0=KQLXm-nx_0*this.ItrfL_cols;
ind_img=nx_0*nb_item_per_page+(rYeGl*this.ItrfL_cols)+diff0
if(ind_img<nb_images)
{
var xHcej=this.iOMFQ.def[ind_img]
var IOwRi=this.iOMFQ.src_folder+"/th_"+xHcej.th+"?v="+xHcej.mod_th
kVooQ+="<a href=\"";
if(this.YglCA())
{
kVooQ+="javascript:WA_photoAlbumActionThumb('"+VMDZc+"',"+ind_img+")"
}
else
{
kVooQ+="javascript:WA_photoAlbumIncrease('"+VMDZc+"',"+ind_img+")"
}
kVooQ+="\" "
kVooQ+="onmouseover=\"WA_photoAlbumThumbOver(this,'"+VMDZc+"',"+ind_img+")\" "
kVooQ+="onmouseout=\"WA_photoAlbumThumbOut(this)\" "
kVooQ+=">"
kVooQ+="<img id='"+this.cNDXx(ind_img)+"' width="+size_thumb+"px height="+size_thumb+"px src='"+IOwRi+"' ";
kVooQ+="style='";
if(size_border_thumbnail>0)
{
kVooQ+="border-color:"+OGPkm.selector_img_border_color+";";
kVooQ+="border-width:"+size_border_thumbnail+"px;border-style:solid;";
}
kVooQ+="' ";
kVooQ+=">"
kVooQ+="</a>"
n_image++;
}
kVooQ+="</td>"
}
if(this.Hmfld)
if(this.ItrfL_pages>1)
{
for(var KQLXm=0;KQLXm<this.ItrfL_cols;KQLXm++)
{
var nFrZE=size_thumb+2*size_border_thumbnail
kVooQ+="<td>"
kVooQ+="<div  style='width:"+(nFrZE)+"px;height:"+nFrZE+"px;'></div>";
kVooQ+="</td>"
}
}
kVooQ+="</tr>"
}
if(this.Hmfld==false)
if(this.ItrfL_pages>1)
{
for(var rYeGl=0;rYeGl<this.ItrfL_rows;rYeGl++)
{
kVooQ+="<tr>"
var nFrZE=size_thumb+2*size_border_thumbnail
kVooQ+="<td colspan="+this.ItrfL_cols+">"
kVooQ+="<div  style='width:"+(nFrZE)+"px;height:"+nFrZE+"px;'></div>";
kVooQ+="</td>"
kVooQ+="</tr>"
}
}
kVooQ+="</table>" 
kVooQ+="</td>"
kVooQ+="</tr>"
kVooQ+="</table>"
return kVooQ;
}
this.cNDXx=function(vmVdH)
{
return this.MiJoa()+"-th-img"+vmVdH
}
this.wrcsF=function()
{
var lMaAq=this.YmgMS();
if(lMaAq==false) return;
var xHcej=this.iOMFQ.def[0]
this.LEjSr="photo-album-preview-img-"+this.MiJoa()
this.phqrD=this.LEjSr+"-cache"
this.dvsxr_preview_id="photo-album-preview-img-div"+this.MiJoa()
this.lAdSS="photo-album-preview-zone"+this.MiJoa()
var kVooQ=""
kVooQ+="<div  id='"+this.lAdSS+"' style=\"";
kVooQ+="position:absolute;z-index:500;";
kVooQ+="\" ";
kVooQ+="onclick=\"WA_clickAlbumPreview('"+this.VMDZc+"')\" ";
kVooQ+="onmousemove=\"javascript:WA_mousemoveAlbumPreview(event,'"+this.VMDZc+"')\" ";
kVooQ+="onmouseout=\"javascript:WA_mouseoutAlbumPreview(event,'"+this.VMDZc+"')\" ";
kVooQ+=">";
kVooQ+="<div style='position:absolute;z-index:450;left:0px;top:0px;";
kVooQ+="width:100%;height:100%;background-color:#000000;";
kVooQ+="filter:alpha(opacity=0);-moz-opacity:0;opacity:0;' "
kVooQ+="></div>"
this.ExAeq_preview_obj=new DJWpB(this.VMDZc,this.MiJoa());
kVooQ+=this.ExAeq_preview_obj.toHtml() 
this.pfoli=new WA_GraphicElement(this.MiJoa()+"-graphic-img-bg",50,lMaAq.shadow)
this.pfoli.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,0,'',[lMaAq.border_col],this.shadow(),0,this.opacity())
}
kVooQ+=this.pfoli.toHtml() 
kVooQ+="<div id='"+this.dvsxr_preview_id+"' style=\"";
kVooQ+="position:absolute;z-index:100;";
kVooQ+="left:0px;";
kVooQ+="top:0px;";
kVooQ+="\" ";
kVooQ+=">";
kVooQ+="<img  id='"+this.LEjSr+"' border=0 >";
if(isMSIE())
{
kVooQ+="<img style='position:absolute;left:0px;top:0px;visibility:hidden;' id='"+this.phqrD+"'>"
}
else
{
kVooQ+="<img style='position:absolute;left:0px;top:0px;display:none;' id='"+this.phqrD+"'>"
}
kVooQ+="</div>";
this.aWjAo=new WA_GraphicElement(this.MiJoa()+"-graphic-arrow0",300,true)
this.aWjAo.setImage("intuisphere.png",new Rect(97,49,46,47))
this.aWjAo.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,0,'',["#ffffff"],this.shadow(),0,this.opacity(),true)
var BeLMu=Math.round(this.rect().width*0.8);
var DPYGK=Math.round(this.rect().height*0.8);
WA_drawImage(this.canvasId(),this.img_src(),6+(this.rect().width-BeLMu)/2,6+(this.rect().height-DPYGK)/2,BeLMu,DPYGK,this.img_clip(),this.opacity(),false)
}
this.JVwVd=new WA_GraphicElement(this.MiJoa()+"-graphic-arrow1",300,true)
this.JVwVd.setImage("intuisphere.png",new Rect(2,49,46,47))
this.JVwVd.draw=function()
{
WA_bg(this.canvasId(),this.rect().width,this.rect().height,5,0,'',["#ffffff"],this.shadow(),0,this.opacity(),true)
var BeLMu=Math.round(this.rect().width*0.8);
var DPYGK=Math.round(this.rect().height*0.8);
WA_drawImage(this.canvasId(),this.img_src(),6+(this.rect().width-BeLMu)/2,6+(this.rect().height-DPYGK)/2,BeLMu,DPYGK,this.img_clip(),this.opacity(),false)
}
kVooQ+=this.aWjAo.toHtml()
kVooQ+=this.JVwVd.toHtml() 
this.uexkP=new WA_GraphicElement(this.MiJoa()+"-graphic-cursor-zoom",400,false)
this.uexkP.setSize(30,30)
this.uexkP.setImage("intuisphere.png",new Rect(0,0,48,48))
this.uexkP.draw=function()
{
WA_drawImage(this.canvasId(),this.img_src(),0,0,this.rect().width,this.rect().height,this.img_clip())
}
kVooQ+=this.uexkP.toHtml() 
kVooQ+="</div>";
return kVooQ;
}
this.Bgwmd=function()
{
if(this.iHdJa())
{
this.dLVHR.registerDynamicCanvas();
this.MqeaP_toolbar.registerDynamicCanvas();
for(var n=0;n<this.hTmxe.length;n++)
{
var SJpnx=this.hTmxe[n]
SJpnx.registerDynamicCanvas();
}
}
if(this.YglCA())
{
this.ExAeq_preview_obj.Bgwmd()
this.pfoli.registerDynamicCanvas();
this.aWjAo.registerDynamicCanvas();
this.JVwVd.registerDynamicCanvas();
this.uexkP.registerDynamicCanvas();
this.uexkP.setVisible(false)
}
if(this.MqeaP_global)
this.MqeaP_global.registerDynamicCanvas();
this.Wnxfk()
}
this.XQmZH=function()
{
return(this.mFMaX)?true:false;
}
this.NuoYP=function()
{
return(this.MSGpM>0)
}
this.keFPQ=function()
{
return(this.MSGpM<this.ItrfL_pages-1)
}
this.SYjss=function()
{
return(this.DbYIq>0);
}
this.Dkbeh=function()
{
return(this.DbYIq<this.iOMFQ.def.length-1);
}
this.xYATF=function()
{
if(this.iHdJa())
{
var OGPkm=this.MHELa() 
var BeLMu=this.Duwdf.width
var DPYGK=this.Duwdf.height
var r0=OGPkm.rect
var r0_rect=BkHlh(r0,BeLMu,DPYGK)
r0_rect.x+=this.Duwdf.x
r0_rect.y+=this.Duwdf.y
var r1_rect=r0_rect.clone() 
var XRohJ_toolbar=r0_rect.clone()
var ItrfL_buttons=this.EnWrw.length 
var MoEZq=5
var kQvad=this.JENeB+MoEZq*2
var GhNvP=(ItrfL_buttons*this.JENeB)
if(OGPkm.nav_but_orient==1)
{
r1_rect.y+=kQvad;
r1_rect.height-=kQvad;
XRohJ_toolbar.x=XRohJ_toolbar.x+(XRohJ_toolbar.width-GhNvP)/2;
XRohJ_toolbar.width=GhNvP
XRohJ_toolbar.y+=MoEZq;
XRohJ_toolbar.height=this.JENeB;
}
if(OGPkm.nav_but_orient==5)
{
r1_rect.width-=kQvad;
XRohJ_toolbar.y=XRohJ_toolbar.y+(XRohJ_toolbar.height-GhNvP)/2;
XRohJ_toolbar.height=GhNvP
XRohJ_toolbar.x+=r1_rect.width+MoEZq;
XRohJ_toolbar.width=this.JENeB;
}
if(OGPkm.nav_but_orient==7)
{
r1_rect.height-=kQvad;
XRohJ_toolbar.x=XRohJ_toolbar.x+(XRohJ_toolbar.width-GhNvP)/2;
XRohJ_toolbar.width=GhNvP
XRohJ_toolbar.y+=r1_rect.height+MoEZq;
XRohJ_toolbar.height=this.JENeB;
}
if(OGPkm.nav_but_orient==3)
{
r1_rect.width-=kQvad;
r1_rect.x+=kQvad;
XRohJ_toolbar.y=XRohJ_toolbar.y+(XRohJ_toolbar.height-GhNvP)/2;
XRohJ_toolbar.height=GhNvP
XRohJ_toolbar.x+=MoEZq;
XRohJ_toolbar.width=this.JENeB;
}
this.hLNOl_selector_slider=r1_rect
this.QdQti=XRohJ_toolbar 
var tqomH=this.hLNOl_selector_slider;
this.dLVHR.setRect(tqomH.x,tqomH.y,tqomH.width,tqomH.height)
html_SetRect(this.mJJvw,r1_rect) 
var XRohJ=this.QdQti
this.MqeaP_toolbar.setRect(XRohJ.x,XRohJ.y,XRohJ.width,XRohJ.height)
var lx_button=this.JENeB
var ly_button=lx_button
var ZqbWH=XRohJ_toolbar.x
var rYeGl_but0=XRohJ_toolbar.y
for(var n=0;n<this.hTmxe.length;n++)
{
var SJpnx=this.hTmxe[n]
var HClCk=ZqbWH
var rYeGl_but=rYeGl_but0
if(this.Hmfld)
{
HClCk+=n*lx_button;
}
else
{
rYeGl_but+=n*ly_button;
}
SJpnx.setRect(HClCk,rYeGl_but,lx_button,ly_button)
html_SetGeometry(SJpnx.divId()+"-href",HClCk,rYeGl_but,lx_button,ly_button)
}
var oVkvH_selector=document.getElementById(this.mJJvw)
if(oVkvH_selector)
{
oVkvH_selector.innerHTML=this.xNNGG();
}
this.fuoUl()
}
}
this.MJZlq=function()
{
if((this.qSAxC==1)&&(this.iHdJa()==true)) return true;
if((this.qSAxC==0)&&(this.nNApk_layout.has_full_page_config)) return true;
return false;
}
this.NxRXt=function()
{
if(this.qSAxC==1) return true;
if(this.qSAxC==2) return true;
return false;
}
this.OYPDw=function()
{
return this.rMWbV;
}
this.MHELa=function()
{
return this.FpNMv;
}
this.YmgMS=function()
{
return this.nNApk_previewZone;
}
this.iHdJa=function()
{
if(this.MHELa()) return true;
return false;
}
this.YglCA=function()
{
if(this.YmgMS()) return true;
return false;
}
this.fuoUl=function()
{
if(this.iHdJa()==false)return
var NFAVS=this.hTmxe_by_action["<"]
NFAVS.setVisible(this.NuoYP())
var hNmva=this.hTmxe_by_action[">"]
hNmva.setVisible(this.keFPQ())
}
this.TASiB=function()
{
var lMaAq=this.YmgMS();
var BeLMu=this.Duwdf.width
var DPYGK=this.Duwdf.height
var tqomH=lMaAq.rect
var tqomH_rect=BkHlh(tqomH,BeLMu,DPYGK)
if(this.qSAxC==2)
{
tqomH_rect=new Rect(0,0,BeLMu,DPYGK)
}
tqomH_rect.x+=this.Duwdf.x
tqomH_rect.y+=this.Duwdf.y 

if((tqomH.x=="0%")&&(tqomH.y=="0%")&&(tqomH.lx=="100%")&&(tqomH.ly=="100%"))
{
var dec=8;
tqomH_rect.x+=dec
tqomH_rect.y+=dec
tqomH_rect.width-=2*dec
tqomH_rect.height-=2*dec 
}
var XRohJ_rect=tqomH_rect.clone()
this.hLNOl_preview=XRohJ_rect
html_SetRect(this.lAdSS,this.hLNOl_preview)
this.seOXC()
this.hPIXq()
}
this.uFAhP=function()
{
if(this.XQmZH()) return;
if(this.YglCA()==false)return;
var hKAFA=Tween.regularEaseOut
var wugSt=0.3
if((!this.EkIhv)||(this.EkIhv.isRunning()==false))
{
if(this.EkIhv)this.EkIhv.stop()
this.EkIhv=new vjXvT(this.aWjAo,hKAFA,0,100,wugSt)
this.EkIhv.onMotionFinished=this.UhGRx
this.EkIhv.m_count=0
this.EkIhv.start()
}
if((!this.gpPFX)||(this.gpPFX.isRunning()==false))
{
if(this.gpPFX)this.gpPFX.stop()
this.gpPFX=new vjXvT(this.JVwVd,hKAFA,0,100,wugSt)
this.gpPFX.onMotionFinished=this.UhGRx
this.gpPFX.m_count=0
this.gpPFX.start()
}
}
this.UhGRx=function()
{
if(this.m_count>=3)
{
return;
}
this.yoyo()
this.m_count++}
this.seOXC=function()
{
if(this.tlRAG()==false)return;
if(this.YglCA()==false)return
if(isMobileBrowser())return
var HSVQX=30
var iZnTI=this;
var SQxLM=iZnTI.VGisY
var n_pos=iZnTI.pASJK;
if((n_pos!=-1)&&(iZnTI.ilwDJ==false)&&(iZnTI.tglRo!=true))
{
var QLqXE=true;
if(n_pos==0)
{
if(iZnTI.SYjss()==false)QLqXE=false;
iZnTI.uexkP.setImage("intuisphere.png",new Rect(97,49,46,47))
}
else
if(n_pos==1)
{
if(iZnTI.NxRXt())
{
iZnTI.uexkP.setImage("intuisphere.png",new Rect(48,0,48,48))
}
else
if(iZnTI.MJZlq())
{
iZnTI.uexkP.setImage("intuisphere.png",new Rect(0,0,48,48))
}
else
{
QLqXE=false;
}
}
else
if(n_pos==2)
{
if(iZnTI.Dkbeh()==false)QLqXE=false;
iZnTI.uexkP.setImage("intuisphere.png",new Rect(0,49,46,47))
}
iZnTI.uexkP.setPosition(SQxLM.x,SQxLM.y,HSVQX,HSVQX);
iZnTI.uexkP.setVisible(QLqXE)
}
else
{
iZnTI.uexkP.setVisible(false)
}
}
this.hPIXq=function()
{
if(this.YglCA()==false)return
if((this.XQmZH()==false)&&(this.UpbQp.width>0))
{
var rGEGV=40
var x_arrow0=(this.hLNOl_preview.width-this.UpbQp.width)/2
var x_arrow1=(x_arrow0+this.UpbQp.width-rGEGV)
var y_arrow0=(this.hLNOl_preview.height-this.UpbQp.height)/2+(this.UpbQp.height-rGEGV)/2 
this.aWjAo.setRect(x_arrow0,y_arrow0,rGEGV,rGEGV)
this.JVwVd.setRect(x_arrow1,y_arrow0,rGEGV,rGEGV)
this.aWjAo.setVisible(this.SYjss())
this.JVwVd.setVisible(this.Dkbeh())
}
else
{
this.aWjAo.setVisible(false)
this.JVwVd.setVisible(false)
}
this.aWjAo.setOpacity(0)
this.JVwVd.setOpacity(0)
}
this.Wnxfk=function()
{
if(this.YglCA())
{
this.TASiB()
var vmVdH=this.DbYIq 
WA_photoAlbumActionThumb(this.VMDZc,vmVdH,true)
this.TASiB()
}
this.xYATF()
if(this.MqeaP_global)
{
this.MqeaP_global.setRect(0,0,this.Duwdf.width,this.Duwdf.height);
}
if(this.brgDU)
{
html_SetGeometry(this.brgDU,0,0,this.Duwdf.width,this.Duwdf.height)
}
}
this.ZQBGg=function()
{
if(this.YglCA())
{
WA_photoAlbumActionThumb(this.VMDZc,this.DbYIq,true)
}
}
this.wOMfQ=function(Loghb)
{
VWoOu(this.qSAxC>0)
var kVooQ=""
if(this.iHdJa())
{
kVooQ+=this.XPigr();
}
if(this.YglCA())
{
kVooQ+=this.wrcsF();
};
if((this.qSAxC==1)||(this.qSAxC==2))
{
if(this.nNApk_layout.bg_fullpage_img.length>0)
{
this.brgDU=this.MiJoa()+"-graphic-fullpage-bg";
kVooQ+="<div id='"+this.brgDU+"' style=\"";
kVooQ+="position:absolute;z-index:0;";
if(this.nNApk_layout.bg_fullpage_img_type==0)
{
kVooQ+="background-image:url('"+this.nNApk_layout.bg_fullpage_img+"');";
kVooQ+="background-repeat: repeat;";
}
kVooQ+="\" ";
kVooQ+=">";
if(this.nNApk_layout.bg_fullpage_img_type==1)
{
kVooQ+="<img src='"+this.nNApk_layout.bg_fullpage_img+"' width=100% height=100% border=0 >";
}
kVooQ+="</div>";
}
else
{
var kTUil=this.nNApk_layout.bg_fullpage_grad
this.MqeaP_global=new WA_GraphicElement(this.MiJoa()+"-graphic-global-bg",0,false)
this.MqeaP_global.kTUil=kTUil
this.MqeaP_global.draw=function()
{
var kTUil=this.kTUil
var kTUil_bg=false
if(kTUil.has_gradient)
{
var BeLMu=this.rect().width
var DPYGK=this.rect().height
var xg1=kTUil.pt1.x*BeLMu/100
var yg1=kTUil.pt1.y*DPYGK/100
var xg2=kTUil.pt2.x*BeLMu/100
var yg2=kTUil.pt2.y*DPYGK/100
kTUil_bg=agEOf(xg1,yg1,xg2,yg2,kTUil.col1,kTUil.col2)
}
else
{
kTUil_bg=kTUil.col1
}
WA_bg(this.canvasId(),this.rect().width,this.rect().height,0,0,'',[kTUil_bg],false,0,1)
}
kVooQ+=this.MqeaP_global.toHtml();
}
}
var vdZut=document.getElementById(Loghb);
vdZut.innerHTML=kVooQ
vdZut.style.display="block"
if(navigator.userAgent.match(/opera/i))
{
wa_timeout("WA_registerAlbum('"+this.VMDZc+"') ",0)
}
else
{
WA_registerAlbum(VMDZc)
}
if(this.OYPDw()==false)
{
this.uFAhP()
}
}
this.QpoFf=function()
{
var rmbav="wa-dialog-container"
if(this.MJZlq()==false) return;
if(this.qSAxC==0)
if(this.nNApk_layout.plugin_fullscreen_url.length>0)
{
window.open(this.nNApk_layout.plugin_fullscreen_url)
return;
}
this.pASJK=-1;
this.seOXC()
var iOMFQ=this.iOMFQ
var hLNOl=new Rect(0,0,getWindowSize().width,getWindowSize().height)
var iZnTI=new oIYjc(VMDZc,iOMFQ)
iZnTI.DbYIq=this.DbYIq
if(this.qSAxC==0)
{
iZnTI.qSAxC=1
}
else
if(this.qSAxC==1)
{
iZnTI.qSAxC=2
}
iOMFQ.album_object=iZnTI;
iZnTI.Duwdf.copy(hLNOl)
iZnTI.FpNMv=iOMFQ.layout.selector_fullpage
if(iZnTI.qSAxC==2)
{
iZnTI.FpNMv=false
}
iZnTI.nNApk_previewZone=iOMFQ.layout.preview_fullpage
wa_global_photo_album.fullpage_object=iZnTI
iZnTI.wOMfQ(rmbav)
return iZnTI
}
this.DOIwx=function()
{
if(this.NxRXt()==false) return;
this.Xunkl()
var rmbav="wa-dialog-container"
var iOMFQ=this.iOMFQ
iOMFQ.album_object=iOMFQ.FQkuU;
wa_global_photo_album.fullpage_object=false 
if(this.qSAxC==1)
{
VWoOu(false)
var vdZut=document.getElementById(rmbav);
vdZut.innerHTML=""
vdZut.style.display="none"
WA_photoAlbumActionThumb(this.VMDZc,this.DbYIq,true)
return iOMFQ.FQkuU
}
if(this.qSAxC==2)
{
iOMFQ.album_object.DbYIq=this.DbYIq
return iOMFQ.album_object.QpoFf()
}
}
this.Xunkl=function()
{
if(this.XQmZH())
{
this.rMWbV=false
clearTimeout(this.mFMaX)
this.mFMaX=false;
}
}
this.onFullScreenKeydown=function(k)
{
if(k==27)
{
this.DOIwx()
return false;
}
MveOi(this.VMDZc,[k])
return false;
}
}
function cZpQi(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 iZnTI=wa_global_photo_album.fullpage_object
var VMDZc=iZnTI.VMDZc
var qRgBJ=iZnTI.ExAeq_preview_obj
if(qRgBJ.Qcgha)
{
var cIAkk=html_getLayer(qRgBJ.BTkMP)
cIAkk.scrollTop+=-(3*delta)
}
else
{
if(delta>0)b_default=qBZDw(VMDZc);
if(delta<0)b_default=KdsUU(VMDZc);
}
}
if(b_default)
if(e.preventDefault)
e.preventDefault();
e.returnValue=!b_default;
}
function VWoOu(jKJbj)
{
if(jKJbj==false)
{
var YKTBJ=window;
if(YKTBJ.removeEventListener)
YKTBJ.removeEventListener('DOMMouseScroll',cZpQi,false);
YKTBJ.onmousewheel=null
}
else
{
var YKTBJ=window;
if(YKTBJ.addEventListener)
YKTBJ.addEventListener('DOMMouseScroll',cZpQi,false);
YKTBJ.onmousewheel=cZpQi
}
}
function agEOf(QrEmA,hxriZ,urUPi,LNUci,DHihi,GpbUX)
{
var htlqX=""
htlqX+="(";
htlqX+=QrEmA+";"+hxriZ+";"+urUPi+";"+LNUci+";";
htlqX+=DHihi+";";
htlqX+=GpbUX;
htlqX+=")";
return htlqX;
}
function WA_photoAlbumAction(VMDZc,vmVdH)
{
var iZnTI=YDWum(VMDZc)
var SJpnx=iZnTI.hTmxe[vmVdH]
var n_action=SJpnx.n_action
if((n_action=="<")||(n_action=="up"))
{
iZnTI.MSGpM=Math.max(0,iZnTI.MSGpM-1)
NMavd(VMDZc)
}
if((n_action==">")||(n_action=="down"))
{
iZnTI.MSGpM=Math.min(iZnTI.ItrfL_pages-1,iZnTI.MSGpM+1)
NMavd(VMDZc)
}
if(n_action=="diapo")
{
pZIel(VMDZc)
}
if(n_action=="+")
{
iZnTI.QpoFf()
}
}
function WA_photoAlbumIncrease(VMDZc,vmVdH)
{
var iZnTI=YDWum(VMDZc)
iZnTI.DbYIq=vmVdH
iZnTI.QpoFf()
}
function pZIel(VMDZc)
{
var iZnTI=YDWum(VMDZc)
if(iZnTI.XQmZH()==false)
{
var ItrfL_increase=0;
var FNVKl=iZnTI;
while(FNVKl.MJZlq())
{
FNVKl=FNVKl.QpoFf()
ItrfL_increase++}
if(ItrfL_increase>0)
{
FNVKl.ItrfL_decrease_view_when_diaporama_stop=ItrfL_increase;
WA_goNextDiaporama(VMDZc)
FNVKl.hPIXq()
return;
}
}
if(iZnTI.XQmZH())
{
OgjUo(VMDZc)
}
else
{
WA_goNextDiaporama(VMDZc)
}
if(iZnTI.iHdJa())
{
var SJpnx=iZnTI.hTmxe_by_action["diapo"]
SJpnx.draw()
}
}
function OgjUo(VMDZc)
{
var iZnTI=YDWum(VMDZc)
if(iZnTI.XQmZH())
{
iZnTI.Xunkl()
if(iZnTI.ItrfL_decrease_view_when_diaporama_stop)
{
var FNVKl=iZnTI;
for(var n=0;n<iZnTI.ItrfL_decrease_view_when_diaporama_stop;n++)
{
FNVKl=FNVKl.DOIwx() 
}
return;
}
}
if(iZnTI.iHdJa())
{
var SJpnx=iZnTI.hTmxe_by_action["diapo"]
SJpnx.draw()
}
}
function WA_goNextDiaporama(VMDZc)
{
var nNApk=cpjVj(VMDZc)
var aapMi=llZdb(VMDZc)
var iZnTI=YDWum(VMDZc)
var vmVdH=(iZnTI.DbYIq+1)%aapMi.length;
if(nNApk.diaporama.random)
{
vmVdH=Math.round((aapMi.length-1)*Math.random());
}
WA_photoAlbumActionThumb(VMDZc,vmVdH)
iZnTI.mFMaX=wa_timeout("WA_goNextDiaporama('"+VMDZc+"')",nNApk.diaporama.time*1000)
}
function aAobB(VMDZc,vmVdH)
{
var iZnTI=YDWum(VMDZc)
if(vmVdH<0)
{
iZnTI.uFAhP()
return false;
}
if(vmVdH>iZnTI.ItrfL_images-1)
{
iZnTI.uFAhP()
return false;
}
WA_photoAlbumActionThumb(VMDZc,vmVdH)
return true;
}
function KdsUU(VMDZc)
{
var iZnTI=YDWum(VMDZc)
if(iZnTI.XQmZH()) return false;
return aAobB(VMDZc,iZnTI.DbYIq+1)
}
function qBZDw(VMDZc)
{
var iZnTI=YDWum(VMDZc)
if(iZnTI.XQmZH()) return false;
return aAobB(VMDZc,iZnTI.DbYIq-1)
}
function WA_clickAlbumPreview(VMDZc)
{
var iZnTI=YDWum(VMDZc)
if(iZnTI.OYPDw()) return;
if(iZnTI.XQmZH())
{
OgjUo(VMDZc)
}
var BcZVw=iZnTI.pASJK
if(BcZVw!=-1)
{
if(BcZVw==2)KdsUU(VMDZc)
if(BcZVw==1)
{
if(iZnTI.NxRXt())
{
iZnTI.DOIwx()
}
else
if(iZnTI.MJZlq())
{
iZnTI.QpoFf()
}
}
if(BcZVw==0)qBZDw(VMDZc)
}
}
function WA_mouseoutAlbumPreview(e,VMDZc)
{
var iZnTI=YDWum(VMDZc)
iZnTI.uexkP.setVisible(false)
iZnTI.pASJK=-1;
}
function WA_mousemoveAlbumPreview(e,VMDZc)
{
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 iZnTI=YDWum(VMDZc)
var ZUKbm=document.getElementById(iZnTI.uexkP.divId())
var pt=html_findPos(ZUKbm.offsetParent)
var x=posx-pt.x+1;
var y=posy-pt.y+1;
var n_pos=-1
var AQZlU=false;
var xUhTf=0;
var JGhbi=30;
if(iZnTI.tglRo!=true)
if(iZnTI.XQmZH()==false)
{
if((x>0)&&(x<iZnTI.hLNOl_preview.width))
if((y>0)&&(y<iZnTI.hLNOl_preview.height))
{
n_pos=1;
if(x<iZnTI.hLNOl_preview.width*0.3)n_pos=0;
if(x>iZnTI.hLNOl_preview.width*(1-0.3))n_pos=2;
}
if((x<xUhTf)||(x>iZnTI.hLNOl_preview.width-xUhTf-JGhbi))AQZlU=true;
if((y<xUhTf)||(y>iZnTI.hLNOl_preview.height-xUhTf-JGhbi))AQZlU=true;
}
iZnTI.VGisY=new Point(x,y);
iZnTI.pASJK=n_pos;
iZnTI.ilwDJ=AQZlU;
iZnTI.seOXC();
}
function NMavd(VMDZc)
{
var iZnTI=YDWum(VMDZc)
var oVkvH=document.getElementById(iZnTI.mJJvw)
if(!oVkvH)return;
var PgUmX;
var YFiwv=0;
var size_thumb=iZnTI.osSjv;
var pOHsA=iZnTI.pOHsA;
var NhJwS=0;
var nAaDH=(size_thumb+2*iZnTI.QoBGV_thumbnail+pOHsA);
var jQUPF=iZnTI.ItrfL_cols*iZnTI.ItrfL_rows;
if(iZnTI.NfBOd)
{
NhJwS=iZnTI.MSGpM*iZnTI.ItrfL_cols*nAaDH
}
else
{
NhJwS=iZnTI.MSGpM*iZnTI.ItrfL_rows*nAaDH
}
if(iZnTI.NfBOd)
{
PgUmX="scrollLeft"
YFiwv=oVkvH.scrollLeft
}
else
{
PgUmX="scrollTop"
YFiwv=oVkvH.scrollTop
}
if(YFiwv==NhJwS)
{
return;
}
if(iZnTI.m_tween_slider)
{
iZnTI.m_tween_slider.stop()
}
var wugSt=0.7;
iZnTI.m_tween_slider=new Tween(oVkvH,PgUmX,Tween.strongEaseOut,YFiwv,NhJwS,wugSt);
iZnTI.m_tween_slider.onMotionFinished=IBElX
iZnTI.m_tween_slider.iZnTI=iZnTI
iZnTI.m_tween_slider.start() 
}
function IBElX()
{
var iZnTI=this.iZnTI
iZnTI.fuoUl()
}
function OIdwZ(VMDZc)
{
return wa_global_photo_album[VMDZc]
}
function YDWum(VMDZc)
{
return wa_global_photo_album[VMDZc].album_object
}
function llZdb(VMDZc)
{
return wa_global_photo_album[VMDZc].def
}
function AxFFf(VMDZc)
{
return wa_global_photo_album[VMDZc].src_folder
}
function cpjVj(VMDZc)
{
return wa_global_photo_album[VMDZc].layout
}
function gAbAu(qVxMS)
{
var VMDZc=qVxMS[0] 


WA_addHandler(VMDZc,"mousewheel",XXPKr)
WA_addHandler(VMDZc,"keydown",MveOi)
var rmbav="photo-album-main-"+VMDZc
var iOMFQ=OIdwZ(VMDZc)
var hLNOl=new Rect()
hLNOl.copy(iOMFQ.size_container) 
var iZnTI=new oIYjc(VMDZc,iOMFQ) 
iOMFQ.album_object=iZnTI;
iOMFQ.FQkuU=iZnTI 
iZnTI.Duwdf.copy(hLNOl)
iZnTI.FpNMv=iOMFQ.layout.selector
iZnTI.nNApk_previewZone=iOMFQ.layout.preview
iZnTI.wOMfQ(rmbav) 

var iZnTI=YDWum(VMDZc)
var uHrgJ=document.wa_global_query_info
if(uHrgJ)
{
if(VMDZc==uHrgJ.m_unid)
{
iZnTI.DbYIq=uHrgJ.m_index_item
iZnTI.QpoFf()
return;
}
}
if(iZnTI.OYPDw())
{
pZIel(VMDZc)
return;
}
}
function WA_registerAlbum(VMDZc)
{
YDWum(VMDZc).Bgwmd()
}
function MveOi(VMDZc,qVxMS)
{
var vjLlk=qVxMS[0]
if(vjLlk==37) return qBZDw(VMDZc);
if(vjLlk==39) return KdsUU(VMDZc);
return true;
}
function XXPKr(VMDZc,FQTtd)
{
var GZpfe=FQTtd[0] 
if(GZpfe>0)return qBZDw(VMDZc);
if(GZpfe<0)return KdsUU(VMDZc);
return true;
}
function WA_PhotoAlbum_resizeUI()
{
if(wa_global_photo_album.fullpage_object)
{
var iZnTI=wa_global_photo_album.fullpage_object
if(wa_global_photo_album.RDTba)
{
clearTimeout(wa_global_photo_album.RDTba);
}
var hLNOl=new Rect(0,0,getWindowSize().width,getWindowSize().height)
iZnTI.Duwdf.copy(hLNOl)
iZnTI.Wnxfk()
wa_global_photo_album.RDTba=wa_timeout("WA_PhotoAlbum_delayed_resizeUI()",1000)
}
}
function WA_PhotoAlbum_delayed_resizeUI()
{
if(wa_global_photo_album.fullpage_object)
{
wa_global_photo_album.RDTba=false
var iZnTI=wa_global_photo_album.fullpage_object
iZnTI.ZQBGg()
}
}
function WA_loadPhotoAlbums()
{
for(var vjLlk in wa_global_photo_album)
{
var iOMFQ=wa_global_photo_album[vjLlk]
var hOuHc=Translator.m_lang_for_filename
if(hOuHc.length>0)hOuHc="_"+hOuHc;
WA_loadScript(iOMFQ.src_folder+'/photo-album-definition'+hOuHc+'.js?v='+iOMFQ.id_modif,gAbAu,[vjLlk]);
}
}

-->
