function menu( theid, timout ){
	this.id = theid;
	this.idTimeout = null;
	this.isClearing = false;
	this.timt = timout;
	
	//this.hide = hideMenu;
	this.show = showMenu;
}

function hideMenu(isCl,id){
	if ( isCl )
		return;

	//document.getElementById( this.id ).style.visibility = 'hidden';
	document.getElementById( id ).style.display = 'none';
}

function showMenu(showHide){

 	var m = document.getElementById(this.id);

 	if ( showHide ){
		if ( this.idTimeout ){
			this.isClearing = true;
			clearTimeout( this.idTimeout );
			this.idTimeout = null;
			this.isClearing = false;
		}		

		//m.style.visibility = 'visible';
		m.style.display = 'inline';
	}
	else{
		this.idTimeout = setTimeout( "hideMenu("+this.isClearing+",'"+this.id+"')", this.timt );
	}

}