
window.addEvent('domready',function(){initPage();$('flech_back').addEvent('click',function(e){e=new Event(e).stop();imgLoader.loadPrevImg();});$('flech_back').addEvent('mouseenter',function(e){e=new Event(e).stop();this.src="imgs/flech_back_on.gif";});$('flech_back').addEvent('mouseleave',function(e){e=new Event(e).stop();this.src="imgs/flech_back_off.gif";});$('flech_next').addEvent('click',function(e){e=new Event(e).stop();imgLoader.loadNextImg();});$('flech_next').addEvent('mouseenter',function(e){e=new Event(e).stop();this.src="imgs/flech_next_on.gif";});$('flech_next').addEvent('mouseleave',function(e){e=new Event(e).stop();this.src="imgs/flech_next_off.gif";});$('imgView').addEvent('click',function(e){e=new Event(e).stop();imgLoader.loadNextImg();});});var imgLoader={allImgData:null,nSelImg:0,initialize:function(data){this.allImgData=data;this.loadImg();},loadNextImg:function(){imgLoader.nSelImg++;if(imgLoader.nSelImg==imgLoader.allImgData.length){imgLoader.nSelImg=0;}
this.loadImg();},loadPrevImg:function(){imgLoader.nSelImg--;if(imgLoader.nSelImg==0){imgLoader.nSelImg=imgLoader.allImgData.length-1;}
this.loadImg();},loadImg:function(){$('loader').style.display='block';$('imgView').empty();var imgViewer=new Asset.image(imgLoader.allImgData[imgLoader.nSelImg],{onload:function(){imgLoader.imageisLoad();}});imgViewer.injectInside('imgView');new Fx.Style('imgView','opacity').set(0);},imageisLoad:function(){$('loader').style.display='none';new Fx.Style('imgView','opacity').start(0,1);}}