function initImageBrowser(){
imageBrowser=new ImageBrowser();
imageBrowser.init();
}
function ImageBrowser(){
this.altImages=new Array();
this.position=0;
this.wrapperEl=$("slideShowWrap");
this.imgEl=$("themeparkImg");
this.controlsEl=$("slideShowControls");
this.titleEl=$("themeparkImgTitle");
this.imgPath="/content/images/skin/themeparks/slideshow/";
this.init=function(){
var _1;
var _2=$("themeparkAltImages");
if(_2!=null){
var _3=_2.elements;
for(var i=0;i<_3.length;i++){
if(_3[i].name="altImg"){
_1=_3[i].value.split("|");
this.altImages[this.altImages.length]=new ThemeparkAltImages(_1[0],_1[1]);
}
}
}
if(this.altImages.length<=1){
return false;
}
var _5=this;
var _6=document.createElement("a");
_6.innerHTML="&lt;";
_6.className="previous";
_prevImg=function(e){
_5.prevImg(e);
};
Event.observe(_6,"click",_prevImg);
var _8=document.createElement("a");
_8.innerHTML="&gt;";
_8.className="next";
_nextImg=function(e){
_5.nextImg(e);
};
Event.observe(_8,"click",_nextImg,false);
this.controlsEl.insertBefore(_8,this.controlsEl.childNodes[2]);
this.controlsEl.insertBefore(_6,this.controlsEl.childNodes[2]);
return true;
};
this.nextImg=function(){
var _9=this.position+1;
if(_9>this.altImages.length-1){
_9=0;
}
this.showImg(_9);
};
this.prevImg=function(){
var pos=this.position-1;
if(pos<0){
pos=this.altImages.length-1;
}
this.showImg(pos);
};
this.showImg=function(pos){
var img=this.altImages[pos];
this.imgEl.src=this.imgPath+img.name+".jpg";
this.titleEl.innerHTML=img.title+" : "+(pos+1)+" of "+this.altImages.length;
this.position=pos;
};
}
function ThemeparkAltImages(_12,_13){
this.name=_12;
this.title=_13;
}
function schedule(ID,_15){
if($(ID)){
eval(_15);
}else{
setTimeout("schedule('"+ID+"', '"+_15+"')",50);
}
return true;
}
schedule("themeparkImg","initImageBrowser();");

