function get_random()
{

// Make sure that random()*X) has the correct
// number. The number of images defined below.
var ranNum= Math.floor(Math.random()*5);
return ranNum;
}
var whichImg=get_random();

function show_image() {

// Add your images here.
// Make sure that Array(X) has the number
// of images that you want to include
var img=new Array(5)
img[0]="images/ps_topbanner1.jpg";
img[1]="images/ps_topbanner2.jpg";
img[2]="images/ps_topbanner3.jpg";
img[3]="images/ps_topbanner4.jpg";
img[4]="images/ps_topbanner5.jpg";
 // Here the actual displaying of the image is taking place.
document.write("<img src='");
document.write(img[whichImg]);
document.write("' border='0' />");
}

function goImgWin(myImage,myWidth,myHeight,origLeft,origTop) {
myHeight += 24;
myWidth += 24;
TheImgWin = window.open(myImage,'image','height=' +
myHeight + ',width=' + myWidth +
',toolbar=no,directories=no,status=no,' +
'menubar=no,scrollbars=no,resizable=no');
TheImgWin.resizeTo(myWidth+2,myHeight+30);
TheImgWin.moveTo(origLeft,origTop);
TheImgWin.focus();
}

// Image slide show
NewImg = new Array (
"images/slide1.gif",
"images/slide2.gif",
"images/slide3.gif",
"images/slide4.gif",
"images/slide5.gif",
"images/slide6.gif",
"images/slide7.gif",
"images/slide8.gif",
"images/slide9.gif",
"images/slide10.gif"
);
var ImgNum = 0;
var ImgLength = NewImg.length - 1;

//Time delay between Slides in milliseconds
var delay = 6000;

var lock = false;
var run;
run = setInterval("chgImg(1)", delay);

function chgImg(direction) {
if (document.images) {
ImgNum = ImgNum + direction;
if (ImgNum > ImgLength) {
ImgNum = 0;
}
if (ImgNum < 0) {
ImgNum = ImgLength;
}
document.slideshow.src = NewImg[ImgNum];
   }
}


