function hosm(oid) {
 if(document.getElementById(oid).style.display=="none") {
  document.getElementById(oid).style.display="block";
 }
 else {
  document.getElementById(oid).style.display="none";
 }
}

function hosm2_on(oid) {
if(document.getElementById('u'+oid)){
  document.getElementById('u'+oid).style.display='block';
 }
}

function hosm2_off(oid) {
if(document.getElementById('u'+oid)){
  document.getElementById('u'+oid).style.display='none';
 }
}

function show_menu(sid,i) {
  i=i*24;
  if(document.getElementById('s'+sid)) {
  	var rrr = (document.body.clientWidth/2-250);
	//alert(rrr)
	document.getElementById('s'+sid).style.left=(document.body.clientWidth/2-250)+'px';    
  	document.getElementById('s'+sid).style.top=126+i+'px';
document.getElementById('s'+sid).style.visibility='visible';
  	}	
    
}

function hide_menu(sid) {
 if(document.getElementById('s'+sid)) document.getElementById('s'+sid).style.visibility='hidden';
}

function show_down(did) {
document.getElementById(did).style.visibility='visible';
}

function hide_down (did) {
document.getElementById(did).style.visibility='hidden';
}

function show_down2(did) {
document.getElementById(did).style.display='block';
}

function hide_down2(did) {
document.getElementById(did).style.display='none';
}

var MMenu = {
	level1Over:function(sid,i) {
		if (this.timeOut) {
			clearTimeout(this.timeOut);
			this.timeOut='';
			if(this.lastLevel1!=sid) this.level1Clear();
		}
		this.lastLevel1=sid;
		if (document.getElementById('s'+sid)) {
			i=i*24;
			document.getElementById('s'+sid).style.left=(document.body.clientWidth/2-250)+'px';    
		  	document.getElementById('s'+sid).style.top=126+i+'px';
			document.getElementById('s'+sid).style.display='block';
			
		}
	},
	
	level1Out:function() {
		if (!this.timeOut) this.timeOut=setTimeout(this.level1Clear, 1000);
	},
	
	level2Over:function(sid) {
		if (this.timeOut) { clearTimeout(this.timeOut); this.timeOut=''; }
		document.getElementById(sid).style.display='block';
	},
	
	level2Out:function(sid) {
		if (!this.timeOut) this.timeOut=setTimeout(this.level1Clear, 1000);
	},
	
	level2linkOver:function (sid) {
		if (this.timeOut) { clearTimeout(this.timeOut); this.timeOut=''; }
	},
	
	level1Clear: function() {
		if (document.getElementById('s'+MMenu.lastLevel1))  document.getElementById('s'+MMenu.lastLevel1).style.display='none';
	}
}