addOnload(initForm);



window.onunload = function() {};

function addOnload(newFunction) {
	var oldOnload = window.onload;
	
	if (typeof oldOnload == "function") {
		window.onload = function() {
			if (oldOnload) {
				oldOnload();
			}
			newFunction();
		}
	}
	else {
		window.onload = newFunction;
	} 
}




//Rollover
function initForm() {
	document.getElementById("newLocation").selectedIndex = 0;
	document.getElementById("newLocation").onchange = jumpPage;
}

function jumpPage() {
	var newLoc = document.getElementById("newLocation");
	var newPage = newLoc.options[newLoc.selectedIndex].value;

	if (newPage != "") {
		window.location = newPage;
	}
}

						

//Remote Rollovers

function rolloverInit() {
	for (var i=0; i<document.href.length; i++) {
		if (document.href[i].tagName == "A") {
			setupRollover(document.href[i]);
		}
	}
}

function setupRollover(thisImage) {
	thisImage.outImage = new Image();
	thisImage.outImage.src = thisImage.src;
	thisImage.onmouseout = rollOut;

	thisImage.overImage = new Image();
	thisImage.overImage.src = "images/" + thisImage.id + ".jpg";
	thisImage.onmouseover = rollOver;	
}

function rollOver() {
	this.src = this.overImage.src;
}

function rollOut() {
	this.src = this.outImage.src;
}


  if (document.images)
   {
     pic1on= new Image(300, 450);
     pic1on.src="images/titlemd.jpg";  
     pic2on= new Image(300, 450);
     pic2on.src="images/relativisticmd.jpg";  
     pic3on= new Image(300, 450);
     pic3on.src="images/youngearthmd.jpg";  
     pic4on= new Image(300, 450);
     pic4on.src="images/gapmd.jpg";  
     pic5on= new Image(300, 450);
     pic5on.src="images/dayage1md.jpg";  
     pic6on= new Image(300, 450);
     pic6on.src="images/dayage2md.jpg";  
     pic7on= new Image(300, 450);
     pic7on.src="images/frameworkmd.jpg";  
     pic8on= new Image(300, 450);
     pic8on.src="images/timebetweenmd.jpg"; 


     pic1off= new Image(400, 300);
     pic1off.src="images/image7lg.jpg";
   }

function lightup(imgName)
 {
   if (document.images)
    {
      imgOn=eval(imgName + "on.src");
      document[imgName].src= imgOn;
    }
 }

function turnoff(imgName)
 {
   if (document.images)
    {
      imgOff=eval(imgName + "off.src");
      document[imgName].src= imgOff;
    }
 }