function InitPage () {
	AddtoOldBrowsers()
	PreloadTabs();
}

/* TAB Functions ------------------
	For these  functions to work, all the tab images must be stored in the same folder
	AND the active one's must have the filename of the non-active with _act before the extention.
	For example tabx.gif and tabx_act.gif
----------------------------------*/

function HighlightTab (theLink) {theLink.firstChild.src = theLink.firstChild.src.replace(".gif", "_act.gif");}

function RestoreTab (theLink) {theLink.firstChild.src = theLink.firstChild.src.replace("_act", "");}

/*---------------------------
	Arguably it would be easier to list the images to preload manually
	Instead of relying on the correct HTML structure of the tabs being maintained
	To be monitored.
---------------------------*/			
function PreloadTabs () {
	theNavUL = FindFirstChildbyTagName (document.getElementById("MainNav").childNodes, "ul");
	if (!theNavUL) return;
	srcArray = new Array();
	
	for (i=0;i<theNavUL.childNodes.length;i++) {
		if (
			!isUndefined(theNavUL.childNodes[i].tagName) && theNavUL.childNodes[i].tagName.toLowerCase() == "li" &&
			!isUndefined(theNavUL.childNodes[i].firstChild.tagName) && theNavUL.childNodes[i].firstChild.tagName.toLowerCase() == "a" && 
			theNavUL.childNodes[i].firstChild.firstChild.src.indexOf("_act") == -1
			) 
			{
				srcArray.push(theNavUL.childNodes[i].firstChild.firstChild.src.replace(".gif", "_act.gif"));
			}
	}
	PreloadImages (srcArray)
}