
	var MoltoMenuAll2 = new Array();
	var MoltoMenuAll3 = new Array();
	var MoltoMenuAll4 = new Array();
	var MoltoMenuAll5 = new Array();
	var HideTimeout;

	function HideAll2()
	{
		if(NS4) return;
		for(i=0;i<MoltoMenuAll2.length;i++)
			document.getElementById(MoltoMenuAll2[i]["prefix"]+'lev2nav'+MoltoMenuAll2[i]["id"]).style.visibility="hidden";
	}
	function HideAll23()
	{
		if(NS4) return;
		HideAll2();
	}
	function MouseOver()
	{
		if(NS4) return;
		window.clearTimeout(HideTimeout);
	}
	function MouseOut(prefix)
	{
		if(NS4) return;
		window.clearTimeout(HideTimeout);
		HideTimeout=window.setTimeout("HideAll23()",500);
	}
	function ShowEbene2(id,prefix)
	{
		if(NS4) return;
		HideAll2();
		el = document.getElementById(prefix+'lev2nav'+id);
		if(el)
			el.style.visibility="visible";
		MouseOver();
	}
	function MakeNavigation(MoltoMenuArray,C,prefix)
	{
		var mouseover;
		if(MoltoMenuConfig["Preview"]=="Y")
			Preview="&preview=Y";
		else
			Preview="";
		ausgabe='';
		if(NS4) return;
		index=1;
		hideall='';
		while(index<MoltoMenuArray.length)
		{
			mouseover='';
			tmp=MoltoMenuArray[index].split('|');
			id=tmp[0];
			cmsid=tmp[1];
			/*if(id)
			{	tmp = id.search(/([0-9]+)(-[0-9]+)?.htm$/g);
				if (tmp)
  					cmsid=id.replace(/^.*[^0-9]([0-9]+)(-[0-9]+)?.htm$/g,'$1');
			}*/
			bezeichnung=MoltoMenuArray[index+1];
			target=MoltoMenuArray[index+2];
			if(target!='')
				target=' target="'+target+'"';
			else
				target=' target=_parent';
			klasse='topnav';
			if(bezeichnung.substr(0,1)=='+')
				bezeichnung=bezeichnung.substr(1, bezeichnung.length-1);
			index+=3;
			tmpsn=document.getElementById('subnavigationinnen');
			
			var tmpactivmainid = ""+MoltoMenuConfig["ActiveID1"]+"";
			var activmainid=tmpactivmainid.replace(/\..+/,"");
			
			var tmpactivsecmainid = ""+MoltoMenuConfig["ActiveID2"]+"";
			var activsecmainid=tmpactivsecmainid.replace(/\..+/,"");
			
			if (index<MoltoMenuArray.length)
				if(typeof(MoltoMenuArray[index])=="object")
//				if(MoltoMenuArray[index].length)
				{
					Ebene2=MoltoMenuArray[index];
					index2=1;
					ausgabe=ausgabe+('<div id="'+prefix+'lev2nav'+id+'" style="z-index:'+(10000-index)+'; margin:0px; padding:0px; position:absolute;left:0px;top:30px;width:10px;VISIBILITY:hidden;" onMouseOver=MouseOver(); onMouseOut=MouseOut();>');
					ausgabe=ausgabe+('<table cellpadding="0" cellspacing="0" border="0" id="'+prefix+'lev2tab'+id+'" height="'+(MoltoMenuConfig["HeadImageHeight"])+'" width="'+MoltoMenuConfig["SubNavigationWidth"]+'">');
					ausgabe=ausgabe+('<tr><td class="subnav">');
					while(index2<Ebene2.length)
					{
						id2=Ebene2[index2];
						bezeichnung2=Ebene2[index2+1];
						target2=Ebene2[index2+2];
						cmsid2=id2;
						
						tmp=Ebene2[index2].split('|');
						id2=tmp[0];
						cmsid2=tmp[1];
						
						
						if(id2)
						{	tmp = id2.search(/([0-9]+)(-[0-9]+)?.htm$/g);
							if (tmp)
			  					cmsid2=id2.replace(/^.*[^0-9]([0-9]+)(-[0-9]+)?.htm$/g,'$1');
						}

						if(target2!='')
							target2=' target="'+target2+'"';
						else
							target2=' target=_parent';
						klasse2='subnav';
						if(bezeichnung2.substr(0,1)=='+')
						{	bezeichnung2=bezeichnung2.substr(1, bezeichnung2.length-1);
						}
						index2+=3;
						mouseover2='';
						if (index2<Ebene2.length)
							if(typeof(Ebene2[index2])=="object")
								index2++;
						//if(cmsid2==MoltoMenuConfig["ActiveID2"])
						if(cmsid2==activsecmainid)
						{	ausgabe = ausgabe + '<table cellspacing="0" width="'+(MoltoMenuConfig["SubNavigationWidth"]-20)+'"><tr><td class="dummy" width="10"><img src="'+MoltoMenuConfig["MyDocumentRoot"]+'icons/'+MoltoMenuConfig["TriangleGif"]+'"></td><td class="dummy">';
								klasse2='subnavaktiv';
						}
						else
							klasse2='subnav';
						if ((id2.substring(0,4)=="http") || (id2.substring(0,1)=="/"))
							ausgabe=ausgabe+('<a id="'+prefix+'lev2td'+id2+'" class="'+klasse2+'" href="'+id2+'" '+mouseover2+target2+'>');
						else
							ausgabe=ausgabe+('<a id="'+prefix+'lev2td'+id2+'" class="'+klasse2+'" href="'+MoltoMenuConfig["MyDocumentRoot"]+'index.php?scr='+C+'&id='+id2+Preview+'" '+mouseover2+target2+'>');
						ausgabe=ausgabe+bezeichnung2;
						ausgabe=ausgabe+('</a>');
						//if(cmsid2==MoltoMenuConfig["ActiveID2"])
						if(cmsid2==activsecmainid)
							ausgabe=ausgabe+('</td></tr></table>\n');
						else
							ausgabe=ausgabe+('<br/>\n');
					}
					ausgabe=ausgabe+('</td></tr>');
					ausgabe=ausgabe+('</table>');
					ausgabe=ausgabe+('</div>');
					mouseover='onMouseOver=ShowEbene2("'+id+'","'+prefix+'")';
					index++;
					l=MoltoMenuAll2.length;
					MoltoMenuAll2[l]=new Array();
					MoltoMenuAll2[l]["id"]=id;
					MoltoMenuAll2[l]["prefix"]=prefix;
					//hideall = hideall + 'tmp=document.getElementByID(\'topnav'+id+'\'); tmp.style.visibility=hidden;\n';
				}
				else
					mouseover='';
					
			//if(cmsid==MoltoMenuConfig["ActiveID1"])
			
			if(cmsid==activmainid || cmsid==activsecmainid)
			{	
				ausgabe = ausgabe + '<table cellspacing="0" width="'+(MoltoMenuConfig["TopNavigationWidth"]-20)+'"><tr><td class="dummy" width="10" valign="top"><img src="'+MoltoMenuConfig["MyDocumentRoot"]+'icons/'+MoltoMenuConfig["TriangleGif"]+'"></td><td class="dummy" valign="top">';
					klasse='topnavaktiv';
			}
			else
				klasse='topnav';
			if ((id.substring(0,4)=="http") || (id.substring(0,1)=="/"))
				ausgabe=ausgabe+('<a id="lev1nav'+id+'" class="'+klasse+'" href="'+id+'" '+mouseover+target+' onMouseOut=MouseOut();>');
			else
				ausgabe=ausgabe+('<a id="lev1nav'+id+'" class="'+klasse+'" href="'+MoltoMenuConfig["MyDocumentRoot"]+'index.php?scr='+C+'&id='+id+Preview+'" '+mouseover+target+' onMouseOut=MouseOut();>');
			ausgabe=ausgabe+(bezeichnung);
			ausgabe=ausgabe+('</a>');
			//if(cmsid==MoltoMenuConfig["ActiveID1"])
			if(cmsid==activmainid || cmsid==activsecmainid)
				ausgabe=ausgabe+('</td></tr></table>\n');
			else
				ausgabe=ausgabe+('<br/>\n');
		}
		//document.test.test.value=ausgabe;
		return ausgabe;
	}
	function MoltoMenuInit(prefix)
	{
		if(NS4) return;
		if(tmp0=document.getElementById('subnavigationinnen'))
		{	subnavihoehe=tmp0.offsetHeight;
			subnavibreite=MoltoMenuConfig["SubNavigationWidth"];
			subnavileft=tmp0.offsetLeft;
			tmp1=document.getElementById('topnavigationtable')
			subnavitop=tmp1.offsetTop;
			tmp00=tmp0.offsetParent;
			while (tmp00)
			{	subnavileft=subnavileft+tmp00.offsetLeft;
				subnavitop=subnavitop+tmp00.offsetTop;
				tmp00=tmp00.offsetParent;
			}
			for(i=0;i<MoltoMenuAll2.length;i++)
			{
				tmp2=document.getElementById(MoltoMenuAll2[i]["prefix"]+'lev2nav'+MoltoMenuAll2[i]["id"]);
				tmp2.style.left=subnavileft;
				tmp2.style.top=subnavitop;
				tmp2.style.height=subnavihoehe;
				tmp2.style.width=subnavibreite;
				// wg. MSIE >5.5-Bug
				tmp2.style.visibility="visible";
				//tmp2.style.background-color='#ff0000';
				tmp2.style.visibility="hidden";
			}
		}
	}
