var newwin;
function launchwin(winurl,winname,winfeatures)
{
	newwin = window.open(winurl,winname,winfeatures);
	if(javascript_version > 1.0) {
		setTimeout('newwin.focus();',250);
	}
}
function ValidateNoHTML(theinput)
{
	s=theinput.value
	if(s.length==0) return true;
	var ht = new RegExp(/http\:\/\/|https\:\/\/|ftp\:\/\//i);
	var re = new RegExp("<[^<>]+>");
	if (s.match(re)) {
		return false
	} else if (s.match(ht)) {
		return false
	} else {
		return true
	}
}
function ValidateEmailOrNull(theinput)
{
	s=theinput.value
	if(s.length==0) return true;
	if(s.search)
	{
		return (s.search(new RegExp("^([-!#$%&'*+./0-9=?A-Z^_`a-z{|}~])+@([-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+\\.)+[a-zA-Z]{2,4}$","gi"))>=0)
	}
	if(s.indexOf)
	{
		at_character=s.indexOf('@')
		if(at_character<=0 || at_character+4>s.length)
			return false
	}
	if(s.length<6)
		return false
	else
		return true
}

function ValidateHyperlinkOrNull(theinput)
{
	s=theinput.value
	if(s.length==0) return true;
	if(s.substr(0,1)=="/") return true;
	
	
	var RegExp = /(([A-Z0-9][A-Z0-9_-]*)(\.{0,1}[A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?/i;
				
    if(RegExp.test(s)){ 
        return true;
    }else{
        return false;
    } 	
}

function ValidateEmailOrPhone(theinput)
{
	s=theinput.value
	if(theinput.form.phone.value.length!=0) return true;
	if(s.search)
	{
		return (s.search(new RegExp("^([-!#$%&'*+./0-9=?A-Z^_`a-z{|}~])+@([-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+\\.)+[a-zA-Z]{2,4}$","gi"))>=0)
	}
	if(s.indexOf)
	{
		at_character=s.indexOf('@')
		if(at_character<=0 || at_character+4>s.length)
			return false
	}
	if(s.length<6)
		return false
	else
		return true
}

function ValidateEmail(theinput)
{
	s=theinput.value
	if(s.search)
	{
		return (s.search(new RegExp("^([-!#$%&'*+./0-9=?A-Z^_`a-z{|}~])+@([-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+\\.)+[a-zA-Z]{2,4}$","gi"))>=0)
	}
	if(s.indexOf)
	{
		at_character=s.indexOf('@')
		if(at_character<=0 || at_character+4>s.length)
			return false
	}
	if(s.length<6)
		return false
	else
		return true
}

function editImage(image) 
{
	var url = "/lib/ImageManager/editor.php?img="+image;
	Dialog(url, function(param) 
	{
		if (!param) // user must have pressed Cancel
			return false;
		else
		{
			return true;
		}
	}, null);		
}

function ta_hover(id) {
	document.getElementById('row_' + id).style.background='#fff';
}
function ta_unhover(id) {
	document.getElementById('row_' + id).style.background='#eee';
}

function reformat (s)

{   var arg;
    var sPos = 0;
    var resultString = "";

    for (var i = 1; i < reformat.arguments.length; i++) {
       arg = reformat.arguments[i];
       if (i % 2 == 1) resultString += arg;
       else {
           resultString += s.substring(sPos, sPos + arg);
           sPos += arg;
       }
    }
    return resultString;
}
function ValidatePhone(theinput)
{

	var _p=theinput.value;
	var RegExp1= /[^\d]/g;
	var x=_p.replace(RegExp1,'');
	var RegExp2= /^(\d{3})(\d{3})(\d{4})$/;
	if(x.match(RegExp2))
	{
	  theinput.value=reformat(x,"",3,"",3,"",4);
	  return true;
	}
	else
	return false;
}
function removeAccents(s)
{
	var s;
	var diacritics =[
	/[\300-\306]/g, /[\340-\346]/g, // A, a
	/[\310-\313]/g, /[\350-\353]/g, // E, e
	/[\314-\317]/g, /[\354-\357]/g, // I, i
	/[\322-\330]/g, /[\362-\370]/g, // O, o
	/[\331-\334]/g, /[\371-\374]/g,  // U, u
	/[\321]/g, /[\361]/g, // N, n
	/[\307]/g, /[\347]/g, // C, c
	];
	var chars = ['A','a','E','e','I','i','O','o','U','u','N','n','C','c'];
	for (var i = 0; i < diacritics.length; i++)
	{
		s = s.replace(diacritics[i],chars[i]);
	}
	return s;
}
function formValidateLoginForm(theform) {
	if(theform.username.value=='') {
		alert('[E-mailadres] is een verplicht veld.');
		theform.username.focus();
		theform.username.old_className = theform.username.className;
		theform.username.className = 'input1_error';
		return false;
	}else if(ValidateEmailOrNull(theform.username)==false) {
		alert('Het ingevoerde E-mailadres is niet geldig. U moet een geldig E-mailadres invullen')
		theform.username.focus();
		theform.username.old_className = theform.username.className;
		theform.username.className = 'input1_error';
		return false;
	} else { 
		theform.username.className = 'input1';
	} 
	if(theform.password.value=='') {
		alert('[Wachtwoord] is een verplicht veld.');
		theform.password.focus();
		theform.password.old_className = theform.password.className;
		theform.password.className = 'input1_error';
		return false;
	} else { 
		theform.password.className = 'input1';
	} 
	return true;
}
function searchformValidate(theform) {
	if(theform.search.value.length<4) {
		alert('Geef een zoekterm op die bestaat uit minimaal 4 karakters.');
		theform.search.focus();
		theform.search.old_className = theform.search.className;
		theform.search.className = 'input1_error';
		return false;
	} else { 
		theform.search.className = 'input1';
	} 
	return true;
}
function formValidateSubscribe(theform) {
	if(theform.email.value=='') {
		alert('[e-mail] is een verplicht veld.');
		theform.email.focus();
		theform.email.old_className = theform.email.className;
		theform.email.className = 'input1_error';
		return false;
	} else { 
		theform.email.className = 'input1';
	} 
	if(ValidateEmail(theform.email)==false)
	{
		alert('Het ingevoerde e-mailadres is niet geldig. Geef een geldig e-mailadres op.')
		theform.email.focus()
		theform.email.old_className = theform.email.className;
		theform.email.className = 'input1_error';
		return false;
	} else { 
		theform.email.className = 'input1';
	} 				
}
function formValidateContact(theform) {
	if(theform.cf_name.value=='') {
		alert('[Naam] is een verplicht veld.');
		theform.cf_name.focus();
		theform.cf_name.old_className = theform.cf_name.className;
		theform.cf_name.className = 'input1_error';
		return false;
	} else { 
		theform.cf_name.className = 'input1';
	} 
	if(theform.cf_telephone.value!='' && ValidatePhone(theform.cf_telephone)==false)
	{
		alert('Het ingevoerde telefoonummer is niet geldig. Geef een 10-cijferige telefoonnummer op.')
		theform.cf_telephone.focus();
		theform.cf_telephone.old_className = theform.cf_telephone.className;
		theform.cf_telephone.className = 'input1_error';
		return false;
	} else { 
		theform.cf_telephone.className = 'input1';
	} 
	if(theform.cf_email.value=='') {
		alert('[E-mail] is een verplicht veld.');
		theform.cf_email.focus();
		theform.cf_email.old_className = theform.cf_email.className;
		theform.cf_email.className = 'input1_error';
		return false;
	} else { 
		theform.cf_email.className = 'input1';
	} 
	if(ValidateEmailOrNull(theform.cf_email)==false)
	{
		alert('Het ingevoerde e-mailadres is niet geldig. Geef een geldig e-mailadres op.')
		theform.cf_email.focus()
		theform.cf_email.old_className = theform.cf_email.className;
		theform.cf_email.className = 'input1_error';
		return false;
	} else { 
		theform.cf_email.className = 'input1';
	} 
	if(theform.cf_message.value=='') {
		alert('[Bericht] is een verplicht veld.');
		theform.cf_message.focus();
		theform.cf_message.old_className = theform.cf_message.className;
		theform.cf_message.className = 'input1_error';
		return false;
	} else { 
		theform.cf_message.className = 'input1';
	} 
	return true;
}
function formValidateRoute(theform) {
	if(theform.saddr.value=='') {
		alert('Geef een vertrekpunt op (plaats, adres en/of postcode)');
		theform.saddr.focus();
		theform.saddr.old_className = theform.saddr.className;
		theform.saddr.className = 'input1_error';
		return false;
	} else { 
		theform.saddr.className = 'input1';
	} 
	return true;
}
function createXMLHttpRequest()
{
	var xmlhttp=false;
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	// JScript gives us Conditional compilation, we can cope with old IE versions.
	// and security blocked creation of the objects.
	 try {
	  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	 } catch (e) {
	  try {
	   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	  } catch (E) {
	   xmlhttp = false;
	  }
	 }
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		try {
			xmlhttp = new XMLHttpRequest();
		} catch (e) {
			xmlhttp=false;
		}
	}
	if (!xmlhttp && window.createRequest) {
		try {
			xmlhttp = window.createRequest();
		} catch (e) {
			xmlhttp=false;
		}
	}
	
	return xmlhttp;
	
}

function DisableAmount(form) {
	if (form.d_amount2.checked)  {	
		form.d_amount_cust.disabled = false;
		form.d_amount_cust.focus();
		return false;
	} else {	
		form.d_amount_cust.value = '';
		form.d_amount_cust.disabled = true;
		return false;
	}
}
function formValidateDoneer(theform) {
	if(theform.d_voornaam.value=='') {
		alert('[Voornaam] is een verplicht veld.');
		theform.d_voornaam.focus();
		theform.d_voornaam.old_className = theform.d_voornaam.className;
		theform.d_voornaam.className = 'input1_error';
		return false;
	} else { 
		theform.d_voornaam.className = 'input1';
	} 
	Capitalize(theform.d_voornaam);
	if(theform.d_achternaam.value=='') {
		alert('[Achternaam] is een verplicht veld.');
		theform.d_achternaam.focus();
		theform.d_achternaam.old_className = theform.d_achternaam.className;
		theform.d_achternaam.className = 'input1_error';
		return false;
	} else { 
		theform.d_achternaam.className = 'input1';
	} 
	Capitalize(theform.d_achternaam);
	if(theform.d_adres.value=='') {
		alert('[Straat + huisnr.] is een verplicht veld.');
		theform.d_adres.focus();
		theform.d_adres.old_className = theform.d_adres.className;
		theform.d_adres.className = 'input1_error';
		return false;
	} else { 
		theform.d_adres.className = 'input1';
	} 
	Capitalize(theform.d_adres);
	if(theform.d_postcode.value=='') {
		alert('[Postcode] is een verplicht veld.');
		theform.d_postcode.focus();
		theform.d_postcode.old_className = theform.d_postcode.className;
		theform.d_postcode.className = 'input1_error';
		return false;
	} else { 
		theform.d_postcode.className = 'input1';
	} 
	if(theform.d_postcode.value!='' && ValidatePostcode(theform.d_postcode)==false)
	{
		alert('De ingevoerde postcode is niet geldig. U moet een geldige postcode invullen')
		theform.d_postcode.focus();
		return false;
	}		
	if(theform.d_plaats.value=='') {
		alert('[Plaats] is een verplicht veld.');
		theform.d_plaats.focus();
		theform.d_plaats.old_className = theform.d_plaats.className;
		theform.d_plaats.className = 'input1_error';
		return false;
	} else { 
		theform.d_plaats.className = 'input1';
	} 
	Capitalize(theform.d_plaats);
	if(theform.d_land.value=='') {
		alert('[Land] is een verplicht veld.');
		theform.d_land.focus();
		theform.d_land.old_className = theform.d_land.className;
		theform.d_land.className = 'input1_error';
		return false;
	} else { 
		theform.d_land.className = 'input1';
	} 
	Capitalize(theform.d_land);
	if(theform.d_email.value=='') {
		alert('[E-mail] is een verplicht veld.');
		theform.d_email.focus();
		theform.d_email.old_className = theform.d_email.className;
		theform.d_email.className = 'input1_error';
		return false;
	} else { 
		theform.d_email.className = 'input1';
	} 
	if(ValidateEmailOrNull(theform.d_email)==false)
	{
		alert('Het ingevoerde e-mailadres is niet geldig. Geef een geldig e-mailadres op.')
		theform.d_email.focus()
		theform.d_email.old_className = theform.d_email.className;
		theform.d_email.className = 'input1_error';
		return false;
	} else { 
		theform.d_email.className = 'input1';
	} 
	if(!document.getElementById('d_amount1').checked && !document.getElementById('d_amount2').checked) {
		alert('[Ja, ik machtig Stichting4Life om: *] is een verplicht veld.');
		return false;
	}
	if(document.getElementById('d_amount2').checked && theform.d_amount_cust.value=='') {
		alert('Geef aan hoeveel u wilt doneren.');
		theform.d_amount_cust.focus();
		return false;
	}
	if(theform.d_banknr.value=='') {
		alert('[Bankrekening: *] is een verplicht veld.');
		theform.d_banknr.focus();
		theform.d_banknr.old_className = theform.d_banknr.className;
		theform.d_banknr.className = 'input1_error';
		return false;
	} else { 
		theform.d_banknr.className = 'input1';
	} 
	if(theform.d_banknaam.value=='') {
		alert('[Ten name van: *] is een verplicht veld.');
		theform.d_banknaam.focus();
		theform.d_banknaam.old_className = theform.d_banknaam.className;
		theform.d_banknaam.className = 'input1_error';
		return false;
	} else { 
		theform.d_banknaam.className = 'input1';
	} 
	Capitalize(theform.d_banknaam);
	if(theform.d_bankplaats.value=='') {
		alert('[Plaats: *] is een verplicht veld.');
		theform.d_bankplaats.focus();
		theform.d_bankplaats.old_className = theform.d_bankplaats.className;
		theform.d_bankplaats.className = 'input1_error';
		return false;
	} else { 
		theform.d_bankplaats.className = 'input1';
	} 
	Capitalize(theform.d_bankplaats);
	return true;
}
function ValidatePostcode(theinput)
{
	var x=theinput.value.toUpperCase();
	var y=x.replace(' ','');
	var RegExp1= /^[1-9][0-9]{3}[a-zA-Z]{2}$/;
	if(y.match(RegExp1))
	{
	  theinput.value=reformat(y,"",4,"",2);
	  return true;
	}
	else
	return false;
}
function ValidatePostcode2(theinput)
{

	var x=theinput.value;
	var y=x.replace(' ','');
	var RegExp1= /^[1-9][0-9]{3}$/;
	if(y.match(RegExp1))
	{
	  return true;
	}
	else
	return false;
}
function ValidatePostcode3(theinput)
{
	var x=theinput.value.toUpperCase();
	var y=x.replace(' ','');
	var RegExp1= /^[A-Z]{2}$/;
	if(y.match(RegExp1))
	{
	  return true;
	}
	else
	return false;
}
function ValidatePostcode4(theinput)
{
	var x=theinput.toUpperCase();
	var y=x.replace(' ','');
	var RegExp1= /^[1-9][0-9]{3}[a-zA-Z]{2}$/;
	if(y.match(RegExp1))
	{
	  return true;
	}
	else
	return false;
}
function ValidateNumber(theinput)
{
	var _p=theinput.value;
	var RegExp1= /[^\d]/g;
	var RegExp2= /^[0-9]{1,}$/;
	var x=_p.replace(RegExp1,'');
	if(_p.match(RegExp2))
	{
	theinput.value=x;
	  return true;
	}
	else {
	theinput.value=x;
	return false;
	}
}
function ValidateNumber2(theinput)
{
	var _p=theinput;
	var RegExp1= /[^\d]/g;
	var RegExp2= /^[0-9]{1,}$/;
	var x=_p.replace(RegExp1,'');
	if(_p.match(RegExp2))
	{
	  return true;
	}
	else {
		return false;
	}
}
function Capitalize(theinput)
{
	var _p=theinput.value;
	var newValue = '';
	firstChar = _p.substring(0,1);
	remainChar = _p.substring(1);

	// convert case
	firstChar = firstChar.toUpperCase(); 
	remainChar = remainChar.toLowerCase();

	newValue = firstChar + remainChar;
	theinput.value=newValue;
	return true;
}
function LowerCase(theinput)
{
	var _p=theinput.value;
	var newValue = _p.toLowerCase();
	theinput.value=newValue;
	return true;
}
function UpperCase(theinput)
{
	var _p=theinput.value;
	var newValue = _p.toUpperCase();
	theinput.value=newValue;
	return true;
}
function formValidateInschrijven(theform) {
	if(!document.getElementById('soort1').checked && !document.getElementById('soort2').checked) {
		alert('[Inschrijving] is een verplicht veld.');
		return false;
	}
	if(document.getElementById('soort2').checked) {
		if(theform.i_bedrijfsnaam.value=='') {
			alert('[Bedrijfsnaam] is een verplicht veld.');
			theform.i_bedrijfsnaam.focus();
			theform.i_bedrijfsnaam.old_className = theform.i_bedrijfsnaam.className;
			theform.i_bedrijfsnaam.className = 'input1_error';
			return false;
		} else { 
			theform.i_bedrijfsnaam.className = 'input1';
		} 
	}
	if(theform.i_contactpersoon.value=='') {
		alert('[Contactpersoon] is een verplicht veld.');
		theform.i_contactpersoon.focus();
		theform.i_contactpersoon.old_className = theform.i_contactpersoon.className;
		theform.i_contactpersoon.className = 'input1_error';
		return false;
	} else { 
		theform.i_contactpersoon.className = 'input1';
	} 
	if(theform.i_contactemail.value=='') {
		alert('[E-mail] is een verplicht veld.');
		theform.i_contactemail.focus();
		theform.i_contactemail.old_className = theform.i_contactemail.className;
		theform.i_contactemail.className = 'input1_error';
		return false;
	} else { 
		theform.i_contactemail.className = 'input1';
	} 
	if(theform.i_pakket.value=='') {
		alert('[Pakketkeuze] is een verplicht veld. Maak een keuze.');
		theform.i_pakket.focus();
		theform.i_pakket.old_className = theform.i_pakket.className;
		theform.i_pakket.className = 'select2_error';
		return false;
	} else { 
		theform.i_pakket.className = 'select2';
	} 
	if(theform.i_name1.value=='') {
		alert('[Deelnemer - Naam] is een verplicht veld.');
		theform.i_name1.focus();
		theform.i_name1.old_className = theform.i_name1.className;
		theform.i_name1.className = 'input1_error';
		return false;
	} else { 
		theform.i_name1.className = 'input1';
	} 
	if(!document.getElementById('i_geslacht1a').checked && !document.getElementById('i_geslacht1b').checked) {
		alert('[Deelnemer - Geslacht] is een verplicht veld. Maak een keuze.');
		return false;
	}
	if(theform.i_email1.value=='') {
		alert('[Deelnemer - E-mailadres] is een verplicht veld.');
		theform.i_email1.focus();
		theform.i_email1.old_className = theform.i_email1.className;
		theform.i_email1.className = 'input1_error';
		return false;
	} else { 
		theform.i_email1.className = 'input1';
	} 
	if(ValidateEmailOrNull(theform.i_email1)==false)
	{
		alert('[Deelnemer - E-mailadres] is niet geldig. Geef een geldig e-mailadres op.')
		theform.i_email1.focus()
		theform.i_email1.old_className = theform.i_email1.className;
		theform.i_email1.className = 'input1_error';
		return false;
	} else { 
		theform.i_email1.className = 'input1';
	} 
	if(theform.i_mobiel1.value=='') {
		alert('[Deelnemer - Mobiel nummer] is een verplicht veld.');
		theform.i_mobiel1.focus();
		theform.i_mobiel1.old_className = theform.i_mobiel1.className;
		theform.i_mobiel1.className = 'input1_error';
		return false;
	} else { 
		theform.i_mobiel1.className = 'input1';
	} 
	if(theform.i_mobiel1.value!='' && ValidatePhone(theform.i_mobiel1)==false)
	{
		alert('[Deelnemer - Mobiel nummer] is niet geldig. Geef een 10-cijferig telefoonnummer op.')
		theform.i_mobiel1.focus();
		theform.i_mobiel1.old_className = theform.i_mobiel1.className;
		theform.i_mobiel1.className = 'input1_error';
		return false;
	} else { 
		theform.i_mobiel1.className = 'input1';
	} 
	if(theform.i_shirt1.value=='') {
		alert('[Deelnemer - Maat t-shirt] is een verplicht veld. Maak een keuze.');
		theform.i_shirt1.focus();
		theform.i_shirt1.old_className = theform.i_shirt1.className;
		theform.i_shirt1.className = 'select1_error';
		return false;
	} else { 
		theform.i_shirt1.className = 'select1';
	} 
	if($('#deelnemer2').css('display')=='block') {
		if(theform.i_name2.value=='') {
			alert('[Deelnemer 2 - Naam] is een verplicht veld.');
			theform.i_name2.focus();
			theform.i_name2.old_className = theform.i_name2.className;
			theform.i_name2.className = 'input1_error';
			return false;
		} else { 
			theform.i_name2.className = 'input1';
		} 
		if(!document.getElementById('i_geslacht2a').checked && !document.getElementById('i_geslacht2b').checked) {
			alert('[Deelnemer 2 - Geslacht] is een verplicht veld. Maak een keuze.');
			return false;
		}
		if(theform.i_email2.value=='') {
			alert('[Deelnemer 2 - E-mailadres] is een verplicht veld.');
			theform.i_email2.focus();
			theform.i_email2.old_className = theform.i_email2.className;
			theform.i_email2.className = 'input1_error';
			return false;
		} else { 
			theform.i_email2.className = 'input1';
		} 
		if(ValidateEmailOrNull(theform.i_email1)==false)
		{
			alert('[Deelnemer 2 - E-mailadres] is niet geldig. Geef een geldig e-mailadres op.')
			theform.i_email2.focus()
			theform.i_email2.old_className = theform.i_email2.className;
			theform.i_email2.className = 'input1_error';
			return false;
		} else { 
			theform.i_email2.className = 'input1';
		} 
		if(theform.i_mobiel2.value=='') {
			alert('[Deelnemer 2 - Mobiel nummer] is een verplicht veld.');
			theform.i_mobiel2.focus();
			theform.i_mobiel2.old_className = theform.i_mobiel2.className;
			theform.i_mobiel2.className = 'input1_error';
			return false;
		} else { 
			theform.i_mobiel2.className = 'input1';
		} 
		if(theform.i_mobiel2.value!='' && ValidatePhone(theform.i_mobiel2)==false)
		{
			alert('[Deelnemer 2 - Mobiel nummer] is niet geldig. Geef een 10-cijferig telefoonnummer op.')
			theform.i_mobiel2.focus();
			theform.i_mobiel2.old_className = theform.i_mobiel2.className;
			theform.i_mobiel2.className = 'input1_error';
			return false;
		} else { 
			theform.i_mobiel2.className = 'input1';
		} 
		if(theform.i_shirt2.value=='') {
			alert('[Deelnemer 2 - Maat t-shirt] is een verplicht veld. Maak een keuze.');
			theform.i_shirt2.focus();
			theform.i_shirt2.old_className = theform.i_shirt2.className;
			theform.i_shirt2.className = 'select1_error';
			return false;
		} else { 
			theform.i_shirt2.className = 'select1';
		} 
	}
	if($('#deelnemer3').css('display')=='block') {
		if(theform.i_name3.value=='') {
			alert('[Deelnemer 3 - Naam] is een verplicht veld.');
			theform.i_name3.focus();
			theform.i_name3.old_className = theform.i_name3.className;
			theform.i_name3.className = 'input1_error';
			return false;
		} else { 
			theform.i_name3.className = 'input1';
		} 
		if(!document.getElementById('i_geslacht3a').checked && !document.getElementById('i_geslacht3b').checked) {
			alert('[Deelnemer 3 - Geslacht] is een verplicht veld. Maak een keuze.');
			return false;
		}
		if(theform.i_email3.value=='') {
			alert('[Deelnemer 3 - E-mailadres] is een verplicht veld.');
			theform.i_email3.focus();
			theform.i_email3.old_className = theform.i_email3.className;
			theform.i_email3.className = 'input1_error';
			return false;
		} else { 
			theform.i_email3.className = 'input1';
		} 
		if(ValidateEmailOrNull(theform.i_email1)==false)
		{
			alert('[Deelnemer 3 - E-mailadres] is niet geldig. Geef een geldig e-mailadres op.')
			theform.i_email3.focus()
			theform.i_email3.old_className = theform.i_email3.className;
			theform.i_email3.className = 'input1_error';
			return false;
		} else { 
			theform.i_email3.className = 'input1';
		} 
		if(theform.i_mobiel3.value=='') {
			alert('[Deelnemer 3 - Mobiel nummer] is een verplicht veld.');
			theform.i_mobiel3.focus();
			theform.i_mobiel3.old_className = theform.i_mobiel3.className;
			theform.i_mobiel3.className = 'input1_error';
			return false;
		} else { 
			theform.i_mobiel3.className = 'input1';
		} 
		if(theform.i_mobiel3.value!='' && ValidatePhone(theform.i_mobiel3)==false)
		{
			alert('[Deelnemer 3 - Mobiel nummer] is niet geldig. Geef een 10-cijferig telefoonnummer op.')
			theform.i_mobiel3.focus();
			theform.i_mobiel3.old_className = theform.i_mobiel3.className;
			theform.i_mobiel3.className = 'input1_error';
			return false;
		} else { 
			theform.i_mobiel3.className = 'input1';
		} 
		if(theform.i_shirt3.value=='') {
			alert('[Deelnemer 3 - Maat t-shirt] is een verplicht veld. Maak een keuze.');
			theform.i_shirt3.focus();
			theform.i_shirt3.old_className = theform.i_shirt3.className;
			theform.i_shirt3.className = 'select1_error';
			return false;
		} else { 
			theform.i_shirt3.className = 'select1';
		} 
	}
	if($('#deelnemer4').css('display')=='block') {
		if(theform.i_name4.value=='') {
			alert('[Deelnemer 4 - Naam] is een verplicht veld.');
			theform.i_name4.focus();
			theform.i_name4.old_className = theform.i_name4.className;
			theform.i_name4.className = 'input1_error';
			return false;
		} else { 
			theform.i_name4.className = 'input1';
		} 
		if(!document.getElementById('i_geslacht4a').checked && !document.getElementById('i_geslacht4b').checked) {
			alert('[Deelnemer 4 - Geslacht] is een verplicht veld. Maak een keuze.');
			return false;
		}
		if(theform.i_email4.value=='') {
			alert('[Deelnemer 4 - E-mailadres] is een verplicht veld.');
			theform.i_email4.focus();
			theform.i_email4.old_className = theform.i_email4.className;
			theform.i_email4.className = 'input1_error';
			return false;
		} else { 
			theform.i_email4.className = 'input1';
		} 
		if(ValidateEmailOrNull(theform.i_email4)==false)
		{
			alert('[Deelnemer 4 - E-mailadres] is niet geldig. Geef een geldig e-mailadres op.')
			theform.i_email4.focus()
			theform.i_email4.old_className = theform.i_email4.className;
			theform.i_email4.className = 'input1_error';
			return false;
		} else { 
			theform.i_email4.className = 'input1';
		} 
		if(theform.i_mobiel4.value=='') {
			alert('[Deelnemer 4 - Mobiel nummer] is een verplicht veld.');
			theform.i_mobiel4.focus();
			theform.i_mobiel4.old_className = theform.i_mobiel4.className;
			theform.i_mobiel4.className = 'input1_error';
			return false;
		} else { 
			theform.i_mobiel4.className = 'input1';
		} 
		if(theform.i_mobiel4.value!='' && ValidatePhone(theform.i_mobiel4)==false)
		{
			alert('[Deelnemer 4 - Mobiel nummer] is niet geldig. Geef een 10-cijferig telefoonnummer op.')
			theform.i_mobiel4.focus();
			theform.i_mobiel4.old_className = theform.i_mobiel4.className;
			theform.i_mobiel4.className = 'input1_error';
			return false;
		} else { 
			theform.i_mobiel4.className = 'input1';
		} 
		if(theform.i_shirt4.value=='') {
			alert('[Deelnemer 4 - Maat t-shirt] is een verplicht veld. Maak een keuze.');
			theform.i_shirt4.focus();
			theform.i_shirt4.old_className = theform.i_shirt4.className;
			theform.i_shirt4.className = 'select1_error';
			return false;
		} else { 
			theform.i_shirt4.className = 'select1';
		} 
	}
	if($('#deelnemer5').css('display')=='block') {
		if(theform.i_name5.value=='') {
			alert('[Deelnemer 5 - Naam] is een verplicht veld.');
			theform.i_name5.focus();
			theform.i_name5.old_className = theform.i_name5.className;
			theform.i_name5.className = 'input1_error';
			return false;
		} else { 
			theform.i_name5.className = 'input1';
		} 
		if(!document.getElementById('i_geslacht5a').checked && !document.getElementById('i_geslacht5b').checked) {
			alert('[Deelnemer 5 - Geslacht] is een verplicht veld. Maak een keuze.');
			return false;
		}
		if(theform.i_email5.value=='') {
			alert('[Deelnemer 5 - E-mailadres] is een verplicht veld.');
			theform.i_email5.focus();
			theform.i_email5.old_className = theform.i_email5.className;
			theform.i_email5.className = 'input1_error';
			return false;
		} else { 
			theform.i_email5.className = 'input1';
		} 
		if(ValidateEmailOrNull(theform.i_email5)==false)
		{
			alert('[Deelnemer 5 - E-mailadres] is niet geldig. Geef een geldig e-mailadres op.')
			theform.i_email5.focus()
			theform.i_email5.old_className = theform.i_email5.className;
			theform.i_email5.className = 'input1_error';
			return false;
		} else { 
			theform.i_email5.className = 'input1';
		} 
		if(theform.i_mobiel5.value=='') {
			alert('[Deelnemer 5 - Mobiel nummer] is een verplicht veld.');
			theform.i_mobiel5.focus();
			theform.i_mobiel5.old_className = theform.i_mobiel5.className;
			theform.i_mobiel5.className = 'input1_error';
			return false;
		} else { 
			theform.i_mobiel5.className = 'input1';
		} 
		if(theform.i_mobiel5.value!='' && ValidatePhone(theform.i_mobiel5)==false)
		{
			alert('[Deelnemer 5 - Mobiel nummer] is niet geldig. Geef een 10-cijferig telefoonnummer op.')
			theform.i_mobiel5.focus();
			theform.i_mobiel5.old_className = theform.i_mobiel5.className;
			theform.i_mobiel5.className = 'input1_error';
			return false;
		} else { 
			theform.i_mobiel5.className = 'input1';
		} 
		if(theform.i_shirt5.value=='') {
			alert('[Deelnemer 5 - Maat t-shirt] is een verplicht veld. Maak een keuze.');
			theform.i_shirt5.focus();
			theform.i_shirt5.old_className = theform.i_shirt5.className;
			theform.i_shirt5.className = 'select1_error';
			return false;
		} else { 
			theform.i_shirt5.className = 'select1';
		} 
	}
	if(theform.i_banknummer.value=='') {
		alert('[Bankrekening] is een verplicht veld.');
		theform.i_banknummer.focus();
		theform.i_banknummer.old_className = theform.i_banknummer.className;
		theform.i_banknummer.className = 'input1_error';
		return false;
	} else { 
		theform.i_banknummer.className = 'input1';
	} 
	if(theform.i_banknaam.value=='') {
		alert('[Ten name van] is een verplicht veld.');
		theform.i_banknaam.focus();
		theform.i_banknaam.old_className = theform.i_banknaam.className;
		theform.i_banknaam.className = 'input1_error';
		return false;
	} else { 
		theform.i_banknaam.className = 'input1';
	} 
	if(theform.i_bankplaats.value=='') {
		alert('[Plaats] is een verplicht veld.');
		theform.i_bankplaats.focus();
		theform.i_bankplaats.old_className = theform.i_bankplaats.className;
		theform.i_bankplaats.className = 'input1_error';
		return false;
	} else { 
		theform.i_bankplaats.className = 'input1';
	} 

	return true;
}








