function MenuItem( element , IntVal , ElName){
	this.element=element;
	this.IntVal=IntVal;
	this.Parent=null;
	this.Child=new Array();
	this.TimeOut=null;
	this.ElName=ElName;
	this.i=0;

	this.show = function(){
		this.Parent.HideChildren();
		document.getElementById(element).style.display = '';
	};
	this.starthide = function(){
		if(this.TimeOut!=null)
		{
			clearTimeout(this.TimeOut);		
		}
		if(element!="")
			this.TimeOut = setTimeout(ElName+".hide()",this.IntVal);
		if(this.Parent!=null)
		{
			this.Parent.starthide();
		}
	};
	this.hide = function(){
		if(element!="")
			document.getElementById(element).style.display = 'none';
	};
	this.clearme = function (){
		if(element!="")
			clearTimeout(this.TimeOut);
		if(this.Parent!=null)
		{
			this.Parent.clearme();
		}
	};
	this.AddChild = function(el)
	{
		this.Child[this.i]=el;
		this.i++;
	};
	this.HideChildren = function()
	{
		if(this.i==0)
			return;
		for(j=0;j<this.i;j++)
		{
			this.Child[j].hide();
			this.Child[j].HideChildren();
		}
	};
};