var templateDir;
var plus;
var plus_rot;
var minus;
var minus_rot;
var expand;
var hide;

var log = new Log(Log.DEBUG, Log.popupLogger);
log.setLevel(Log.Info);

function doOut ( position , thisPos ) {
	log.debug( 'doOut with Pos ' + position );
	
	return;
	
	var uMenu = document.getElementById( 'u' + position );
	if (uMenu==null) return;
	//alert(uMenu.className);
	if (uMenu.className.substring(0,12) == 'curMenuClass') return;
	if (uMenu.className.substring(0,12) == 'parMenuClass') uMenu.style.display = 'block';	//	if <ul> in path --> show
	else uMenu.style.display = 'none';														//	otherwise hide
	return;
}

function doOver ( position, thisPos ) {
	log.debug( 'doOver with Pos ' + position );
	
	return;
	
	var uMenu = document.getElementById( 'u' + position );
	if (uMenu==null) return;
	if (uMenu.className.substring(0,12) == 'curMenuClass') return;
	if (uMenu.className.substring(0,12) == 'parMenuClass') return;			//	path elements	
	if (uMenu.style.display == 'block') return;								//	menu already shown
	uMenu.style.height = '0';		//	nötig, sonst schiebt linkes Menü nach unten!
	uMenu.style.top = '-18px';		//	sonst ist popup unter der MouseOver-Position
	uMenu.style.display = 'block';
}

function ulShow ( menuPos, position ) {
	var uMenu = document.getElementById( 'u' + position );
	var image = document.getElementById( 'i' + position );
	var imagePath = image.getAttribute('pfad', false);
	var grandparent = uMenu.parentNode.parentNode;
	var greatgrandparent = grandparent.parentNode.parentNode;
	
	if (uMenu==null) return;
	var menu = document.getElementById('menuMiddle').getElementsByTagName('ul');
	var bilder = document.getElementById('menuMiddle').getElementsByTagName('img');

	//if  (uMenu.style.display == 'block') {
	if  ( image.getAttribute('src') == minus_rot ) {
		uMenu.style.display = 'none';
		image.setAttribute('src', plus_rot);
		image.parentNode.setAttribute('title', unescape( expand ) );
	} else {
		for (i=1;i<menu.length;i++) {
			if (menu[i].id != grandparent.id && 
				menu[i].id != greatgrandparent.id && 
				menu[i].className.substring(0,12) != 'curMenuClass') menu[i].style.display = 'none';
		}
		for (i=0;i<bilder.length;i++) {
			var thisPath = bilder[i].getAttribute('pfad', false);
			if ( imagePath.indexOf(thisPath)<0 && bilder[i].parentNode.parentNode.parentNode.parentNode.parentNode.className != 'menuCurrExp' ) {
				bilder[i].setAttribute('src', plus );
				bilder[i].parentNode.setAttribute('title', unescape ( expand ) );
			}
		}		
		uMenu.style.display = 'block';
		image.setAttribute("src", minus_rot );
		image.parentNode.setAttribute("title", unescape( hide ) );
	}
}
function swap ( id ) {
	var handle = document.getElementById(id);
	var image = handle.getAttribute('src');
	if (image.indexOf('_rot')>-1) image = image.replace('_rot','');
	else image = image.substring(0,image.lastIndexOf('.'))+'_rot'+image.substr( image.lastIndexOf('.'), 4 );
	document.getElementById(id).src = image;
	return true;
}
/*
function mainmenu(){
$(" #navR ul ").css({display: "none"});
$(" #navR li").hover(function(){
		$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);
		},function(){
		$(this).find('ul:first').css({visibility: "hidden"});
		});
}

 $(document).ready(function(){
	mainmenu();
});
*/


