// Initialises the image rollovers for the page
function InitialiseRollovers()
{
	// Check that this browser supports the DOM
	if (!document.getElementById) return false;

	var aimgImages = document.getElementsByTagName("img");
	var strImagePath = "", strImageHighlightPath = "";
	var aimgPreCache = new Array();


	// Go through each img tag in the page
	for (var i = 0; i < aimgImages.length; i++)
	{
		// Look for the correct class name
		if (aimgImages[i].className == "menu")
		{
			// Work out the image paths
			strImagePath = aimgImages[i].getAttribute("src");
			strImageHighlightPath = strImagePath.substring(0, strImagePath.lastIndexOf('.')) + "h" + strImagePath.substring(strImagePath.lastIndexOf('.'));

			// Pre-cache the highlight image
			aimgPreCache[i] = new Image();
			aimgPreCache[i].src = strImageHighlightPath;

			// Create new attributes for the original and highlight images
			aimgImages[i].setAttribute("hsrc", strImageHighlightPath);
			aimgImages[i].setAttribute("xsrc", strImagePath);

			// Set up the onmouseover and onmouseout functions for this image
			aimgImages[i].onmouseover = function() { this.setAttribute("src", this.getAttribute("hsrc")); }
			aimgImages[i].onmouseout = function() { this.setAttribute("src", this.getAttribute("xsrc")); }
		}
	}

	return true;
}
