var fixed=0;
function ieHoverFix(menuId,adminMode) {
	var oMenu = document.getElementById(menuId);
	var ieULs = oMenu.getElementsByTagName('ul');
	
	var ieLIs = oMenu.getElementsByTagName('li');
	for (var i=0; i<ieLIs.length; i++) if (ieLIs[i]) {
			if (ieLIs[i].parentNode.parentNode.tagName=="DIV") {
				var ieLILIs = ieLIs[i].getElementsByTagName('li');
				for (var j=0; j< ieLILIs.length; j++) 
				 	if (ieLILIs[j].id=='houseMenuVCurrentItem')
						ieLIs[i].className=ieLIs[i].className+" uhide";
				ieLIs[i].getElementsByTagName("A")[0].onclick=function() { this.parentNode.className=(this.parentNode.className.indexOf("uhide")>=0?this.parentNode.className.replace(new RegExp("uhide\\b"), ""):this.parentNode.className+" uhide");}
				}
			else {
				ieLIs[i].className=ieLIs[i].className.replace(new RegExp(" sfhover\\b"), "");
				ieLIs[i].onmouseover=function() {this.className=this.className.replace(new RegExp(" nohover\\b"), "") + " sfhover";}
				ieLIs[i].onmouseout=function() {this.className=this.className.replace(new RegExp(" sfhover\\b"), "") + " nohover";}
				ieLIs[i].onclick=null;
				}
			if (ieLIs[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.tagName=="DIV" && ieLIs[i].parentNode.parentNode.tagName=="LI") {
				ieLIs[i].parentNode.parentNode.onclick=function() {fixMenu(menuId, this);}
				}
		}
}

function ieMenuFix(menuId) {

	var oMenu = document.getElementById(menuId);
	
		var ieLIs = oMenu.getElementsByTagName('li');
		for (var i=0; i<ieLIs.length; i++) if (ieLIs[i]) {
			if (ieLIs[i].parentNode.parentNode.tagName=="DIV")
				ieLIs[i].getElementsByTagName("A")[0].onclick=function() {this.parentNode.className=(this.parentNode.className.indexOf("uhide")>0?this.parentNode.className.replace(new RegExp(" uhide\\b"), ""):this.parentNode.className+" uhide");}
			else {
				ieLIs[i].onmouseover=null;
				ieLIs[i].onmouseout=null;
				ieLIs[i].onclick=null;
				}
			if (ieLIs[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.tagName=="DIV" && ieLIs[i].parentNode.parentNode.tagName=="LI") {
				ieLIs[i].parentNode.parentNode.onclick=function() {fixMenu(menuId, this);}
				}
		}
	
}


function fixMenu(menuId, el) {
	if (fixed==0) {
		fixed=1;
		ieMenuFix(menuId);
		}
	else {
		fixed=0;
		ieHoverFix(menuId,0);
		}

}
