function mouseOverMenu(trToActive, menuToShow, SubMenu)
{
	//if(typeof(trToActive.Menu)!="undefined")hideAllSubMenu();
	if(menuToShow == null && SubMenu==null)
	{
	hideAllSubMenu();
	}
	else
	{
		if(menuToShow!=null && SubMenu ==null)
		{
			hideAllSubMenu();
			//trToActive.style.color = "a10000";
			//trToActive.style.backgroundColor = "ffffff";
			var xPos = parseInt(trToActive.offsetLeft);
			var yPos = parseInt(trToActive.offsetTop);
			menuToShow.style.left = xPos + 174;
			menuToShow.style.top = yPos + 237;
		}
	}
	trToActive.style.color = "a10000";
	trToActive.style.backgroundColor = "ffffff";	
	
	//alert('ferst=' + trToActive.Menu + ' second=' + menuToShow);	
}
function mouseOutMenu(trToActive, menuToHide)
{
	if(typeof(trToActive.SubMenu)=="undefined")
	{
	trToActive.style.color = "ffffff";
	trToActive.style.backgroundColor = "a10000";	
	}	
}
function hideAllSubMenu(ch)
{
	hideAllSubMenu();
}
function hideAllSubMenu()
{
	document.getElementById('m3').style.color = "ffffff";
	document.getElementById('m3').style.backgroundColor = "a10000";
	document.getElementById('sm3').style.left = -200;
	document.getElementById('sm3').style.top = -1000;
	//m4.style.color = "ffffff";
	//m4.style.backgroundColor = "a10000";
	//sm4.style.left = -200;
	//sm4.style.top = -1000;
	document.getElementById('m5').style.color = "ffffff";
	document.getElementById('m5').style.backgroundColor = "a10000";
	document.getElementById('sm5').style.left = -200;
	document.getElementById('sm5').style.top = -1000;
	document.getElementById('m6').style.color = "ffffff";
	document.getElementById('m6').style.backgroundColor = "a10000";
	document.getElementById('sm6').style.left = -200;
	document.getElementById('sm6').style.top = -1000;
}
function goPage(src)
{
	window.location.href =  src;
}
function clickEvent(evn)
{
	var ua = navigator.userAgent.toLowerCase()
		
	if (ua.indexOf("msie") != -1)
	{
		if(typeof(event.srcElement.I)=="undefined")
		{
			//alert(event.srcElement.I);
			hideAllSubMenu();
		}
		//src = event.srcElement.id;		
	}else{
		var src = evn.target.getAttribute('i');
			
		if (src == null)
		{
			hideAllSubMenu();
		}				
		/*if (typeof(src.i)=="undefined")
		{
			alert(src.getAttribute('i'));
			//hideAllSubMenu();
		}
		else
		{
			alert(src.i);
		}*/		
	}
	
	
	/*if(typeof(event.srcElement.I)=="undefined")
	{
	if(typeof(event.srcElement.I)=="undefined")
	alert(event.srcElement.I);
	hideAllSubMenu();
	}*/
}
document.onmousedown = clickEvent;
