/*
**************************************************************************
Brochures.js
JS Functions used on the brochure request Page

AS 22/08/05

if ((document.NieuwsBriefForm.title.selectedIndex==0) || (document.NieuwsBriefForm.title.value == null)) { 
		alert("Vul uw titel in.");
		return false;
	}
**************************************************************************
*/
  function validateForm() 
  {
	  
	  
	  if ((document.sollicitatie.functie1.selectedIndex==0) || (document.sollicitatie.functie1.value == null)) { 
		alert("Vul de functie waar jouw eerste voorkeur naar uit gaat in.");
		return false;
	}
	
		
		
		 if ((document.sollicitatie.besch_van_dag.selectedIndex==0) || (document.sollicitatie.besch_van_dag.value == null)) { 
		alert("Vul de dag vanaf wanneer je beschikbaar bent in.");
		return false;
	}
	 if ((document.sollicitatie.besch_van_maand.selectedIndex==0) || (document.sollicitatie.besch_van_maand.value == null)) { 
		alert("Vul de maand vanaf wanneer je beschikbaar bent in.");
		return false;
	}
	
	 if ((document.sollicitatie.besch_tot_dag.selectedIndex==0) || (document.sollicitatie.besch_tot_dag.value == null)) { 
		alert("Vul de dag tot wanneer je beschikbaar bent in.");
		return false;
	}
	
	if ((document.sollicitatie.besch_tot_maand.selectedIndex==0) || (document.sollicitatie.besch_tot_maand.value == null)) { 
		alert("Vul de maand tot wanneer je beschikbaar bent in.");
		return false;
	}
	 
	
	if ((document.sollicitatie.achternaam.value == "") || (document.sollicitatie.achternaam.value == null)) {
      alert("Vul je achternaam in.");
      document.sollicitatie.achternaam.focus();
      return false;
    }
	
	if ((document.sollicitatie.roepnaam.value == "") || (document.sollicitatie.roepnaam.value == null)) {
      alert("Vul je roepnaam in.");
      document.sollicitatie.roepnaam.focus();
      return false;
    }
		
    if ((document.sollicitatie.voorletters.value == "") || (document.sollicitatie.voorletters.value == null)) {
      alert("Vul je voorletter(s) in.");
      document.sollicitatie.voorletters.focus();
      return false;
    }

 if (!document.sollicitatie.geslacht[0].checked &&
    !document.sollicitatie.geslacht[1].checked)  
	{
                alert ( "Vul je geslacht in" );
                return false;
        }
	
	if ((document.sollicitatie.geb_dag.selectedIndex==0) || (document.sollicitatie.geb_dag.value == null)) { 
		alert("Vul je geboortedag in.");
		return false;
	}
	
	if ((document.sollicitatie.geb_maand.selectedIndex==0) || (document.sollicitatie.geb_maand.value == null)) { 
		alert("Vul je geboortemaand in.");
		return false;
	}
	
	if ((document.sollicitatie.geb_jaar.selectedIndex==0) || (document.sollicitatie.geb_jaar.value == null)) { 
		alert("Vul je geboortejaar in.");
		return false;
	}
	
	if ((document.sollicitatie.nat.value == "") || (document.sollicitatie.nat.value == null)) {
		alert("Vul je nationaliteit in");
		return false;
	}

	if ((document.sollicitatie.adres.value == "") || (document.sollicitatie.adres.value == null)) {
      alert("Vul je adres in.");
      document.sollicitatie.adres.focus();
      return false;
    }   
    
    if ((document.sollicitatie.huisnummer.value == "") || (document.sollicitatie.huisnummer.value == null)) {
      alert("Vul je huisnummer in.");
      document.sollicitatie.huisnummer.focus();
      return false;
    }         
    
    if ((document.sollicitatie.postcode.value == "") || (document.sollicitatie.postcode.value == null)) {
      alert("Vul je postcode in.");
      document.sollicitatie.postcode.focus();
      return false;
    }       
    
    if ((document.sollicitatie.woonplaats.value == "") || (document.sollicitatie.woonplaats.value == null)) {
      alert("Vul je woonplaats in.");
      document.sollicitatie.woonplaats.focus();
      return false;
    }    
    
  
    <!--- Ensure a valid looking email address --->
    if ((document.sollicitatie.email.value == "") || 
        (document.sollicitatie.email.value == null) ||
        (-1 == document.sollicitatie.email.value.indexOf("@")) ||
        (-1 == document.sollicitatie.email.value.indexOf(".")) ||
        (-1 != document.sollicitatie.email.value.indexOf(",")) ||
        (-1 != document.sollicitatie.email.value.indexOf("#")) ||
        (-1 != document.sollicitatie.email.value.indexOf("!")) ||
        (-1 != document.sollicitatie.email.value.indexOf(" ")) ||
        (document.sollicitatie.email.value.length < 5)) {
          alert("Vul je e-mail adres in.");
          document.sollicitatie.email.focus();
          return false;
    }  
	
	 if ((document.sollicitatie.telefoon.value == "") || (document.sollicitatie.telefoon.value == null)) {
      alert("Vul je vaste telefoonnummer in.");
      document.sollicitatie.telefoon.focus();
      return false;
    }    
	
	  if (!document.sollicitatie.stageplaats[0].checked &&
    !document.sollicitatie.stageplaats[1].checked)  
	{
                alert ( "Wil je in aanmerking komen voor een stageplaats?" );
                return false;
        }
	
	if (!document.sollicitatie.eerder_gewerkt[0].checked &&
    !document.sollicitatie.eerder_gewerkt[1].checked)  
	{
                alert ( "Vul in of je eerder gewerkt hebt voor Eurocamp (of Keycamp)?" );
                return false;
        }
		
	if (!document.sollicitatie.eerder_solli[0].checked &&
    !document.sollicitatie.eerder_solli[1].checked)  
	{
                alert ( "Vul in of je eerder gesolliciteerd hebt bij Eurocamp (of Keycamp)?" );
                return false;
        }
		
	if ((document.sollicitatie.waar.selectedIndex==0) || (document.sollicitatie.waar.value == null)) { 
		alert("Geef aan waar je van ons gehoord hebt.");
		return false;
	}
	
	 if ((document.sollicitatie.opleiding.value == "") || (document.sollicitatie.opleiding.value == null)) {
      alert("Vul in welke opleiding je hebt gevolgd.");
      document.sollicitatie.opleiding.focus();
      return false;
    }    
	
	if (!document.sollicitatie.engels[0].checked &&
    !document.sollicitatie.engels[1].checked&&
    !document.sollicitatie.engels[2].checked&&
    !document.sollicitatie.engels[3].checked)  
	{
                alert ( "Vul je spreekvaardigheid Engels in." );
                return false;
        }
	
	if (!document.sollicitatie.duits[0].checked &&
    !document.sollicitatie.duits[1].checked&&
    !document.sollicitatie.duits[2].checked&&
    !document.sollicitatie.duits[3].checked)  
	{
                alert ( "Vul je spreekvaardigheid Duits in." );
                return false;
        }
		
	if (!document.sollicitatie.frans[0].checked &&
    !document.sollicitatie.frans[1].checked&&
    !document.sollicitatie.frans[2].checked&&
    !document.sollicitatie.frans[3].checked)  
	{
                alert ( "Vul je spreekvaardigheid Frans in." );
                return false;
        }
		
	if (!document.sollicitatie.italiaans[0].checked &&
    !document.sollicitatie.italiaans[1].checked&&
    !document.sollicitatie.italiaans[2].checked&&
    !document.sollicitatie.italiaans[3].checked)  
	{
                alert ( "Vul je spreekvaardigheid Italiaans in." );
                return false;
        }
	
	if (!document.sollicitatie.spaans[0].checked &&
    !document.sollicitatie.spaans[1].checked&&
    !document.sollicitatie.spaans[2].checked&&
    !document.sollicitatie.spaans[3].checked)  
	{
                alert ( "Vul je spreekvaardigheid Spaans in." );
                return false;
        }
	
	
	 if ((document.sollicitatie.werkervaring.value == "") || (document.sollicitatie.werkervaring.value == null)) {
      alert("Vul je werkervaring in.");
      document.sollicitatie.werkervaring.focus();
      return false;
    }    
	

	
	 if ((document.sollicitatie.telefoon.value == "") || (document.sollicitatie.telefoon.value == null)) {
      alert("Vul je vaste telefoonnummer in.");
      document.sollicitatie.telefoon.focus();
      return false;
    }    
	
	 if ((document.sollicitatie.ervaring_functie.value == "") || (document.sollicitatie.ervaring_functie.value == null)) {
      alert("Vul in welke (werk)ervaringen je hebt opgedaan die van belang kunnen zijn voor de functie waarna je solliciteert.");
      document.sollicitatie.ervaring_functie.focus();
      return false;
    }    
	
	 if ((document.sollicitatie.motivatie.value == "") || (document.sollicitatie.motivatie.value == null)) {
      alert("Waarom solliciteer je naar deze functie?");
      document.sollicitatie.motivatie.focus();
      return false;
    }    
		
	 if ((document.sollicitatie.hobby.value == "") || (document.sollicitatie.hobby.value == null)) {
      alert("Omschrijf je hobby's, interesses en eventuele reiservaringen.");
      document.sollicitatie.hobby.focus();
      return false;
    }   
	
	 if ((document.sollicitatie.waarom_eurocamp.value == "") || (document.sollicitatie.waarom_eurocamp.value == null)) {
      alert("Vul in waarom je voor Eurocamp kiest.");
      document.sollicitatie.waarom_eurocamp.focus();
      return false;
    }   
	
	 if ((document.sollicitatie.land_regio.value == "") || (document.sollicitatie.land_regio.value == null)) {
      alert("Vul in in welk land / welke regio zou je willen werken en waarom");
      document.sollicitatie.land_regio.focus();
      return false;
    }   
		
	
	
		if (document.sollicitatie.checkbox.checked == false){
      alert("Geef aan dat je verklaart dit formulier naar waarheid te hebben ingevuld.");
      document.sollicitatie.checkbox.focus();
      return false;
    }  
		
	else
	{
	document.sollicitatie.submit();
	}

  }
  
  /*function checkBR1()
  {
    if (document.sollicitatie.chk2005.checked == true)
		{document.sollicitatie.chk2006.checked = false;}
  }
function checkBR2()
  {
    if (document.sollicitatie.chk2006.checked == true)
		{document.sollicitatie.chk2005.checked = false;}
  }*/
  
  function validateNieuwsbrief() 
   {
    if ((document.Vbeurs.uname.value == "") || (document.Vbeurs.uname.value == null)) {
      alert("Vul je achternaam in.");
      document.Vbeurs.uname.focus();
      return false;
    }   
	
	if (!document.Vbeurs.ip[0].checked &&
    !document.Vbeurs.ip[1].checked &&
    !document.Vbeurs.ip[2].checked)  
	{
                alert ( "Vul je aanspreektitel in." );
                return false;
        }
			

    <!--- Ensure a valid looking email address --->
    if ((document.Vbeurs.ucomment.value == "") || 
        (document.Vbeurs.ucomment.value == null) ||
        (-1 == document.Vbeurs.ucomment.value.indexOf("@")) ||
        (-1 == document.Vbeurs.ucomment.value.indexOf(".")) ||
        (-1 != document.Vbeurs.ucomment.value.indexOf(",")) ||
        (-1 != document.Vbeurs.ucomment.value.indexOf("#")) ||
        (-1 != document.Vbeurs.ucomment.value.indexOf("!")) ||
        (-1 != document.Vbeurs.ucomment.value.indexOf(" ")) ||
        (document.Vbeurs.ucomment.value.length < 5)) {
          alert("Vul je e-mail adres in.");
          document.Vbeurs.ucomment.focus();
          return false;
    } 
	if (document.Vbeurs.chkNieuwsBrief1.checked == false){
      alert("Wil je aangeven dat je de nieuwsbrief u wilt ontvangen?");
      document.Vbeurs.chkNieuwsBrief.focus();
      return false;
    }  
	else
	{
	document.Vbeurs.submit();
	}
  }
  
 function validateFeedback()
{
if ( document.feedback.uname.value == "" )
        {
                alert ( "Vul je achternaam in." );
                return false;
        }
		else
		{
			if ( document.feedback.ucomment.value == "" )
			{
					alert ( "Vul je e-mail adres in." );
					return false;
			}
		else
			{
			document.feedback.submit();
			}
		}
}		

