function contactVersturen() {
	d = document.frmContact;
	var errors = new Array("naam", "email", "telefoon");
	error = false;
	for (a=0;a<errors.length;a++) {
		document.getElementById(errors[a]).className = "";
		if (!d[errors[a]].value) {
			error = true;
			document.getElementById(errors[a]).className = "error";
			document.getElementById(errors[a]+'Lbl').className = "error";
		}
	}

	if (!error) {
		return true;
	} else {
		return false;	
	}
}

function checkformulier(field){
	var status = 'okee';
	// GA KIJKEN WELKE VELDEN VERPLICHT ZIJN.
	// DEZE BEGINNEN MET check_
	var frm = document.forms[0];
	for (var e = 0; e < frm.length; e++) {
		var name = frm.elements[e].name;
	    if(name.substr(0,6) == 'check_'){
			var naamzondercheck = name.substr(6,28)
			if(frm.elements[e].value==''){
			 	alert('U heeft geen '+ naamzondercheck + ' ingevoerd');
				status = 'niet okee';
			}
		}
    }
	if(status=='okee'){
		frm.submit();
	}
}

function bugreport(currentPage,referer,naam) {
	open("/content/reportbug.php?currentPage="+escape("http://"+currentPage)+"&referer="+escape(referer)+"&naam="+naam,"bugReport","width=500,height=380,scrollbars=no,resizable=no,toolbar=no,statusbar=yes");
}

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

function showBannerTimer() {  
  setTimeout(showBanner, 1250);
}

function showBanner() {
	var divBanner = document.getElementById("flashBTO");
	divBanner.style.display = "block";
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}
