function slide(_1,_2,_3,_4,_5){
this.src=_1;
this.link=_2;
this.text=_3;
this.target=_4;
this.attr=_5;
if(document.images){
this.image=new Image();
}
this.loaded=false;
this.load=function(){
if(!document.images){
return;
}
if(!this.loaded){
this.image.src=this.src;
this.loaded=true;
}
};
this.hotlink=function(){
var _6;
if(!this.link){
return;
}
if(this.target){
if(this.attr){
_6=window.open(this.link,this.target,this.attr);
}else{
_6=window.open(this.link,this.target);
}
if(_6&&_6.focus){
_6.focus();
}
}else{
location.href=this.link;
}
};
}
function slideshow(_7){
this.name=_7;
this.repeat=true;
this.prefetch=-1;
this.image;
this.textid;
this.textarea;
this.timeout=3000;
this.slides=new Array();
this.current=0;
this.timeoutid=0;
this.add_slide=function(_8){
var i=this.slides.length;
if(this.prefetch==-1){
_8.load();
}
this.slides[i]=_8;
};
this.play=function(_a){
this.pause();
if(_a){
this.timeout=_a;
}
if(typeof this.slides[this.current].timeout!="undefined"){
_a=this.slides[this.current].timeout;
}else{
_a=this.timeout;
}
this.timeoutid=setTimeout(this.name+".loop()",_a);
};
this.pause=function(){
if(this.timeoutid!=0){
clearTimeout(this.timeoutid);
this.timeoutid=0;
}
};
this.update=function(){
if(!this.valid_image()){
return;
}
if(typeof this.pre_update_hook=="function"){
this.pre_update_hook();
}
var _b=this.slides[this.current];
var _c=false;
if(this.image&&typeof this.image.filters!="undefined"&&typeof this.image.filters[0]!="undefined"){
_c=true;
}
_b.load();
if(_c){
if(_b.filter&&this.image.style&&this.image.style.filter){
this.image.style.filter=_b.filter;
}
this.image.filters[0].Apply();
}
this.image.src=_b.image.src;
if(_c){
this.image.filters[0].Play();
}
this.display_text();
if(typeof this.post_update_hook=="function"){
this.post_update_hook();
}
if(this.prefetch>0){
var _d,_e,_f;
_d=this.current;
_e=this.current;
_f=0;
do{
if(++_d>=this.slides.length){
_d=0;
}
if(--_e<0){
_e=this.slides.length-1;
}
this.slides[_d].load();
this.slides[_e].load();
}while(++_f<this.prefetch);
}
};
this.goto_slide=function(n){
if(n==-1){
n=this.slides.length-1;
}
if(n<this.slides.length&&n>=0){
this.current=n;
}
this.update();
};
this.goto_random_slide=function(_11){
var i;
if(this.slides.length>1){
do{
i=Math.floor(Math.random()*this.slides.length);
}while(i==this.current);
this.goto_slide(i);
}
};
this.next=function(){
if(this.current<this.slides.length-1){
this.current++;
}else{
if(this.repeat){
this.current=0;
}
}
this.update();
};
this.previous=function(){
if(this.current>0){
this.current--;
}else{
if(this.repeat){
this.current=this.slides.length-1;
}
}
this.update();
};
this.shuffle=function(){
var i,i2,_15,_16;
_15=new Array();
for(i=0;i<this.slides.length;i++){
_15[i]=this.slides[i];
}
_16=new Array();
do{
i=Math.floor(Math.random()*_15.length);
_16[_16.length]=_15[i];
for(i2=i+1;i2<_15.length;i2++){
_15[i2-1]=_15[i2];
}
_15.length--;
}while(_15.length);
this.slides=_16;
};
this.get_text=function(){
return (this.slides[this.current].text);
};
this.get_all_text=function(_17,_18){
all_text="";
for(i=0;i<this.slides.length;i++){
slide=this.slides[i];
if(slide.text){
all_text+=_17+slide.text+_18;
}
}
return (all_text);
};
this.display_text=function(_19){
if(!_19){
_19=this.slides[this.current].text;
}
if(this.textarea&&typeof this.textarea.value!="undefined"){
this.textarea.value=_19;
}
if(this.textid){
r=this.getElementById(this.textid);
if(!r){
return false;
}
if(typeof r.innerHTML=="undefined"){
return false;
}
r.innerHTML=_19;
}
};
this.hotlink=function(){
this.slides[this.current].hotlink();
};
this.save_position=function(_1a){
if(!_1a){
_1a=this.name+"_slideshow";
}
document.cookie=_1a+"="+this.current;
};
this.restore_position=function(_1b){
if(!_1b){
_1b=this.name+"_slideshow";
}
var _1c=_1b+"=";
if(document.cookie.length>0){
offset=document.cookie.indexOf(_1c);
if(offset!=-1){
offset+=_1c.length;
end=document.cookie.indexOf(";",offset);
if(end==-1){
end=document.cookie.length;
}
this.current=parseInt(unescape(document.cookie.substring(offset,end)));
}
}
};
this.noscript=function(){
$html="\n";
for(i=0;i<this.slides.length;i++){
slide=this.slides[i];
$html+="<P>";
if(slide.link){
$html+="<a href=\""+slide.link+"\">";
}
$html+="<img src=\""+slide.src+"\" ALT=\"slideshow image\">";
if(slide.link){
$html+="</a>";
}
if(slide.text){
$html+="<BR>\n"+slide.text;
}
$html+="</P>"+"\n\n";
}
$html=$html.replace(/\&/g,"&amp;");
$html=$html.replace(/</g,"&lt;");
$html=$html.replace(/>/g,"&gt;");
return ("<pre>"+$html+"</pre>");
};
this.loop=function(){
if(this.current<this.slides.length-1){
next_slide=this.slides[this.current+1];
if(next_slide.image.complete==null||next_slide.image.complete){
this.next();
}
}else{
this.next();
}
this.play();
};
this.valid_image=function(){
if(!this.image){
return false;
}else{
return true;
}
};
this.getElementById=function(_1d){
if(document.getElementById){
return document.getElementById(_1d);
}else{
if(document.all){
return document.all[_1d];
}else{
if(document.layers){
return document.layers[_1d];
}else{
return undefined;
}
}
}
};
this.set_image=function(_1e){
if(!document.images){
return;
}
this.image=_1e;
};
this.set_textarea=function(_1f){
this.textarea=_1f;
this.display_text();
};
this.set_textid=function(_20){
this.textid=_20;
this.display_text();
};
}

