function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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 MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function sendMailtje(theForm) {

	
// CONTROLE NAAM.
if (theForm.naam.value== "")
	{	
	alert("De naam is verplicht.");
	theForm.naam.focus();
	return (false);
	}

// CONTROLE E-MAIL ADRES.
if (theForm.email.value== "")
	{	
	alert("Het e-mail adres is verplicht.");
	theForm.email.focus();
	return (false);
	}
	
if (theForm.email.value.length < 5)
	  {
	  alert("Het e-mail adres moet uit tenminste 5 tekens bestaan.");
	  theForm.email.focus();
	  return (false);
	  }
  	  var checkOK = ".-_@ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
 	  var checkStr = theForm.email.value;
	  var allValid = true;
	  for (i = 0;  i < checkStr.length;  i++)
	  {
	    ch = checkStr.charAt(i);
	    for (j = 0;  j < checkOK.length;  j++)
	      if (ch == checkOK.charAt(j))
	        break;
	    if (j == checkOK.length)
	    {
	      allValid = false;
	      break;
	    }
  	}
	if (!allValid)
	{
	   alert("Het e-mail adres is niet correct.");
	   theForm.email.focus();
	   return (false);
	}
	if (theForm.email.value.indexOf(".") == -1 || theForm.email.value.lastIndexOf(".") > theForm.email.value.length - 3 )
	{
	   alert("Het e-mail adres is niet correct.");
	   theForm.email.focus();
	   return (false);
	}
   if (theForm.email.value.indexOf("@") == -1 || theForm.email.value.lastIndexOf("@") > theForm.email.value.lastIndexOf(".") - 3 )
	{
	   alert("Het e-mail adres is niet correct.");
	   theForm.email.focus();
	   return (false);
	}


	// CONTROLE ONDERWERP.
	if (theForm.onderwerp.value== "")
	{	
		alert("Het onderwerp is verplicht.");
		theForm.onderwerp.focus();
		return (false);
	}

	// CONTROLE BERICHT.
	if (theForm.bericht.value== "")
	{	
		alert("Het bericht is verplicht.");
		theForm.bericht.focus();
		return (false);
	}

	varPath = "http://www.jazzatthecastlebreda.nl/mailtje.php?&naam=" + theForm.naam.value+ "&email=" + theForm.email.value+ "&onderwerp=" + theForm.onderwerp.value+ "&bericht=" + theForm.bericht.value;

	window.location.href=varPath;
}

function go1(){
 if (document.selecter1.select1.options[document.selecter1.select1.selectedIndex].value != "none")
 {
 	location = document.selecter1.select1.options[document.selecter1.select1.selectedIndex].value
 }
 } 

function selectSeizoen()
{
	document.write('<select name="select1" size=1 onchange="go1()">');
	document.write('<option value=none>---- seizoenen ----'); 
	document.write('<option value="fotogallerij1112.html">seizoen 2011/2012');
	document.write('<option value="fotogallerij1011.html">seizoen 2010/2011');
	document.write('<option value="fotogallerij0910.html">seizoen 2009/2010');
	document.write('<option value="fotogallerij0809.html">seizoen 2008/2009');
	document.write('<option value="fotogallerij0708.html">seizoen 2007/2008');
	document.write('<option value="fotogallerij0607.html">seizoen 2006/2007');
	document.write('<option value="fotogallerij0506.html">seizoen 2005/2006');
	document.write('<option value="fotogallerij0405.html">seizoen 2004/2005');
	document.write('<option value="fotogallerij0304.html">seizoen 2003/2004');
	document.write('<option value="fotogallerij2000.html">seizoen 2000');
	document.write('<option value="fotogallerij1999.html">seizoen 1999');
	document.write('<option value="fotogallerij1998.html">seizoen 1998');
	document.write('<option value="fotogallerij1997.html">seizoen 1997');
	document.write('<option value="fotogallerij1995.html">seizoen 1995');
	document.write('<option value="fotogallerijvoor1995.html">seizoenen < 1995');
	document.write('</select>');
}

function writeSponsors()
{
	document.write("Interflon<br>");
	document.write("Marieke-Willem-Femke-Holding<br>");
	document.write("Café Brasserie Oncle Jean<br>");
	document.write("Rosmalen Gerechtdeurwaarders<br>");
	document.write("The Nelson,Oscar and Teddy Family<br>");
	document.write("Van Dijnsen Multitrading<br>");
	document.write("Van Dijnsen Installatiewerken<br>");
	document.write("Nederlandse Defensie Academie");
}

