
function checkvacatureform()
{
	var fout = "";
	
	if(document.getElementById('naam').value.length == "" ){ fout += "Vul een naam in.\n\r" ; }
	if(document.getElementById('leeftijd').value.length == "" ){ fout += "Vul je leeftijd in.\n\r" ; }
	if(document.getElementById('straat').value.length == "" ){ fout += "Vul een straat en huisnr. in.\n\r" ; }
	if(document.getElementById('postcode').value.length == "" ){ fout += "Vul een postcode in.\n\r" ; }
	if(document.getElementById('woonplaats').value.length == "" ){ fout += "Vul een woonplaats in.\n\r" ; }
	if(document.getElementById('mail').value.length == "" ){ fout += "Vul een geldig email adres in.\n\r" ; }
	
	if(fout != "")
	{
		alert("U heeft de volgende velden niet ingevuld:\n\r\n\r" + fout );
		return false ;
	}else{
		return true ;
	}
}

function checkcontactform()
{
	var fout = "";
	
	if(document.getElementById('naam').value.length == "" ){ fout += "Vul een naam in.\n\r" ; }
	if(document.getElementById('straat').value.length == "" ){ fout += "Vul een straat en huisnr. in.\n\r" ; }
	if(document.getElementById('postcode').value.length == "" ){ fout += "Vul een postcode in.\n\r" ; }
	if(document.getElementById('woonplaats').value.length == "" ){ fout += "Vul een woonplaats in.\n\r" ; }
	if(document.getElementById('mail').value.length == "" ){ fout += "Vul een geldig email adres in.\n\r" ; }
	
	if(fout != "")
	{
		alert("U heeft de volgende velden niet ingevuld:\n\r\n\r" + fout );
		return false ;
	}else{
		return true ;
	}
}

function checkform()
{
	var fout = "";
	
	if(document.getElementById('naam').value.length == "" ){ fout += "Vul een naam in.\n\r" ; }
	if(document.getElementById('straat').value.length == "" ){ fout += "Vul een straat en huisnr. in.\n\r" ; }
	if(document.getElementById('postcode').value.length == "" ){ fout += "Vul een postcode in.\n\r" ; }
	if(document.getElementById('woonplaats').value.length == "" ){ fout += "Vul een woonplaats in.\n\r" ; }
	if(document.getElementById('mail').value.length == "" ){ fout += "Vul een geldig email adres in.\n\r" ; }
	if(document.getElementById('aankomst').value.length == "" ){ fout += "Vul een aankomst datum in.\n\r" ; }
	if(document.getElementById('vertrek').value.length == "" ){ fout += "Vul een vertrek datum in.\n\r" ; }
	if(document.getElementById('personen').value.length == "" ){ fout += "Vul het aantal personen in.\n\r" ; }
	
	if(fout != "")
	{
		alert("U heeft de volgende velden niet ingevuld:\n\r\n\r" + fout );
		return false ;
	}else{
		return true ;
	}
}

function addinputs(waarde)
{
	if(waarde != "")
	{
		var waar = document.getElementById('geboortedatums') ;
		var inputs = "" ;
		var maximaal = 10 ;
		
		if(waarde > maximaal)
		{
			waar.innerHTML = "" ;
		}else{
		
		for(i=0; i < waarde ; i++ )
		{
			var persoon = i + 1 ;
			inputs += "<br />geboorte datum persoon "+ persoon + " <input name=\"gbdatum[]\" class=\"textfield\" /><br />" ;
		}
		
	  waar.innerHTML = inputs + "<br />"  ;
		}
	}
}

function opslaan (bestand)
{
	document.execCommand('SaveAs', bestand ) ;
	return false ;
}

function messageWindow(title, msg)
{
  var width = 700 , height = 600 ;

  var left = (screen.width/2) - width/2;

  var top = (screen.height/2) - height/2;

  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;

  var msgWindow = window.open("http://www.colmont.nl/fotopopup.php?"+msg+"&amp;t="+title , title , styleStr);
}

preloadImages( 'templates/images/header2.jpg', 'templates/images/hover2.gif', 'templates/images/anchor2.gif','templates/images/anchor.gif', 'templates/images/hover.jpg', 'templates/images/container_bg.gif'  );

function preloadImages()
{

  if(document.images)
  {
    if(!document.imageArray) document.imageArray = new Array();
    var i,j = document.imageArray.length, args = preloadImages.arguments;
    for(i=0; i<args.length; i++)
    {
      if (args[i].indexOf("#")!=0)
      {
        document.imageArray[j] = new Image;
        document.imageArray[j++].src = args[i];
      }
    }
  }
}
