var timer;
var uroven = 1;
var menuID = new Array();

function hide_menu(uroven,time){
	this.uroven = uroven;
	this.timer = setTimeout("hide('')",time);
}
function hide(uroven){
	var od = (uroven == '') ? this.uroven : uroven;
	for(var i=od; i<this.menuID.length; i++){
		document.getElementById(this.menuID[i]).style.display = 'none';
	}
}

function show(uroven,id){
	clearTimeout(this.timer);
	this.menuID[uroven] = id;
	document.getElementById(id).style.display = 'block';
}

function wait(){
	clearTimeout(this.timer);
}

function set_position(top,left,idMenu){
	document.getElementById(idMenu).style.top = top + 'px';
	document.getElementById(idMenu).style.left = (document.body.clientWidth/2 + left) + 'px';
}