///////////////////////////////////////////////////////////////////////////////
// For IE: Add OnMouseOver OnMouseOut functionality to navigation as it doesnt
// support the ":hover" CSS2 attribute on non anchors
///////////////////////////////////////////////////////////////////////////////
startList = function() 
	{
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		if (navRoot!=null)
		{
			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", "");
						
					}
				}
			}
		}
	}
}


///////////////////////////////////////////////////////////////////////////////
// Show or hide select lists
///////////////////////////////////////////////////////////////////////////////
function selectVis(show,parent)
{

	var IfrRef = document.getElementById('DivShim');
	var DivRef = parent.getElementsByTagName('UL');
	
	if((show)&&(DivRef.length > 0))
	{
		IfrRef.style.width = DivRef[0].offsetWidth + 'px';
		IfrRef.style.height = DivRef[0].offsetHeight + 'px';
		IfrRef.style.top = DivRef[0].offsetParent.offsetTop + DivRef[0].offsetTop + 'px';
		IfrRef.style.left = DivRef[0].offsetParent.offsetLeft + 'px';
		IfrRef.style.zIndex = DivRef[0].style.zIndex;
		IfrRef.style.display = "block";
   }
   else
	{
		IfrRef.style.display = "none";
	}
}

///////////////////////////////////////////////////////////////////////////////
// HTML Text Area
///////////////////////////////////////////////////////////////////////////////
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {

	// write the iframe
	document.write("<iframe id='DivShim' src='javascript:false;' scrolling='no'	frameborder='0' " +
		"style='position:absolute; top:0px; left:0px; width:0px; height:0px; display:none;'></iframe>");
} 

///////////////////////////////////////////////////////////////////////////////
// On Page load - run the following
///////////////////////////////////////////////////////////////////////////////
window.onload=function()
{
	// enable navigation
	startList();
}
