document.onreadystatechange = function(){

   if(document.readyState == "complete"){
      resize();
   }
};

function resize_opera(){

/*CODE ZUR Präsentation

   alert("Dies ist der Prototyp der neuen Internetseite zu Präsentationszwecken.\n"+
         "Bitte beachten Sie, dass ein Großteil der Inhalte noch nicht"+
         " vollständig eingegeben ist...");

CODE Ende*/


   if(navigator.userAgent.match(/opera/i)){
      var frm = document.getElementById("content");
      frm.style.height = frm.parentElement.offsetHeight+"px";
      frm.scrolling = "auto";
   }
}

function resize(){

   if(self.parent.location != self.location){
      var frm = parent.return_frm();
      //alert(frm.style.height);
      //alert(self.document.body.scrollHeight+"px");
      var h = self.document.body.scrollHeight;
      frm.style.height = h+"px";
      if(h < frm.parentElement.offsetHeight)
         frm.style.height = frm.parentElement.offsetHeight+"px";
      else
         frm.parentElement.style.height = frm.style.height;         
   }
}

function return_frm(){

   var frm = document.getElementById("content");
   return frm;
}

function update_code(sobj){

   var tobj = document.getElementById("code");

   if(sobj.selected)
      tobj.value = tobj.value | sobj.value;
   else
      tobj.value = tobj.value ^ sobj.value;
}

function highlight(obj){

   obj.className = obj.className.replace(/low/, "high");
}

function dehighlight(obj){

   obj.className = obj.className.replace(/high/, "low");
}

function show(pic){

   //alert("Setting picture URL("+pic+")");

   var pic = document.getElementById("navipic").src = pic;
}

function goto_page(ptarget, ppath){

   //alert("Showing page URL("+ppath+") in "+ptarget);

   if(ptarget == "content")
      var frm = document.getElementById("content").src = ppath;
   else{
      document.location.href = ppath;
   }
}

function opennew(opath){

   alert("Opening URL("+opath+") in a new window...");
}
