function getDocHeight(doc) {
  var docHt = 0, sh, oh;
  if (doc.height) docHt = doc.height;
  else if (doc.body) {
    if (doc.body.scrollHeight) docHt = sh = doc.body.scrollHeight;
    if (doc.body.offsetHeight) docHt = oh = doc.body.offsetHeight;
    if (sh && oh) docHt = Math.max(sh, oh);
  }
  return docHt;
}

function setIframeHeight(iframeName) {
  var iframeWin = window.frames[iframeName];
  var iframeEl = document.getElementById? document.getElementById(iframeName): document.all? document.all[iframeName]: null;
  if ( iframeEl && iframeWin ) {
    iframeEl.style.height = "auto"; // helps resize (for some) if new doc shorter than previous  
    var docHt = getDocHeight(iframeWin.document);

//  Mindesthöhe 500 px
    if ( docHt < 460 ) { docHt = 460 }; 
    
    // Höhe + 30px damit alles angezeigt wird 
   
    if (docHt) iframeEl.style.height = docHt + 40 + "px";
  }
}

function loadIframe(iframeName, url) {
  if ( window.frames[iframeName] ) {
    window.frames[iframeName].location = url;   
    return false;
  }
  else return true;
}



//function resize_iframe(ht) {
  //      document.getElementById("IFRAME_ID").style.height = ht+"px";
 //   }


	// Dynamic Iframe loader
//unction xloadIframe(theURL) {
//document.getElementById("haupt").src=theURL;
//}
	
	// resizes Iframe according to content
	//function resizeMe(obj){ 
//		docHeight = haupt.document.body.scrollHeight
	//	obj.style.height = docHeight + 'px'
//	} 



//function iFrameHeight(iframename) {
//if(document.getElementById && !(document.all)) {
//h = document.getElementById(iframename).contentDocument.body.scrollHeight;
//document.getElementById(iframename).style.height = h;
//}
//else if(document.all) {
//h = document.frames(iframename).document.body.scrollHeight;
//document.all.iframename.style.height = h;
//}
//}





 function groesse(url,hoehe)
  {
  document.all.haupt.src=url;
  document.all.haupt.style.height=hoehe;
  }


//function resize_me(n) 
//{ 
//d=0; 
//ifObj=document.getElementsByName(n)[0]; 
//p=(document.all)?'scroll':'offset'; 
//eval("ifObj.style.height=window.frames[n].document.getElementsByTagName('body')[0]."+p+"Height+"+d); 
//} 


function datumuhr()

 {

   var jahr;
   var monat;
   var tag;
   var stunden;
   var minuten;
   var sekunden;

   var AktuellesDatum=new Date();

       jahr=AktuellesDatum.getFullYear ();
       monat=AktuellesDatum.getMonth ()+1;
       tag=AktuellesDatum.getDate ();
       stunden=AktuellesDatum.getHours ();
       minuten=AktuellesDatum.getMinutes ();
       sekunden=AktuellesDatum.getSeconds ();

if (stunden<10)
         {
           stunden="0"+String(stunden);
         }
       if (minuten<10)
         {
           minuten="0"+String(minuten);
         }
       if (sekunden<10)
         {
           sekunden="0"+String(sekunden);
         }
       if (tag<10)
         {
           tag="0"+String(tag);
         }
       if (monat<10)
         {
           monat="0"+String(monat);
         }


window.document.anzeige.date.value=tag+"."+monat+"."+jahr;
       window.document.anzeige2.time.value=stunden+":"+minuten+":"+sekunden;
window.setTimeout ('datumuhr()',1000);


 }

/*
 * Menü-Baum-Handling
 */

if (!document.getElementById)
    document.getElementById = function() { return null; }

function initializeMenu(menuId, actuatorId) {
    var menu = document.getElementById(menuId);
    var actuator = document.getElementById(actuatorId);

    if (menu == null || actuator == null) return;

/*    //if (window.opera) return; // I'm too tired */

    actuator.onclick = function() {
        var display = menu.style.display;
        this.parentNode.style.backgroundImage =
            (display == "block") ? "url(images/plus.gif)" : "url(images/minus.gif)";
        menu.style.display = (display == "block") ? "none" : "block";

        return false;
    }
}



