/*
STANDAARD JAVASCRIPT FILE
door:			marcel hageman
datum:			vrijdag 17 augustug 2001
extra info:		probeer dit bestand zo duidelijk mogelijk te houden voor eventuele andere mensen die de bron willen lezen.
				Maak een commentaar tag bovenaan elke functie,  en maak er een stippellijn rand omheen, zodat je makkelijk kunt zien waar de ene ophoud, en de ander begint.
*/










/* ------------------------------------------------------------------------------------
							begin controleer formulieren
------------------------------------------------------------------------------------- */
function chkForm(form)
 {
  for (var i = 0;i < form.elements.length; i++)
   {
    if (form.elements[i].value == "" && form.elements[i].name.indexOf("!") > -1)
     {
      alert("Er is een fout opgetreden met het invullen van de velden")
	  return
     }
    }
   form.submit()
  return
 }
/* ------------------------------------------------------------------------------------
							eind controleer formulieren
------------------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------------------
							begin vorige scherm functie
------------------------------------------------------------------------------------- */
function goBack()
{ 
if(navigator.appName=="Netscape") window.back();
else history.back();
}
/* ------------------------------------------------------------------------------------
							eind vorige scherm functie
------------------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------------------
							Begin Popup Window
------------------------------------------------------------------------------------- */

function NieuwVenster(Url,Width,Height) {
window.open(Url, "PopUp", "Width="+Width+", height="+Height+", menubar=no, toolbar=no, location=no, directories=no, statusbar=no, resizable=no");
}
/* ------------------------------------------------------------------------------------
							Einde Popup Window
------------------------------------------------------------------------------------- */
function swapPreview(strname)
{
var curvalue = document.all['show'].style.visibility
if (curvalue == "hidden")  {
			document.all['show'].style.visibility='visible';
			document.all[strname].value='Verberg voorbeeld';
} else {
			document.all['show'].style.visibility='hidden';
			document.all[strname].value='Bekijk voorbeeld';
}
}
/* ------------------------------------------------------------------------------------
							Begin valideerForm functie
------------------------------------------------------------------------------------- */
function valideerForm()
{
   args = valideerForm.arguments
   thisForm = args[0]
   for (i=1;thisElem=args[i];i++)
   {
       if (thisForm.elements[thisElem].value.length < 1)
       {
           alert("U bent vergeten om het veld '"+thisForm.elements[thisElem].name+"' in te vullen")
           return false
       }
   }
}


/* --- controleerd of een functie bestaat ---*/

function doesFormExist(frm) {
   var blnReturn = false;
    if(document.forms[frm] != undefined) {
        blnReturn = true;
    } else {
        blnReturn = false;
    }
    return blnReturn;
}

function BrowserCheck() {
	var n = navigator; var d = document;
	var v = n.appVersion; 
	var ua = n.userAgent;

	this.IE = (ua.indexOf('MSIE') > -1)
	this.NS = (n.appName.indexOf('Netscape') > -1)
	this.OP = (ua.indexOf('Opera') > -1)

	this.IE4 = (d.all && !d.getElementById)? true:false;
	this.IE4UP = (d.all)? true:false;
	this.IE5 = (ua.indexOf('MSIE 5.0') > -1)
	this.IE55 = (ua.indexOf('MSIE 5.5') > -1)
	this.IE6 = (ua.indexOf('MSIE 6.0') > -1)
	this.NS4 = (this.NS && v.indexOf("4.") > -1)? true:false;
	this.NS6 = (this.NS && d.getElementById)? true:false;
	this.DOM = (d.getElementById && d.createElement)? true:false;
	this.OP5 = (this.OP && ua.indexOf('5.') > -1)
	this.OP6 = (this.OP && ua.indexOf('6.') > -1)
	this.MAC = (n.platform.indexOf('Mac') > -1)
}	is = new BrowserCheck();