		document.ActiveMenu = null;

		window.timer = null;

		var Menues = [

			{Name: "Home", URL: "Home.php"},

		    {Name: "Anmeldung", URL: "RegisterAll.php"},

    		{Name: "SedCards ", URL: "SetCards.php", SubNavigation: 

				[					

					{Name: "Frauen", URL: "http://www.modelagentur.de/ModelListWomen.php"},

					{Name: "Maenner", URL: "http://www.modelagentur.de/ModelListMen.php"},

					{Name: "Kinder", URL: "http://www.modelagentur.de/ModelListKids.php"},

					{Name: "Künstler", URL: "SetCards.php"},

					{Name: "Musiker", URL: "SetCards.php"},

					{Name: "Schauspieler/Statist", URL: "SetCards.php"},

					{Name: "Detailsuche", URL: "http://www.modelagentur.de/ModelSearch.php"}

				]

			},

			{Name: "Information", URL: "faq.php", SubNavigation: 

				[

					{Name: "Buchung", URL: "Booking.php"},

					{Name: "Werbung", URL: "Advertising.php"},

					{Name: "AGB", URL: "AGB.php"},

					{Name: "Preise", URL: "Prices.php"},

					{Name: "Fragen/Antworten", URL: "FAQ.php"}

				]

			},

			{Name: "Partner", 	URL: "PartnerProgramm.php", SubNavigation: 

				[

				

				    {Name: "Visitenkarte Fotografen", URL: "FirmaListFoto.php"},

					{Name: "Visitenkarte Stylisten/Visagisten", URL: "FirmaListStylisten.php"},

					{Name: "Modelagnturen", URL: "FirmaListFoto.php"},

					{Name: "Studios", URL: "Studios.php"},

					{Name: "Weitere Partner", URL: "Weitere.php"}

				]

			},

			{Name: "Specials", SubNavigation: 

				[

					{Name: "Evantmanager", URL: "ModelEvents.php"},

					{Name: "Modelschule", 	URL: "Modelschule.php"},

					{Name: "Modelpate", 	URL: "AdvertAgencies.php"},

					{Name: "Werbeagentur", 	URL: "AdvertAgencies.php"},

					{Name: "Modelagentur", 	URL: "Modelagencies.php"}

				]

			},

            {Name: "Preise", URL: 	"Prices.php", SubNavigation: 

				[

					{Name: "Model", URL: "ModelEvents.php"},

					{Name: "Fotograf", 	URL: "AdvertAgencies.php"},

					{Name: "Künstler", 	URL: "AdvertAgencies.php"},

					{Name: "Musiker", 	URL: "AdvertAgencies.php"},

					{Name: "Schauspieler/Statist", 	URL: "AdvertAgencies.php"},

					{Name: "Auftraggeber", 	URL: "AdvertAgencies.php"}

				]

            },

			{Name: "Model-Jobs", URL: 	"JobBoard.php", SubNavigation: 

				[

					{Name: "Für Models", URL: "ModelEvents.php"},

					{Name: "Von Models", 	URL: "AdvertAgencies.php"}

				]

			},

			{Name: "Fotografie", URL: "Fotografie.php"},

			{Name: "MyMail", URL: "MyMail.php"},

			{Name: "Kontakt", URL: "Contact.php"}

		];

		

 function mainMenueOver( obj )

		{

			var nWidth = 0;

			var nID = parseInt(obj.id.match(new RegExp("[0-9+$]", "")));

			var oMenu = document.getElementById('MenuMain');

			var htmlMenue = "";

			

			if ( document.ActiveMenu != null )

				document.ActiveMenu.style.backgroundColor='';

			document.ActiveMenu = obj;

			

			for( var i = 1; i < nID; i++)

			{

				nWidth += document.getElementById("MainMenu"+i).offsetWidth +1; 

			}

			

			if ( Menues[nID-1].SubNavigation == undefined )

			{

				hideMainMenu();

				obj.style.backgroundColor='#555555';

				return;

			}

			

			obj.style.backgroundColor='#555555';			

			

			htmlMenue = "" + generateSubMenu(Menues[nID-1].SubNavigation) + "";

			oMenu.innerHTML = htmlMenue;

			oMenu.style.width = "152px";//obj.offsetWidth+2;

			oMenu.style.marginLeft = nWidth+1;

			oMenu.style.top = "141px";

		}

		

		

		function generateSubMenu(objMenu)

		{

			var htmlResult = "";

			for( var i = 0; i < objMenu.length; i++)

			{

				htmlResult += '<td nowrap class="submenu" onClick="location.href=\''+objMenu[i].URL+'\'" onMouseOver="this.style.color=\'#B400E1\'" onMouseOut="this.style.color=\'#FFFFFF\'">&nbsp;&nbsp;&nbsp;'+objMenu[i].Name+' </td>';				

			}			

			htmlResult =  '<table style="margin-top: 0px; margin-left: 0px;" border="0" cellpadding="0" cellspacing="0"><tr>' + htmlResult + '</tr></table>';			

			return htmlResult;

		}

		

		function mainMenueOut( obj )

		{

			var nID = parseInt(obj.id.match(new RegExp("[0-9+$]", "")));

			ActiveMenu.style.backgroundColor='';

			obj.style.color='#FFFFFF';

			//window.timer = window.setInterval("hideMainMenu()", 2000);

		}

		

		function generateMainMenu()

		{

			var htmlSepStart = '<td><img src="img/menu_top_start.jpg" border="0"></td>';

			var htmlSepEnd = '<td><img src="img/menu_top_end.jpg" border="0"></td>';

			var htmlResult = '';

			var LinkOnClick = "";

			

			for ( var i = 1; i <= Menues.length; i++)

			{

				LinkOnClick = ( Menues[i-1].URL != undefined ) ? ' onClick="location.href=\'' + Menues[i-1].URL + '\'"' : ""; 

				htmlResult += htmlSepStart + '<td id="MainMenu'+i+'" class="mainmenue01" onMouseOver="mainMenueOver(this)" onMouseOut="mainMenueOut(this)"'+ LinkOnClick+'>'+ Menues[i-1].Name+'</td>' + htmlSepEnd;

			}		

			return htmlResult;

		}

		

		function hideMainMenu()

		{

			var oMenu = document.getElementById('MenuMain');

			if ( document.ActiveMenu != null )

				document.ActiveMenu.style.backgroundColor='';

			oMenu.style.top = "-1000px";

		}