function initMenu()
{
	var objNav = document.getElementById("nav");
	if (objNav)
	{
		var mchilds = getSpecClassElem(objNav,"m_main");

		for(var i=0;i<mchilds.length;i++)
		{
			mchilds[i].onmouseover=function(){showChilds(this);};
			mchilds[i].onmouseout=function(){hideChilds(this);};
		}
	}
}

function showChilds()
{
	var o = arguments[0];
	var m = getSpecClassElem(o, "m_sec");
	if (m.length > 0)
	{
		m[0].className = "m_sec show";
	}
	
}
function hideChilds()
{
	var o = arguments[0];
	var m = getSpecClassElem(o, "m_sec");
	if (m.length > 0)
	{
		m[0].className = "m_sec hide";
	}
}

function getSpecClassElem(e, c)
{
	var childs = e.getElementsByTagName("div");
	var chlds = new Array();
	var j=0;
	for(var i=0; i< childs.length;i++)
	{
		if (childs[i].className.indexOf(c) >=0)
		{
			chlds[j]=childs[i];
			j++;
		}
	}
	
	return chlds;
}
window.onload=initMenu;
