// Prüft, ob die Home,page (Startseite) der Website bereits besucht wurde.
function checkForHomepage(id, target) {
   var result;   
   try { 
      
      if (window.document.URL.indexOf('http://www.lacc.de/v6/index.php') == -1 &&
          window.document.URL.indexOf('http://www.lacc.de/v6/#') == -1) {
                
         if (parent.document != null) {         
            result = parent.document.getElementById(id);
         }
         else {
            parent.location.href = 'http://www.lacc.de/v6/error.php';
            result = true;
         }
      }
      else {
         result = true;
      }
   }
   catch (e) {
      result = false;
   }
   finally {
      if (!result) {
         if (target == null || target == '') {
            target = 'index.php'; 
         }
         parent.location.href = 'http://www.lacc.de/v6/' + target;
      }
   }
}

// Passt ein iFrame auf ein bestimmtes Element an.
function resizeIFrame(element, iFrame) {
   if(window.opera || navigator.userAgent.indexOf("Opera") != -1) {
      var height = document.getElementById(element).clientHeight;
      document.getElementById(iFrame).style.height = height;
   }
}

