function showSub(identifier)
{
  document.getElementById(identifier).style.visibility = 'visible';
}

function hideSub(identifier)
{
  document.getElementById(identifier).style.visibility = 'hidden';
}


function changeMenuLevel_1(identifier)
{
	var el = document.getElementById(identifier);
	el.style.visibility = (el.style.visibility != 'visible' ? 'visible' : 'hidden' );
}


function menuLevel_1(identifier)
{
  
}

function menuLevel_2()
{
  
}

function menuLevel_3()
{
  
}

function toggleSubmenu()
{
  
}

function toggleSubroot(identifier)
{
	var el = document.getElementById(identifier);
	el.style.visibility = (el.style.visibility != 'visible' ? 'visible' : 'hidden' );
}

function showSubmenu(identifier)
{
	document.getElementById(identifier).style.visibility = 'visible';
}

function hideSubmenu(identifier)
{
	document.getElementById(identifier).style.visibility = 'hidden';
}

function showSubmenuSub(identifier1, identifier2, opener, type)
{
	document.getElementById(identifier1).style.visibility = 'visible';
	document.getElementById(identifier2).style.visibility = 'visible';
  document.getElementById(opener).className = 'hoverLi_'+type;
}

function hideSubmenuSub(identifier1, identifier2, opener, type)
{
	document.getElementById(identifier1).style.visibility = 'hidden';
	document.getElementById(identifier2).style.visibility = 'hidden';
  document.getElementById(opener).className = '';
}

function hoverLi(opener, type)
{
  document.getElementById(opener).className = 'hoverLi_'+type;
}

function unhoverLi(opener, type)
{
  document.getElementById(opener).className = '';
}

function showMainSub(identifier)
{
  document.getElementById(identifier).style.display = 'block';
}

function hideMainSub(identifier)
{
	document.getElementById(identifier).style.display = 'none';
}

function hoverMainSubLi(identifier) {
  document.getElementById(identifier).className = 'MainSubLihover';
}

function undoMainSubLi(identifier) {
  document.getElementById(identifier).className = '';
}

var loop      = false;
var timer     = null;
var thisObj   = null;
var thisSpeed = null;

function omhoog(speed, obj) {
	if(obj) { thisObj = obj; }

	if(thisObj.y < 0){
		var y = thisObj.y + speed;
		move(thisObj, thisObj.x, y);
	
		if(!loop) {
			loop  = true;
			timer = setInterval('omhoog(' + speed + ')', speed);
		}
	}
}

function omlaag(speed, obj) {
	if(obj) { thisObj = obj; }

	if(thisObj.y == undefined) {
		obj.y = 0;
		obj.x = 0;
	}

	if(thisObj.y > -thisObj.offsetHeight + thisObj.parentNode.offsetHeight) {
		var y = thisObj.y - speed;
		move(thisObj, thisObj.x, y);
	
		if(!loop) {
			loop  = true;
			timer = setInterval('omlaag(' + speed + ')', speed);
		}
	}
}

function stopScroll(obj) {
	if(loop) {
		clearInterval(timer);
		timer = null;
		loop  = false;
	}
}

function move(obj, x, y) {
	obj.x = x;
	obj.y = y;

	obj.style.left = obj.x + 'px';
	obj.style.top  = obj.y + 'px';
}
