        var bild = "pma_sunreflecting_355.jpg";
	var page_ready;

	function init ()
	{
		for (var i = 0;  i < menu.length / 4;  i++) {
			if (menu[i*4+3].length) {
				var html = "";
				for (var l = 0;  l < menu[i*4+3].length / 4;  l++) {
					if (menu[i*4+3][l*4+3].length) {
						var target = menu[i*4+3][l*4+2];
						if( target == 'true') target = '_new';
						else target = "_top";
						html += '<tr height="20" onmouseover="this.style.background=\'#f8f8f8\';parent.mover(' + i + ',' + l + ');" onmouseout="this.style.background=\'\';parent.mout();">';
						html += '<td style="FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #003a7d; FONT-FAMILY: Arial, sans-serif;"><nobr><a target="'+target+'" href="' + menu[i*4+3][l*4+1] + '" style="width:100%;display:block;text-decoration:none;color:#003a7d">&nbsp;AA &nbsp;&nbsp;&nbsp;&nbsp;' + menu[i*4+3][l*4] + "</a></nobr></td>";
						html += '<td style="FONT-SIZE: 12px;" width="20" align="right"><nobr>&nbsp;<img src=\"/common/img/5x9_submenu_def.gif\" width=\"5\" height=\"9\" border=\"0\" align=\"absmiddle\">&nbsp;&nbsp;</nobr></td></tr>';

						var subhtml = '';
						for (var m = 0;  m < menu[i*4+3][l*4+3].length / 4;  m++) {
							//alert('m '+menu[i*4+3][l*4+3].length);
							var subtext = menu[i*4+3][l*4+3][m*4];
							var suburl  = menu[i*4+3][l*4+3][m*4+1];
							var subtarget = menu[i*4+3][l*4+3][m*4+2];
							if(subtarget == 'true') subtarget = '_new';
							else subtarget = "_top";
							//alert('subtext '+subtext+' '+suburl+' '+subtarget);
							subhtml += '<tr height="20" onmouseover="this.style.background=\'#f8f8f8\'" onmouseout="this.style.background=\'\'">';
							subhtml += '<td onClick="neuesFenster(\'start.htm\')" style="FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #003a7d; FONT-FAMILY: Arial, sans-serif;"><nobr>&nbsp;AA &nbsp;&nbsp;&nbsp;&nbsp;' + subtext + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</nobr></td></tr>";
                                                }
						document.frames['f'+i+l].window.document.body.innerHTML = '<table id="inner" cellpadding="0" cellspacing="0" style="border-top:1 solid #999999;border-left:1 solid #666666;border-right:1 black solid;border-bottom:1 black solid;padding-top:0;display:block;cursor:hand;background:#d3dfef;font-family:verdana;font-size:10pt" onmouseover="parent.mover('+i+','+l+')" onmouseout="parent.mout()">' + subhtml + '</table>';
						document.all['f'+i+l].style['height'] = (m*20+2);

					} else {
						var target1 = menu[i*4+3][l*4+2];
						if( target1 == 'true') target1 = '_new';
						else target1 = "_top";					
						html += '<tr height="20" onmouseover="this.style.background=\'#f8f8f8\';parent.mover(' + i + ',-1);" onmouseout="this.style.background=\'\';parent.mout();">';
						html += '<td colspan="2" style="FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #003a7d; FONT-FAMILY: Arial, sans-serif;"><nobr><a target="' + target1 + '" href="' + menu[i*4+3][l*4+1] + '" style="width:100%;display:block;text-decoration:none;color:#003a7d">&nbsp;BB &nbsp;&nbsp;&nbsp;&nbsp;' + menu[i*4+3][l*4] + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></nobr></td></tr>";
					}
				}

				document.frames['f'+i].window.document.body.innerHTML = 
				'<table id="inner" cellpadding="0" cellspacing="0" style="border-top:1 solid #999999;border-left:1 solid #666666;border-right:1 black solid;border-bottom:1 black solid;padding-top:0;padding-bottom:1;display:block;cursor:hand;background:#d3dfef;font-family:verdana;font-size:10pt" xonmouseover="parent.mover('+i+',-1)" xonmouseout="parent.mout()">' + html + '</table>';

				document.all['f'+i].style['height'] = (l*20+2);
				document.all['f'+i].style['top'] = toppos;
				document.all['f'+i].style['left'] = leftpos;
				leftposarr[i] = leftpos;
			}
			leftpos += document.all['topmenutable'].cells[i*2].clientWidth + 3;
		}
		page_ready = 1;
		setTimeout("counter()", 200);
      
		init_bild();  //Laden des Startbildes


	} // INIT


	function hide ()
	{
		if (active > -1) {
			if (document.all['f'+active]) {
				document.all['f'+active].style['display'] = 'none';
				if (activesub > -1) {
					if (document.all['f'+active+activesub]) {
						document.all['f'+active+activesub].style['display'] = 'none';
						document.frames['f'+active].window.document.body.all['inner'].rows[activesub].style['background'] = '';
					}
				}
			}
		}
	}

	function mover ( nr, sub )
	{
		if (page_ready) {
			timer = 0;
			hide();
			if (menu[nr*4+3].length) {
				document.all['f'+nr].style['display'] = 'block';
				if (!positioned[nr]) {
					document.all['f'+nr].style['width'] = document.frames['f'+nr].window.document.body.all['inner'].clientWidth + 2;
					positioned[nr] = 1;
				}
				active = nr;
	
				if (activesub > -1) {
					if (document.all['f'+nr+activesub]) {
						document.all['f'+nr+activesub].style['display'] = 'none';
					}
				}
				if (sub > -1) {
					document.all['f'+nr+sub].style['display'] = 'block';
					document.frames['f'+nr].window.document.body.all['inner'].rows[sub].style['background'] = '#f8f8f8';
					if (!positioned[nr*20+20+sub]) {
						document.all['f'+nr+sub].style['width'] = document.frames['f'+nr+sub].window.document.body.all['inner'].clientWidth + 2;
						document.all['f'+nr+sub].style['left'] = leftposarr[nr] + document.frames['f'+nr].window.document.body.all['inner'].clientWidth - 6;
						document.all['f'+nr+sub].style['top'] = sub * 20 + toppos + 4;
						positioned[nr*20+20+sub] = 1;
					}
	
				} else {
				}
				activesub = sub;
	
			}
		}
	}

	function mout ()
	{
		if (page_ready) {
			if (timer < 1) {
				timer = 5;
			}
		}
	}

	function counter ()
	{
		if (timer > 0) {
			timer--;
			if (timer < 1) {
				hide();
			}
		}
		setTimeout("counter()", 200);
	}


function init_bild()
{
document.bild_src.src = bild;
};


function Bildwechsel()
{
var changed = 0;
if (bild == 'pma_morning_355.jpg' && changed == 0)
   {
   changed = 1;
   bild = 'pma_sunreflecting_355.jpg';
   document.bild_src.src = bild;
   };
if (bild == 'pma_sunreflecting_355.jpg' && changed == 0)
   {
   changed = 1;
   bild = 'interio_355.jpg';
   document.bild_src.src = bild;
   };
if (bild == 'interio_355.jpg' && changed == 0)
   {
   changed = 1;
   bild = 'pma_morning_355.jpg';
   document.bild_src.src = bild;
   };
};

