startList = function() {
	if (document.all&&document.getElementById) {
		var navRoot = document.getElementById("mainNav");
		if(!navRoot) { return; } // navRoot won't exist if it's been overwritten with flash movie
		for (var 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", "");
				}
			}
		}
	}
}

function setFonts() {
	var bIsMac = navigator.platform.toLowerCase().indexOf('mac')  != -1;
	
	if(bIsMac) {
		var oBody = document.getElementsByTagName('body')[0];
		oBody.style.fontFamily = 'Arial, sans-serif';
	}
}

fixScale = function(oImage) {
	
		// get initial width
		var nCSSWidth = oImage.width;
		
		// set width to auto
		oImage.style.width = 'auto';
		oImage.style.height = 'auto';
		var nNaturalWidth = oImage.width;
		var nNaturalHeight = oImage.height;
		
		// get the amount the image has been scaled by
		var nScale = nCSSWidth / nNaturalWidth;
		
		// temporarily hide image while we resize it
		var sInitDisplay = oImage.style.display;
		oImage.style.display = 'none';
		
		// scale the image
		var nNewWidth = Math.round(nNaturalWidth * nScale);
		var nNewHeight = Math.round(nNaturalHeight * nScale);
		oImage.style.width = null;
		oImage.style.height = null;
		oImage.height = nNewHeight;
		oImage.width = nNewWidth;
		
		// show the image again
		oImage.style.display = sInitDisplay;		
}


function fixContentWidth()
{

	var content = document.getElementById("content");
	

	
	if (content.offsetWidth > 390 && content.offsetWidth < 430)
	{
		
		content.style.width = "388px";		
		content.width = "388px";				
	}
}

function initBodyOnLoad() 
{
	//document.getElementById('noflash').style.visibility = 'hidden';
	
	// fix the bloody dropdown menus for IE
	startList();
	// set mac font to arial
	setFonts();

		
	// show body element once loaded
	//oBody.style.visibility = 'visible';

}
