
// Falls noch ein Aufklappmenü hinzukommt:
// 1.) styles.css entsprechend ändern
// 2.) menu.php ergänzen
// 3.) und in dieser Datei:  die if-Abfrage bei function opensub erweitern; bei ('top') und ('closemenu_bottom') die Zahl der Menüpunkte x Höhe eines Menüpunktes+ 70Pixel des TOP-DIVS!!!
function opensub(menu_id){
	if(menu_id == 'sub_waldbewirtschaftung'){
		document.getElementById('sub_waldbewirtschaftung').style.visibility = 'visible';
		document.getElementById('sub_holzernte').style.visibility = 'hidden';
		document.getElementById('top').style.height= '120';
		document.getElementById('closemenu_bottom').style.height='120';
	}
	if(menu_id == 'sub_holzernte'){
		document.getElementById('sub_holzernte').style.visibility = 'visible';
		document.getElementById('sub_waldbewirtschaftung').style.visibility = 'hidden';
		document.getElementById('top').style.height= '120';
		document.getElementById('closemenu_bottom').style.height='120';
	}
	//if(menu_id == 'sub_film'){
		//document.getElementById('sub_film').style.visibility = 'visible'
		//document.getElementById('top').style.height= '120'
		//document.getElementById('closemenu_bottom').style.height='120'
	//}
	
}


function close_submenus(sub_id){
	if(sub_id == 'all'){
		document.getElementById('sub_waldbewirtschaftung').style.visibility = 'hidden';
		document.getElementById('sub_holzernte').style.visibility = 'hidden';
		//document.getElementById('sub_film').style.visibility = 'hidden';
		document.getElementById('top').style.height='70';
	}

}

function Go(x) {
 if(x == "nothing") {
   document.forms[0].reset();
   document.forms[0].elements[0].blur();
   return;
 }
 else {
   parent.location.href = x;
   document.forms[0].reset();
   document.forms[0].elements[0].blur();
 }
}





//SONSTIGE JAVASCRIPTS


//1.) FUNKTION ZUM AUTOMATISCHEN DURCHLAUF DER FOTOS!!!
function change_photo() {

//Anzahl der Bilder ermitteln
a = 0;
for(i=0; i<meineBilder.length; i++ )
{ a = a +1 }
a = a - 1;

//Wenn alle Fotos dann von vorne
if (photo_number>a) {
photo_number = 0;
}

//Photo ändern
document.getElementById('photo').src = meineBilder[photo_number];
photo_number = photo_number+1;

//Funktion alle 5 Sekunden aufrufen!
setTimeout('change_photo ()', 5000);
}


//Bild-Mouse-Over Film-Kapitelauswahl
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
