function bf_preloadImages() {
  var d=document; if(d.images){ if(!d.bf_p) d.bf_p=new Array();
  var i,j=d.bf_p.length,a=bf_preloadImages.arguments; for(i=0; i<a.length; i++)
  if (a[i].indexOf("#")!=0){ d.bf_p[j]=new Image; d.bf_p[j++].src=a[i];}}
}

function bfmovepic(img_name,img_src) {
    document[img_name].src=img_src;
}

function Fensterweite()
{
 if (window.innerWidth) return window.innerWidth;
 else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
 else return 0;
}

function Fensterhoehe()
{
 if (window.innerHeight) return window.innerHeight;
 else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
 else return 0;
}


function neuAufbau()
{
 if (Weite != Fensterweite() || Hoehe != Fensterhoehe())
  onWindowResize();
}

/*Überwachung von Netscape initialisieren*/
if(!window.Weite && window.innerWidth)
  {
   window.onresize = neuAufbau;
   Weite = Fensterweite();
   Hoehe = Fensterhoehe();
  }

 /*Überwachung von MS Internet Explorer initialisieren*/
 if(!window.Weite && document.body && document.body.offsetWidth)
  {
   window.onresize = neuAufbau;
   Weite = Fensterweite();
   Hoehe = Fensterhoehe();
  }

//window.scrolling = false;

function setIframeSize()
{
// Workarround, wegen unzureichender Unterstützung von style.right und
// style.bottom im i-explorer

    leftPos = 160;
    topPos=25;
//    topPos2=25;
    rightPos = 15;
    bottomPos = 12;

    winWidth = document.body.clientWidth;
    winHeight = document.body.clientHeight;

    width = winWidth - (leftPos + rightPos);
    height = winHeight - (topPos + bottomPos);
//    height2 = winHeight - (topPos2 + bottomPos);

    document.getElementById("iframeId").style.position = "absolute";
    document.getElementById("iframeId").style.width = width;
    document.getElementById("iframeId").style.height = height;
    document.getElementById("iframeId").style.top = topPos;
    document.getElementById("iframeId").style.left = leftPos;

//    document.getElementById("noiframeId").style.position = "absolute";
//    document.getElementById("noiframeId").style.width = width;
//    document.getElementById("noiframeId").style.height = height2;
//    document.getElementById("noiframeId").style.top = topPos2;
//    document.getElementById("noiframeId").style.left = leftPos;

//    document.getElementById("iframeId").style.right = rightPos;
//    document.getElementById("iframeId").style.bottom = bottomPos;
}

function setGameBoxPos()
{
// Workarround, wegen unzureichender Unterstützung von style.right und
// style.bottom im i-explorer

    leftPos = 0;
    topPos=22;
    rightPos = 34;

    winWidth = document.body.clientWidth;
    winHeight = document.body.clientHeight;

    width = winWidth - (leftPos + rightPos);
//    height = winHeight - (topPos + bottomPos);

    document.getElementById("xmenu_box2").style.width = width;
//    document.getElementById("menu_box2").style.height = height;
    document.getElementById("xmenu_box2").style.top = topPos;
    document.getElementById("xmenu_box2").style.left = leftPos;
    document.getElementById("xmenu_box2").style.position = "absolute";
}

function onBodyLoad() {
    //    setIframeSize();
    //    setGameBoxPos();
}

function onWindowResize(){
    //    setIframeSize();
//    setGameBoxPos();
}

window.onresize=onWindowResize;