function initPage() {

  /* calculate the window width and height */
  var wWidth = 0, wHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    wWidth = window.innerWidth;
    wHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    wWidth = document.documentElement.clientWidth;
    wHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    wWidth = document.body.clientWidth;
    wHeight = document.body.clientHeight;
  }

  /* load the elements */
  var back = MM_findObj("blue_black");
  var con = MM_findObj("container");
  var log1 = MM_findObj("logo1");
  var log2 = MM_findObj("logo2");
  var left_nav = MM_findObj("left_navigation");
  var copy1 = MM_findObj("copyright");
  var copy2 = MM_findObj("copyright2");  
  var right_nav = MM_findObj("right_navigation");
  var collage = MM_findObj("collage");  
  var news = MM_findObj("news");
  var address = MM_findObj("address");   
      
  /* change position of the elements because we have a small window (height) */
  if ( wHeight < 490 )
  {
    /* small windows */
    con.style.top = "49px";
    con.style.marginTop = "0px";
  }
  else
  {
    /* normal windows */
    con.style.top = "50%";
    con.style.marginTop = "-228px";  
  }
  
  /* change position of the elements because we have a small window (width) */
  if ( wWidth < 1000 )
  {
    /* small windows */
    con.style.width = "1000px";
    back.style.width = "1000px";
    log1.style.left = "500px";
    log2.style.left = "500px";
    left_nav.style.left = "500px";
    copy1.style.left = "500px";
    copy2.style.left = "500px";
    collage.style.left = "500px";
    right_nav.style.left = "500px";
    news.style.left = "500px";
    address.style.left = "500px";
  } 
  else
  {
    /* normal windows */
    con.style.width = "100%";
    back.style.width = "100%";
    log1.style.left = "50%";
    log2.style.left = "50%";
    left_nav.style.left = "50%";
    copy1.style.left = "50%";
    copy2.style.left = "50%";
    collage.style.left = "50%";
    right_nav.style.left = "50%";
    news.style.left = "50%";
    address.style.left = "50%";  
  }

}

var curImage = "design/navigatie/home.jpg";

function restoreImage() 
{
  im = MM_findObj("pageImage");
  im.src = curImage;
}

function swapImage( newImg )
{
  im = MM_findObj("pageImage");
  im.src = newImg;
}

function changeCurImage( newImg )
{
  curImage = newImg;
  restoreImage();
}
  

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
