/*
**************************************************************************
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.application.IDfunction.selectedIndex==0) || (document.application.IDfunction.value == null)) { 
		alert("Please select the position you would like to apply for.");
		return false;
	}
	
	/*if ((document.application.IDTitle.selectedIndex==0) || (document.application.IDTitle.value == null)) { 
		alert("Please select your title.");
		return false;
	}*/
	
	 if ((document.application.ForenameCursist.value == "") || (document.application.ForenameCursist.value == null)) {
      alert("Fill in your first name.");
      document.application.ForenameCursist.focus();
      return false;
    
    }   
	
	/*if ((document.application.VoorlettersCursist.value == "") || (document.application.VoorlettersCursist.value == null)) {
      alert("Fill in your initials.");
      document.application.VoorlettersCursist.focus();
      return false;
    
    } */  
	
	if ((document.application.SurnameCursist.value == "") || (document.application.SurnameCursist.value == null)) {
      alert("Fill in your surname.");
      document.application.SurnameCursist.focus();
      return false;
    
    } 
	
	if ((document.application.dag.selectedIndex==0) || (document.application.dag.value == null)) { 
		alert("Please select your day of birth.");
		return false;
	}
	
	
	if ((document.application.maand.selectedIndex==0) || (document.application.maand.value == null)) { 
		alert("Please select your month of birth.");
		return false;
	}
	
	
	if ((document.application.jaar.selectedIndex==0) || (document.application.jaar.value == null)) { 
		alert("Please select your year of birth.");
		return false;
	}
	
	/*if ((document.application.GeboortePlaatsCursist.value == "") || (document.application.GeboortePlaatsCursist.value == null)) {
      alert("Please enter your place of birth.");
      document.application.GeboortePlaatsCursist.focus();
      return false;
    
    } */
	
		if ((document.application.Addresscursist.value == "") || (document.application.Addresscursist.value == null)) {
      alert("Please enter your address.");
      document.application.Addresscursist.focus();
      return false;
    
    } 
	
	if ((document.application.PostCodecursist.value == "") || (document.application.PostCodecursist.value == null)) {
      alert("Please enter your postcode.");
      document.application.PostCodecursist.focus();
      return false;
    
    } 
	
	if ((document.application.AddressCitycursist.value == "") || (document.application.AddressCitycursist.value == null)) {
      alert("Please enter your City.");
      document.application.AddressCitycursist.focus();
      return false;
    
    } 
	
	if ((document.application.TelephoneDayCursist.value == "") || (document.application.TelephoneDayCursist.value == null)) {
      alert("Please enter a landline number.");
      document.application.TelephoneDayCursist.focus();
      return false;
    
    } 
	
	if ((document.application.MobielCursist.value == "") || (document.application.MobielCursist.value == null)) {
      alert("Please ea mobile number.");
      document.application.MobielCursist.focus();
      return false;
    
    } 
	  
    <!--- Ensure a valid looking email address --->
    if ((document.application.EmailaddressCursist.value == "") || 
        (document.application.EmailaddressCursist.value == null) ||
        (-1 == document.application.EmailaddressCursist.value.indexOf("@")) ||
        (-1 == document.application.EmailaddressCursist.value.indexOf(".")) ||
        (-1 != document.application.EmailaddressCursist.value.indexOf(",")) ||
        (-1 != document.application.EmailaddressCursist.value.indexOf("#")) ||
        (-1 != document.application.EmailaddressCursist.value.indexOf("!")) ||
        (-1 != document.application.EmailaddressCursist.value.indexOf(" ")) ||
        (document.application.EmailaddressCursist.value.length < 5)) {
          alert("Fill in your email address.");
          document.application.EmailaddressCursist.focus();
          return false;
    }  
	
	
	if ((document.application.TempSchool.value == "") || (document.application.TempSchool.value == null)) {
      alert("Please enter the name of your school.");
      document.application.TempSchool.focus();
      return false;
    
    } 
	
	if ((document.application.TempContactpersoon.value == "") || (document.application.TempContactpersoon.value == null)) {
      alert("Please enter the department.");
      document.application.TempContactpersoon.focus();
      return false;
    
    } 
	
	if ((document.application.TempAfdeling.value == "") || (document.application.TempAfdeling.value == null)) {
      alert("Please enter name of your tutor.");
      document.application.TempAfdeling.focus();
      return false;
    
    } 
	
	if ((document.application.startdag.selectedIndex==0) || (document.application.startdag.value == null)) { 
		alert("Please select your earliest start day.");
		return false;
	}
	
	
	if ((document.application.startmaand.selectedIndex==0) || (document.application.startmaand.value == null)) { 
		alert("Please select our earliest start month.");
		return false;
	}
	
	
	if ((document.application.einddag.selectedIndex==0) || (document.application.einddag.value == null)) { 
		alert("Please select latest end day.");
		return false;
	}
	
	if ((document.application.eindmaand.selectedIndex==0) || (document.application.eindmaand.value == null)) { 
		alert("Please select latest end month.");
		return false;
	}
	
	
		
	else
	{
	document.application.submit();
	}

  }
  
  /*function checkBR1()
  {
    if (document.application.chk2005.checked == true)
		{document.application.chk2006.checked = false;}
  }
function checkBR2()
  {
    if (document.application.chk2006.checked == true)
		{document.application.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();
			}
		}
}		


