var x;

function getObj(name){
  if (document.getElementById){
  	this.obj = document.getElementById(name);
if((this.obj!=null) && (this.obj!=undefined)){
	this.style = document.getElementById(name).style;
}else{
return false;
}
  }
}

function setMenu(id){
x = new getObj(id);
if(x.style!=null){
x.style.color="#00305C";
x.style.backgroundColor="#FFF";
}

}

function GetSection() {
  var query = window.location.href;
  var pairs = query.split("/");
  var lengte = pairs.length;
  var section = pairs[lengte-1].split(".");

  if(section!=null){
    var section2 = section[0].split("-");
    if (section2!=null){
	if (section2[1]!=null){
	return section2[1];
	}else{
	return section2[0];
	}
    }else{
    return false;
    }
  }else{
    return false;
  }
}

function showActive() {
  if (((s=GetSection())!=null) && ((s=GetSection())!="")) {
    setMenu(s);
  }else{
    setMenu('home');
  }
}



function ValidateForm() {

var doc = document.getElementById('frmVacature');

    if(doc.naam.value == "") { 
      alert('U heeft geen naam ingevuld.');
      doc.naam.focus(); 
      return false; 
    } 
	  if(doc.geboortedatum.value == "") { 
      alert('U heeft geen geboortedatum ingevuld.');
      doc.geboortedatum.focus(); 
      return false; 
    }
	if (!(doc.geslacht[0].checked || doc.geslacht[1].checked)) {
		alert('U heeft geen geslacht opgegeven');
		return false; 
	}
    if(doc.huidige_functie.value == "") { 
      alert('U heeft niet uw huidige functie ingevuld.');
      doc.huidige_functie.focus(); 
      return false; 
    }    
    if(doc.email.value == "") { 
      alert('U heeft niet uw e-mailadres ingevuld.');
      doc.email.focus(); 
      return false; 
   }   
      if(doc.opleidingsniveau.value == "") { 
      alert('U heeft niet uw opleidingsniveau ingevuld.');
      doc.opleidingsniveau.focus(); 
      return false; 
   }   
   if (!(doc.rijbewijs[0].checked || doc.rijbewijs[1].checked)) {
		alert('U heeft niet aangegeven of u een rijbewijs heeft');
		return false; 
	}
   return true;
  }






