var imagenumber = 8 ; 
var randomnumber = Math.random() ; 
var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1 ; 
images = new Array 
images[1] = "http://www2.slac.stanford.edu/vvc/images/image1.jpg"
images[2] = "http://www2.slac.stanford.edu/vvc/images/image2.jpg"
images[3] = "http://www2.slac.stanford.edu/vvc/images/image3.jpg"
images[4] = "http://www2.slac.stanford.edu/vvc/images/image4.jpg"
images[5] = "http://www2.slac.stanford.edu/vvc/images/image5.jpg"
images[6] = "http://www2.slac.stanford.edu/vvc/images/image6.jpg"
images[7] = "http://www2.slac.stanford.edu/vvc/images/image7.jpg"
images[8] = "http://www2.slac.stanford.edu/vvc/images/image8.jpg"
var image = images[rand1]

links = new Array
links[1] = "http://www2.slac.stanford.edu/vvc/images.html"
links[2] = "http://www2.slac.stanford.edu/vvc/images.html"
links[3] = "http://www2.slac.stanford.edu/vvc/images.html"
links[4] = "http://www2.slac.stanford.edu/vvc/images.html"
links[5] = "http://www2.slac.stanford.edu/vvc/images.html"
links[6] = "http://www2.slac.stanford.edu/vvc/images.html"
links[7] = "http://www2.slac.stanford.edu/vvc/images.html"
links[8] = "http://www2.slac.stanford.edu/vvc/images.html"
var link = links[rand1]

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);