
/* Internet Explorer does not properly render a submenu without a link in the title.
     the "insertMenuFixDivs" function inserts div tags into the title of each submenu
     to fix the problem. */

	function insertMenuFixDivs(nodeArray)
	{
		for (var i=0; i<nodeArray.length; i++) {
		
			if (nodeArray[i].tagName=='LI')
			{
				targetNodeSet = nodeArray[i].childNodes;
				
				for (var j=0; j<targetNodeSet.length; j++) {
					if ((targetNodeSet[j].nodeType==3)&&(targetNodeSet[j].nextSibling.tagName=='UL'))
					{
						newNode = document.createElement('div');
						newNode.setAttribute('class','iemenufix');
						newNode.appendChild(document.createTextNode(targetNodeSet[j].nodeValue));
						targetNodeSet[j].parentNode.replaceChild(newNode, targetNodeSet[j]);
						insertMenuFixDivs(targetNodeSet[j].nextSibling.childNodes);
					}
				}
			}
		}
	}

sfHover = function() {
//	var mnuEl1 = document.getElementById("ctl00_mmgTopNav_Menu1");
//	var sfEls1 = mnuEl1.getElementsByTagName("LI");
//	for (var i=0; i<sfEls1.length; i++) {
//		sfEls1[i].onmouseover=function() {
//			this.className+=" sfhover";
//		}
//		sfEls1[i].onmouseout=function() {
//			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
//		}
//	}
//	
//	if (mnuEl1.childNodes.length > 1)
//	{
//		insertMenuFixDivs(mnuEl1.childNodes[1].childNodes);
//	}
	
	var mnuEl2 = document.getElementById("ctl00_mmgTopNav_Menu2");
	var sfEls2 = mnuEl2.getElementsByTagName("LI");
	for (var i=0; i<sfEls2.length; i++) {
		sfEls2[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls2[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
	
	if (mnuEl2.childNodes.length > 1)
	{
		insertMenuFixDivs(mnuEl2.childNodes[1].childNodes);
	}
	
	var mnuEl3 = document.getElementById("ctl00_mmgTopNav_Menu3");
	var sfEls3 = mnuEl3.getElementsByTagName("LI");
	for (var i=0; i<sfEls3.length; i++) {
		sfEls3[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls3[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
	
	if (mnuEl3.childNodes.length > 1)
	{
		insertMenuFixDivs(mnuEl3.childNodes[1].childNodes);
	}
	
	var mnuEl4 = document.getElementById("ctl00_mmgTopNav_Menu4");
	var sfEls4 = mnuEl4.getElementsByTagName("LI");
	for (var i=0; i<sfEls4.length; i++) {
		sfEls4[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls4[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
	
	if (mnuEl4.childNodes.length > 1)
	{
		insertMenuFixDivs(mnuEl4.childNodes[1].childNodes);
	}
	
	var mnuEl5 = document.getElementById("ctl00_mmgTopNav_Menu5");
	var sfEls5 = mnuEl5.getElementsByTagName("LI");
	for (var i=0; i<sfEls5.length; i++) {
		sfEls5[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls5[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
	
	if (mnuEl5.childNodes.length > 1)
	{
		insertMenuFixDivs(mnuEl5.childNodes[1].childNodes);
	}
	
	var mnuEl6 = document.getElementById("ctl00_mmgTopNav_Menu6");
	var sfEls6 = mnuEl6.getElementsByTagName("LI");
	for (var i=0; i<sfEls6.length; i++) {
		sfEls6[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls6[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
	
	if (mnuEl6.childNodes.length > 1)
	{
		insertMenuFixDivs(mnuEl6.childNodes[1].childNodes);
	}
	
	var mnuEl7 = document.getElementById("ctl00_mmgTopNav_Menu7");
	var sfEls7 = mnuEl7.getElementsByTagName("LI");
	for (var i=0; i<sfEls7.length; i++) {
		sfEls7[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls7[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
	
	if (mnuEl7.childNodes.length > 1)
	{
		insertMenuFixDivs(mnuEl7.childNodes[1].childNodes);
	}
	
	

}
if (window.attachEvent) window.attachEvent("onload", sfHover);
