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/ps_slide1.jpg",
"images/ps_comslide1.jpg",
"images/ps_slide2.jpg",
"images/ps_comslide2.jpg",
"images/ps_slide3.jpg",
"images/ps_comslide3.jpg",
"images/ps_slide4.jpg",
"images/ps_comslide4.jpg",
"images/ps_slide5.jpg",
"images/ps_comslide5.jpg",
"images/ps_slide6.jpg"
);
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];
   }
}

