    function centerMainDiv ()
    {
      if (document.all)
      {
        /* adapt height for div4 and div4r-outer */
        val = document.documentElement.clientHeight - 210;
        eval ('document.all["div4"].style.height = "' + val + 'px";');
        eval ('document.all["div4l"].style.height = "' + val + 'px";');
        val = val - 90;
        eval ('document.all["div4r-outer"].style.height = "' + val + 'px";');

        /* center maindiv */
        val = (document.body.clientWidth - 775) / 2;
        eval ('document.all["maindiv"].style.left = "' + val + 'px";');
        document.all["maindiv"].style.visibility = 'visible';
      }
      else
      {
      
        /* adapt height for div4 and div4r-outer */
        val = window.innerHeight - 210;
        eval ('document.getElementById("div4").style.height = "' + val + 'px";');
        eval ('document.getElementById("div4l").style.height = "' + val + 'px";');
        val = val - 90;
        eval ('document.getElementById("div4r-outer").style.height = "' + val + 'px";');

        /* center maindiv */
        val = (window.innerWidth - 775) / 2;
        eval ('document.getElementById("maindiv").style.left = "' + val + 'px";');
        document.getElementById("maindiv").style.visibility = 'visible';
      }
    }

    function verify ()
    {
      var msg = "Sind Sie sicher?";
      return (confirm(msg));
    }

    function popup (img, width, height)
    {
/*
	k_left = (document.body.clientWidth  - width)  / 2;
	k_top  = (document.body.clientHeight - height + 30) / 2;
*/
k_left = (screen.width - width) / 2;
k_top  = (screen.height - height) / 2;
	foo  = window.open ("popup.php?img=" + img, "bar", "left=" + k_left + ",top=" + k_top + ",width=" + width + ",height=" + height);
    }

    function tpopup(tfile, width, height)
    {
/*
	k_left = (document.body.clientWidth  - width)  / 2;
	k_top  = (document.body.clientHeight - height + 30) / 2;
*/

        /* Platz fuer Copyright-Vermerk einkalkulieren; im IE ist bei Verwendung des Windows Media Player
           auch noch eine Steuerungsleiste eingeblendet, die selbst Platz braucht */

        ext = tfile.replace (/.*\./, "");
        if ((document.all) && ((ext=='avi') || (ext=='mpg') || (ext=='wmv')))
          wheight = height + 78;
        else
          wheight = height + 28;

        /* Fensterposition (links,oben) berechnen */
        k_left = (screen.width - width) / 2;
        k_top  = (screen.height - wheight) / 2;

	foo  = window.open ("trailerp.php?file=" + tfile + "&w=" + width + "&h=" + height, "bar", "left=" + k_left + ",top=" + k_top + ",width=" + width + ",height=" + wheight);
    }

