var img_src="";var title="";function ImageLoad(_1){img_src=_1.href;title=_1.title;this.title=_1.title;this.href=_1.href;this.preload(this.href);}ImageLoad.prototype.preload=function(_2){if(!$("preload")){var _3=$$("#image img");var e=document.createElement("div");e.id="preload";e.className="file-loading";e.style.width=_3[0].width+"px";e.style.height=_3[0].height+"px";$("image").appendChild(e);}var _5=new Image;_5.onload=ImageLoad.prototype.onload;_5.onerror=ImageLoad.prototype.onerror;_5.onabort=ImageLoad.prototype.onabort;_5.oImagePreloader=this;_5.src=_2;};ImageLoad.prototype.onComplete=function(){var _6=$$("#image img");_6[0].src=img_src;$("image").removeChild($("preload"));};ImageLoad.prototype.onload=function(){if(this.oImagePreloader!=undefined){this.oImagePreloader.onComplete();}else{var _7=$$("#image img");_7[0].src=img_src;$("image").removeChild($("preload"));}};ImageLoad.prototype.onerror=function(){this.bError=true;this.oImagePreloader.onComplete();};ImageLoad.prototype.onabort=function(){this.bAbort=true;this.oImagePreloader.onComplete();};function ImageSwaper(_8){this.linklist=$$(_8);this.index=0;}ImageSwaper.prototype.load=function(_9){this.index=_9;var s=this.linklist[this.index];var x=new ImageLoad(s);this.linklist.each(function(a){a.className="";});this.linklist[this.index].className="selected";};ImageSwaper.prototype.next=function(){if(this.index==this.linklist.length-1){this.index=0;}else{this.index++;}this.load(this.index);};ImageSwaper.prototype.prev=function(){if(this.index==0){this.index=this.linklist.length-1;}else{this.index--;}this.load(this.index);};
