	///////////////////////////////////////////////////////
	//	Arbeitsvariablen
	///////////////////////////////////////////////////////
	var aktiv;
	var iAktMenu;
	var iKunummer=0;
	

	///////////////////////////////////////////////////////
	//	Menu einrichten
	///////////////////////////////////////////////////////
	function menu_InitMenu()
	{
		if(navigator.appName!="Microsoft Internet Explorer")
		{
			getElement("id","MyMenu").style.position="fixed";
			getElement("id","MyMenu100").style.position="fixed";
			getElement("id","MyMenu200").style.position="fixed";
			getElement("id","MyMenu300").style.position="fixed";
			menu_SchliesseMenus();
		}

		// Shop
		fEnableMenu(205,false);
		fEnableMenu(206,false);
		fEnableMenu(207,false);
		// Immo
/*		fEnableMenu(102,false);
		fEnableMenu(103,false);
		fEnableMenu(106,false);
		fEnableMenu(107,false);
		// suchen kommt später ...
		fEnableMenu(105,false);*/
	}

	///////////////////////////////////////////////////////
	//	Immobilien-Menu einrichten
	//	bEnable=mit Benutzer
	///////////////////////////////////////////////////////
	function menu_InitImmo(bEnable)
	{
		menu_InitMenu();
/*		fEnableMenu(102,bEnable);
		fEnableMenu(103,bEnable);
		fEnableMenu(106,bEnable);
		fEnableMenu(107,bEnable);
		fEnableMenu(104,!bEnable);*/
	}

	///////////////////////////////////////////////////////
	//	HauptMenu aktivieren
	///////////////////////////////////////////////////////
	function menu_MausOnMain(iNum)
	{
		var hString="MyMenu"+String(iNum);
		var hAktMenu=Math.floor(iNum/100);

		clearTimeout(aktiv);
		if(hAktMenu!=iAktMenu)
			menu_SchliesseMenus();	

		getElement("id",iNum).style.background="blue";
		getElement("id",iNum).style.color="white";
		
		getElement("id",hString).style.visibility="visible";
		iAktMenu=Math.floor(iNum/100);
		
		
	}
	
	///////////////////////////////////////////////////////
	//	HauptMenu deaktivieren
	///////////////////////////////////////////////////////
	function menu_MausOffMain(iNum)
	{
		aktiv=setTimeout("menu_SchliesseMenus()",200);

		getElement("id",iNum).style.background="lightblue";
		getElement("id",iNum).style.color="blue";

	}


	///////////////////////////////////////////////////////
	//	UnterMenu aktivieren
	///////////////////////////////////////////////////////
	function menu_MausOnSub(iNum)
	{
		var hString="MyMenu"+String(Math.floor(iNum/100))+"00";

		clearTimeout(aktiv);

		if(getElement("id",iNum).style.fontStyle!="italic" )
		{
			getElement("id",iNum).style.background="blue";
			getElement("id",iNum).style.color="white";
		}
		else
			getElement("id",iNum).style.background="#909090";
	}

	///////////////////////////////////////////////////////
	//	UnterMenu deaktivieren
	///////////////////////////////////////////////////////
	function menu_MausOffSub(iNum)
	{
		getElement("id",iNum).style.background="lightblue";
		if(getElement("id",iNum).style.fontStyle!="italic" )
			getElement("id",iNum).style.color="blue";
		aktiv=setTimeout("menu_SchliesseMenus()",200);
	}

	///////////////////////////////////////////////////////
	//	alle Menus schliessen
	///////////////////////////////////////////////////////
	function menu_SchliesseMenus()
	{
		getElement("id","100").style.background="lightblue";
		getElement("id","200").style.background="lightblue";
		getElement("id","300").style.background="lightblue";

		getElement("id","MyMenu100").style.visibility="hidden";
		getElement("id","MyMenu200").style.visibility="hidden";
		getElement("id","MyMenu300").style.visibility="hidden";

		if(aktiv)
			clearTimeout(aktiv);
	}

	///////////////////////////////////////////////////////
	//	Menuposition starten
	///////////////////////////////////////////////////////
	function menu_Start(iNum)
	{
		if(getElement("id",iNum).style.fontStyle=="italic" )
			return;

		switch(iNum)
		{
		case 101:
				window.location="../EDV/start.php";break;
		case 102:
				window.location="../impressum.htm";break;
		case 103:
				window.location="../Scripts/contact.php";break;

/*		case 101:
				window.location="../Immobilien/Immobilien.php";break;
		case 102:
				window.location="../Immobilien/imNewObject.php";break;
		case 103:
				window.location="../Immobilien/imNutzerneu2.php";break;
		case 104:
				window.location="../Immobilien/im_login.php";break;
		case 105:
				window.location="../Immobilien/im_Suchen.php";break;
		case 106:
				window.location="../Immobilien/imObjekte.php";break;
		case 107:
				window.location="../Immobilien/imLogout.php";break;*/
		case 201:
				if(iKunummer)
					window.location="../Shop/sshop.php?kunummer="+iKunummer;
				else
					window.location="../Shop/sshop.php";
				break;
		case 203:
				window.location="../Shop/skorb.php?kunummer="+iKunummer;
				break;
		case 204:
				window.location="../Shop/slogin.php";
				break;
		case 205:
				window.location="../Shop/sNutzerneu2.php?kunummer="+iKunummer;
				break;
		case 206:
				window.location="../Shop/sLiefer.php?kunummer="+iKunummer;
				break;
		case 207:
				menu_kunummer(0);
				window.location="../Shop/slogin.php";
				break;

		case 301:
				window.location="../EDV/start.php";break;
		case 302:
				window.location="../EDV/tow3x.php";break;
/*		case 303:
				window.location="../EDV/scandoc.php";break;*/
		case 304:
				window.location="../EDV/Downloads.php";break;
		case 305:
				window.location="../EDV/order1.php";break;
		case 306:
				window.parent.location="../toi/index.php?Firma1=10000&Name=gast";break;
		default:
			alert('Programm ('+iNum+') nicht gefunden');
		}
		// Menus schliessen
		menu_SchliesseMenus();
	}

	///////////////////////////////////////////////////////
	//	Menuposition (de) aktivieren
	//	bEnable= bool
	///////////////////////////////////////////////////////
	function fEnableMenu(iNum,bEnable)
	{
		if(!getElement("id",iNum))
			return;

		if(bEnable)	
		{
			getElement("id",iNum).style.fontStyle='normal';
			getElement("id",iNum).style.color="blue";
		}
		else
		{
			getElement("id",iNum).style.fontStyle='italic';
			getElement("id",iNum).style.color='#a0a0a0';
		}

	}
 
	///////////////////////////////////////////////////////
	//	Kundennummer holen
	///////////////////////////////////////////////////////
	function menu_kunummer(iNum)
	{
		iKunummer=iNum;
		// tempkunde
		if(iKunummer<1||iKunummer>1000000)
		{
			window.setTimeout("fEnableMenu(204,true);",500);
			window.setTimeout("fEnableMenu(205,false);",500);
			window.setTimeout("fEnableMenu(206,false);",500);
			window.setTimeout("fEnableMenu(207,false);",500);
/*			fEnableMenu(204,true);
			fEnableMenu(205,false);
			fEnableMenu(206,false);
			fEnableMenu(207,false);*/
		}
		// angemeldeter Kunde
		else
		{
			window.setTimeout("fEnableMenu(204,false);",500);
			window.setTimeout("fEnableMenu(205,true);",500);
			window.setTimeout("fEnableMenu(206,true);",500);
			window.setTimeout("fEnableMenu(207,true);",500);
/*			fEnableMenu(204,false);
			fEnableMenu(205,true);
			fEnableMenu(206,true);
			fEnableMenu(207,true);*/

		}

		
	}

