// script to randomly assign background image
// for nonobscouriers.com	by eightize.com
// modified: oct 20 2006	by: mb

// name of the object to assign background image to
var bgObj="footer";
// number of images
var bgImgs=6;
// filename of images, with * where the number is
// ie "image*.jpg" for "image1.jpg"
var bgName="gifs/filmstrip*.jpg";
// set rootPath to the path back to the base directory that gifs starts at
// alternately, you can set the image names from the root
// ie. "/gifs/image*.jpg"
var rootPath=rootPath?rootPath:"";

var curImgNo=parseInt(Math.random()*bgImgs)+1;
var curImg=bgName.replace("*",curImgNo);

if (document.getElementById) var thisDiv = document.getElementById(bgObj);
else if (document.all) var thisDiv = document.all[bgObj];
// fail silently
if (thisDiv)  {
	// go through this element
	if (thisDiv.style) thisDiv.style.backgroundImage="url("+rootPath+curImg+")";
}
