browserOk = false;
if ( (parseInt(navigator.appVersion)>=4 )
  || ( navigator.appName == "Netscape"  ) )
  browserOk = true;
// some browsers (like Internet Explorer 3)
// do not support imageswitching. 

// setup slideshow
//
var imgWidth = 250;   // width of all the pictures
var imgHeight = 250;  // height of all the pictures 
var nrURLs;

function imageURLs (pfx) {
   this.p1 = "images/" + pfx + "1.jpg";
   this.p2 = "images/" + pfx + "2.jpg";
   this.p3 = "images/" + pfx + "3.jpg";
   this.p4 = "images/" + pfx + "4.jpg";

   this.length = 4;
   nrURLs = this.length
   return this;
};

listURLs = 0;
if ( browserOk ) {
  listURLs = new imageURLs("ban");
  nextPic  = new Image (imgWidth,imgHeight);
  nextPic.src   = listURLs.p2;
}

currURL = 1;
picID=0;
picDelay = 4000;

function getNextPic() {
  if  ( browserOk ) {
    if ( document.images.pic1.complete == true ) {
      eval( "document.images.pic1.src = nextPic.src" );
      if ( nrURLs > currURL ) {
        currURL += 1;
      } else {
        currURL = 1;
      };
      eval("nextPic.src = listURLs.p"+currURL);
      picID = setTimeout('getNextPic()',picDelay);
    } else {
      picID = setTimeout('getNextPic()',picDelay);
    };
  } else {
    alert("Sorry, Your browser do not support this javascript");
  };
};

function getFirstPic() {
   picID = setTimeout('getNextPic()',picDelay)
};

function dummy() {} // does nothing
