// ------------------------------------------------;
initMouse();
var divIDname="menu";
//var posIDname="posMarker";
var posIDname="LayerPosition";

//-------limits for the menus----------------------;
var limit=false;
var currentN=false;
var templimit=false;
var MouseWhere;


//------------------------------------------------------------------;
function showMenu(n){

	eval("theMenu = document.getElementById('" + divIDname + n + "')");
	//eval("divId = document.getElementById('" + divIDname + num + "')");
	//theMenu = eval(divIDname + n);
	
	//DownCounterVal = CountDownVal;
	//StopCounter();
	//IsInMenu = true;

	if(n != '0'){
		if(currentN!=false){
			visibleDiv([currentN],false);
		}
		currentN=n;
		visibleDiv([n],true);
	}
  
  if (!menuTopHeight) {
    menuTopHeight = 20;
  }
  	XYLimitBorder = 10;
	TY = theMenu.offsetTop - menuTopHeight - XYLimitBorder;
 	RX = theMenu.offsetLeft + theMenu.offsetWidth + XYLimitBorder;
 	BY = theMenu.offsetTop + theMenu.offsetHeight + XYLimitBorder;
 	LX = theMenu.offsetLeft - XYLimitBorder;
	

	limit=[TY,RX,BY,LX];
}
//------------------------------------------------------------------;



//------------------------------------------------------------------;
function fixSearch(aktion){
	if(aktion){
		templimit=limit;
		limit=false;
	}
}
//------------------------------------------------------------------;



//------------------------------------------------------------------;
function allMenusOff(){
	visibleDiv([divname+''+currentN],false);

}	





