var ie=document.all
var ieNOTopera=document.all&&navigator.userAgent.indexOf("Opera")==-1
var form_submitted = false;

function submitdetailform(screen)
{
  if(!form_submitted)
  {
    form_submitted = true;
    if (screen != '')
    {
      document.bookingform.goto_screen.value = screen;
      document.bookingform.next.value = "";
      document.bookingform.back.value =1;
    }
    else
    {
      document.bookingform.next.value = "Volgende";
    }
    var dsocleft=ie? document.body.scrollLeft : pageXOffset;
    var dsoctop=ie? document.body.scrollTop : pageYOffset;
    var window_width=ieNOTopera? document.body.clientWidth : window.innerWidth-20;
    var window_height=ieNOTopera? document.body.clientHeight : window.innerHeight;
  
    if (ie||document.getElementById)
    {
      document.getElementById('geduld').style.left=(parseInt(dsocleft)+window_width/2-document.getElementById('geduld').offsetWidth/2)+"px";
      document.getElementById('geduld').style.top=(parseInt(dsoctop)+parseInt(window_height)-400)+"px";
    }
    else if (document.layers)
    {
      document.layers.geduld.left=dsocleft+window_width/2-document.layers.geduld.document.width/2+"px";
      document.layers.geduld.top=dsoctop+window_height-document.layers.geduld.document.height-5+"px";
    }
  
    if (document.getElementById)  // DOM3 = IE5, NS6M
    document.getElementById('geduld').style.visibility = 'visible';
  
    document.bookingform.submit();
  }
}

function popupImage(image, myname, w, h, scroll)
{
  var winl     = (screen.width - w) / 2;
  var wint     = (screen.height - h) / 2;
  var winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll;
  var imageurl = '/popup_image.php?image='+image; 
  var win      = window.open(imageurl, myname, winprops)

  if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
