/* Script used to manage the roll-over of the Links icons in the footer */
function Links_Roll(image_name, image_no)
{document[image_name].src = 'images/' + image_name + image_no + '.gif';}

/* Ditto for second level documents */
function Links_Roll2(image_name, image_no)
{document[image_name].src = '../images/' + image_name + image_no + '.gif';}

/* Script used to enable the menus */
/* It scans a document for any elements with an ID of "nav" and add a, OnMouseOver event to any enclosed LI elements */
startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0;
i<navRoot.childNodes.length;
i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}

/* Script used to generate a greeting based on the time of day */
/* It just get the local time and generates a greeting based on the hour of the day */
function getgreeting()
{
var ourdate = new Date();
var timenow=ourdate.getTime();
ourdate.setTime(timenow);
var ourhour = ourdate.getHours();
if (ourhour > 18) greeting = "evening";
else if (ourhour >=12) greeting = "afternoon";
else greeting = "morning";
var OurTag = 'Good ' + greeting + ', you are currently viewing:';
document.write(OurTag);
}

/* Script used to handle the image rollovers for our laboratory pages */
/* imag_no is the number appended to "image" to get the NAME of our IMG object */
/* image_name is the name of the image excluding the extension */
function Image_Roll_Page(image_no, image_name)
{document['image' + image_no].src = '../images/' + image_name + '.jpg';}

