
function rand ( n )
{
  return ( Math.floor ( Math.random ( ) * n + 1 ) );
}


// Store some random image URL's

var random_images = new Array ( );
random_images[0] = "images/marqueepic1.jpg";
random_images[1] = "images/marqueepic2.jpg";
random_images[2] = "images/marqueepic3.jpg";


// Pick a random image from the list,
// and set the image source to point to the image

function pick_image ( )
{
  var aryParsedCurrentURL = document.location.href.toString().split('/');
  
  if( aryParsedCurrentURL[aryParsedCurrentURL.length-1] == "index.asp" )
    document.getElementById("random-image").src = random_images[rand(3)-1];
	else
	document.getElementById("random-image").src = random_images[rand(3)-1];
}
