slideActive=true;
function slideShow(targetDiv, rotateSpeed) {
  this._targetDiv=targetDiv;
  this._imageArray=new Array();
  this._captionArray=new Array();
  this._widthArray=new Array();
  this._heightArray=new Array();
  this._currentCount=0;
  this._totalCount=0;
  this._rotateSpeed=rotateSpeed; }
function slideShowStop(obj) {
  document.getElementById("slideShowDiv").style.border="2px solid red";
  slideActive=false; }
function slideShowStart(obj) {
  document.getElementById("slideShowDiv").style.border="2px solid transparent";
  slideActive=true; }
slideShow.prototype.imageLoad=function(imageUrl) {
  var img=new Image();
  img.src=imageUrl;
  this._widthArray[this._totalCount]=img.Width;
  this._heightArray[this._totalCount]=img.Height; }
slideShow.prototype.addImage=function(imageUrl, imageCaption ) {
  this.imageLoad(imageUrl);
  this._imageArray[this._totalCount]=imageUrl;
  this._captionArray[this._totalCount]=imageCaption;
  this._totalCount++; }
slideShow.prototype.startShow=function() {
  var slideOutput;
  slideOutput='<table style="table-layout:fixed"><tr><td align="center" width="300"><img border="0"';
  slideOutput+=' src="' + this._imageArray[this._currentCount]+'" />';
  slideOutput+='</td></tr><tr><td align="center" width="300"><strong>';
  slideOutput+=this._captionArray[this._currentCount]+'</strong></td></tr><tr><td align="center"><small><em>('+slideshowText+')</em></small></td>';
  slideOutput+='</tr></table>';
  document.getElementById("slideShowDiv").innerHTML=slideOutput;
  var self=this;
  this._slideTimer=window.setTimeout(function(){self.nextSlide();},this._rotateSpeed,this._rotateSpeed); }
slideShow.prototype.stopShow=function() { clearTimeout(this._slideTimer); }
slideShow.prototype.nextSlide=function() {
  if ( slideActive ) {
    this._currentCount++;
    if ( this._currentCount==this._totalCount ) { this._currentCount=0; }
    var slideOutput;
    slideOutput='<table style="table-layout:fixed"><tr><td align="center" width="300"><img border="0"';
    slideOutput+=' src="' + this._imageArray[this._currentCount]+'" />';
    slideOutput+='</td></tr></tr><tr><td align="center" width="300"><strong>';
    slideOutput+=this._captionArray[this._currentCount]+'</strong></td></tr><tr><td align="center"><small><em>('+slideshowText+')</em></small></td>';
    slideOutput+='</tr></table>';
    document.getElementById("slideShowDiv").innerHTML=slideOutput; }
  var self=this;
  this._slideTimer=window.setTimeout(function(){self.nextSlide();},this._rotateSpeed,this._rotateSpeed); }