function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function bepaal_indexpagina()
{
  if (screen.width==800||screen.height==600) //if 800x600
  window.location.replace("index_800.htm")

  else if (screen.width==1024||screen.height==768) //if 1024x768
  window.location.replace("index_1024.htm")

  else if (screen.width==1280||screen.height==1024) //if 1280x1024
  window.location.replace("index_1024.htm")

  else //if all else
  window.location.replace("index_1024.htm") 
}

function checkit()
{
	// In textstring I gather the data that are finally written to the textarea.

	// First of all, have all the text boxes been filled in?
	// This part is treated in the normal page.
	// I put all boxes and their values in textstring
    var returnval = false;
    var tekst = '';

    var box = document.forms['form-wbim'].elements['required'];
    var box_tekst = box.value;
    arr_required = box_tekst.split( ',');

	for (i=0;i<arr_required.length;i++) {
	    var box = document.forms['form-wbim'].elements[ arr_required[ i ] ];
            if (!box.value) {
                tekst += box.name + '\n';
            }
	}
    if (tekst.length != 0) {
       alert( 'Onderstaande velden zijn verplicht, maar niet ingevuld\n' + tekst );
       returnval = false;
    }
    else {
       returnval = true;
    }
    return returnval;
}
 
function kopieer_niet()
{
   var clickmessage="Helaas, afbeeldingen mogen niet worden opgeslagen."

   function disableclick(e) {
   if (document.all) {
   if (event.button==2||event.button==3) {
   if (event.srcElement.tagName=="IMG"){
   alert(clickmessage);
   return false;
   }
   }
   }
   else if (document.layers) {
   if (e.which == 3) {
   alert(clickmessage);
   return false;
   }
   }
   else if (document.getElementById){
   if (e.which==3&&e.target.tagName=="IMG"){
   alert(clickmessage)
   return false
   }
   }
   }
   
   function associateimages(){
   for(i=0;i<document.images.length;i++)
   document.images[i].onmousedown=disableclick;
   }
   
   if (document.all)
   document.onmousedown=disableclick
   else if (document.getElementById)
   document.onmouseup=disableclick
   else if (document.layers)
   associateimages()
}
