function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; 
	document.MM_sr=new Array; 
	for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null)
	 {
	   document.MM_sr[j++]=x; 
		 if(!x.oSrc) 
		   x.oSrc=x.src; 
		 x.src=a[i+2];}
}

function MM_findObj(n, d) 
{ //v3.0
  var p,i,x;  
	if(!d) 
	  d=document; 
	if((p=n.indexOf("?"))>0&&parent.frames.length) 
	{
    d=parent.frames[n.substring(p+1)].document; 
		n=n.substring(0,p);
	}
  if(!(x=d[n])&&d.all) 
	  x=d.all[n]; 

	for (i=0;!x&&i<d.forms.length;i++) 
	  x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) 
	  x=MM_findObj(n,d.layers[i].document); 
	
	return x;
}

<!-- super duper simple rollover scripts -->
function rollOff(which)    {
		document.images[which].src = "images/" + which + "_off.gif";    }	
function rollOver(which)    {
		document.images[which].src = "images/b_" + which + "_over.gif";    } 
function rollOn(which)    {
		document.images[which].src = "images/b_" + which + "_on.gif";    }
		
//handle browser resizing problem for navigator 4
if(!window.orig_width) {
  window.onresize = reset_layers;
  window.orig_width = window.innerWidth;
  window.orig_height = window.innerHeight;
}

function reset_layers() {
    if (window.innerWidth != orig_width || window.innerHeight != orig_height) {
      location.reload();
    }
}

function changeImg(whichImg,newSrc) 
{
	if (document.images) 
	{
		document.images[whichImg].src = newSrc;
  }
	  else return;
  }

/* DISPLAY RANDOM PAGE IMAGES */

var PIC_LST1 = new Array('sidebar_1','sidebar_2','sidebar_3','sidebar_4','sidebar_5');
var PIC_LST2 = new Array('sidebar_6','sidebar_7','sidebar_8','sidebar_9','sidebar_10');
var PIC_LST3 = new Array('sidebar_11','sidebar_12','sidebar_13','sidebar_14','sidebar_15');
var PIC_LST4 = new Array('sidebar_16','sidebar_17','sidebar_18','sidebar_19','sidebar_20');
var PIC_LST5 = new Array('sidebar_21','sidebar_22','sidebar_23','sidebar_24','sidebar_25');

function getRandomPic() 
{
	return (Math.floor(Math.random() * PIC_LST1.length));
}
	
function displayPics() 
{

  var a       = getRandomPic();
  var b       = getRandomPic();
  var c       = getRandomPic();
  var d       = getRandomPic();
  var e       = getRandomPic();

//  while (a == b) 
//  {
//    b = getRandomPic();
// 	}

  var thePic1  = "images/" + PIC_LST1[a] + ".jpg";
  var thePic2  = "images/" + PIC_LST2[b] + ".jpg";
  var thePic3  = "images/" + PIC_LST3[c] + ".jpg";
  var thePic4  = "images/" + PIC_LST4[d] + ".jpg";
  var thePic5  = "images/" + PIC_LST5[e] + ".jpg";
	
	changeImg("rPic1",thePic1);
	changeImg("rPic2",thePic2);	
	changeImg("rPic3",thePic3);
	changeImg("rPic4",thePic4);	
	changeImg("rPic5",thePic5);
}

function DisplayRandomPics()
{
  var a       = getRandomPic();
  var b       = getRandomPic();
  var c       = getRandomPic();
  var d       = getRandomPic();
  var e       = getRandomPic();

  var thePic1  = "images\\" + PIC_LST1[a] + ".jpg";
  var thePic2  = "images\\" + PIC_LST2[b] + ".jpg";
  var thePic3  = "images\\" + PIC_LST3[c] + ".jpg";
  var thePic4  = "images\\" + PIC_LST4[d] + ".jpg";
  var thePic5  = "images\\" + PIC_LST5[e] + ".jpg";

  document.write("<img src=\"" + thePic1 + "\" width=\"165\" height=\"125\" border=\"0\" name=\"rPic1\" id=\"rPic1\"><br>");
  document.write("<img src=\"" + thePic2 + "\"width=\"165\" height=\"125\" border=\"0\" name=\"rPic2\" id=\"rPic2\"><br>");
  document.write("<img src=\"" + thePic3 + "\"width=\"165\" height=\"125\" border=\"0\" name=\"rPic3\" id=\"rPic3\"><br>");
  document.write("<img src=\"" + thePic4 + "\"width=\"165\" height=\"125\" border=\"0\" name=\"rPic4\" id=\"rPic4\"><br>");		 
  document.write("<img src\""  + thePic5 + "\"width=\"165\" height=\"125\" border=\"0\" name=\"rPic5\" id=\"rPic5\">");

}
