<!--


  // ----------------------------------------------
  // Print Function
  // ----------------------------------------------

  function print_page() {

    if (window.print)
    window.print();

    else
    window.alert("Das Drucken ist leider nicht möglich!");

  }


  // ----------------------------------------------
  // StyleSwitcher functions
  // ----------------------------------------------

  function setActiveStyleSheet(title) {
    var i, a, main;
    for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
      if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
        a.disabled = true;
        if(a.getAttribute("title") == title) a.disabled = false;
      }
    }
  }

  function getActiveStyleSheet() {
    var i, a;
    for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
      if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
    }
    return null;
  }

  function getPreferredStyleSheet() {
    var i, a;
    for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
      if(a.getAttribute("rel").indexOf("style") != -1
         && a.getAttribute("rel").indexOf("alt") == -1
         && a.getAttribute("title")
         ) return a.getAttribute("title");
    }
    return null;
  }

  function createCookie(name,value,days) {
    if (days) {
      var date = new Date();
      date.setTime(date.getTime()+(days*24*60*60*1000));
      var expires = "; expires="+date.toGMTString();
    }
    else expires = "";
    document.cookie = name+"="+value+expires+"; path=/";
  }

  function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
      var c = ca[i];
      while (c.charAt(0)==' ') c = c.substring(1,c.length);
      if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
  }

  window.onload = function(e) {
    var cookie = readCookie("style");
    var title = cookie ? cookie : getPreferredStyleSheet();
    setActiveStyleSheet(title);
  }

  window.onunload = function(e) {
    var title = getActiveStyleSheet();
    createCookie("style", title, 365);
  }

  var cookie = readCookie("style");
  var title = cookie ? cookie : getPreferredStyleSheet();
  setActiveStyleSheet(title);

  // ----------------------------------------------
  // Image Preloader
  // ----------------------------------------------

  newimage0 = new Image();
  newimage0.src = "images/logo-ifm-h.gif";
  newimage1 = new Image();
  newimage1.src = "images/top-content-h.gif";
  newimage2 = new Image();
  newimage2.src = "images/menu-third-home-h.gif";
  newimage3 = new Image();
  newimage3.src = "images/menu-third-imprint-h.gif";
  newimage4 = new Image();
  newimage4.src = "menu-third-sitemap-h.gif";
  newimage5 = new Image();
  newimage5.src = "menu-third-list-h.gif.gif";



  // -----------------------------
  //    Popup - centered (auto)
  // -----------------------------

  <!--

  var win = null;
  function newWindow(mypage,myname,w,h,features) {
    var winl = (screen.width-w)/2;
    var wint = (screen.height-h)/2;
    if (winl < 0) winl = 0;
    if (wint < 0) wint = 0;
    var settings = 'height=' + h + ',';
    settings += 'width=' + w + ',';
    settings += 'top=' + wint + ',';
    settings += 'left=' + winl + ',';
    settings += features;
    win = window.open(mypage,myname,settings);
    win.window.focus();
  }

  // Variables:
  //
  // 720 - width
  // 500 - height
  // resizable - window can be resized
  // scrollbars - window displays the scrollbar on the right
  // status - window displays the status bar at the bottom
  // toolbar - window displays the toolbar at the top
  // Note: href="#null" makes the link display as a link. Don't leave it out!


//-->

