function changeChildren(value)
{	
	browser = navigator.appName;
	for(i=1;i<=5;i++)
	{
		this.boundry = document.getElementById('kind'+i);
		this.inputs = this.boundry.getElementsByTagName('input');
		this.selects = this.boundry.getElementsByTagName('select');
		
		for (j = 0; j < this.selects.length; j++) {
			this.selects[j].disabled = true;
		}		
		for (j = 0; j < this.inputs.length; j++) {
			this.inputs[j].disabled = true;		
		}		
		this.boundry.style.display = 'none';
		
	}
	for(i=1;i<=value;i++)
	{
		this.boundry = document.getElementById('kind'+i);
		this.inputs = this.boundry.getElementsByTagName('input');
		this.selects = this.boundry.getElementsByTagName('select');
		
		for (j = 0; j < this.selects.length; j++) {
			this.selects[j].disabled = false;
		}		
		for (j = 0; j < this.inputs.length; j++) {
			this.inputs[j].disabled = false;
		}
		if(browser=="Netscape") {
			document.getElementById('kind' + i).style.display = 'table-row';
		} 
		else {
			alert('test');
			document.getElementById('kind' + i).style.display = 'block';
		}
	}
}

function submitter()
{
	this.form = document.getElementById('form');
	this.inputs = this.form.getElementsByTagName('input');
	this.selects = this.form.getElementsByTagName('select');
	this.error = '';

	for (i = 0; i < this.selects.length; i++) 
	{	
	    this.selects[i].style.background = '#ffffff';
		if(this.selects[i].disabled==false)
		{
			if(this.selects[i].value=='')
		    {
		      this.selects[i].style.background = '#ec732c';
		      this.error+= this.selects[i].name;
		    }
		}	    		
	}
	
	for(i=0;i<this.inputs.length;i++)
	{
		if(this.inputs[i].name!="tussenvoegsel")
		{
			if(this.inputs[i].name=='email')
			{
				this.inputs[i].style.background = '#ffffff';
				if (this.inputs[i].disabled == false) {
					if (this.inputs[i].value.indexOf('@') < 0 || this.inputs[i].value.indexOf('.') < 0 || this.inputs[i].value.length <= 7) {
						this.inputs[i].style.background = '#ec732c';
						this.error += this.inputs[i].name;
					}
					
				}		   
			}
			else if(this.inputs[i].type=='text')
			{
			    this.inputs[i].style.background = '#ffffff';
				if (this.inputs[i].disabled == false) {
					if (this.inputs[i].value == '') {
						this.inputs[i].style.background = '#ec732c';
						this.error += this.inputs[i].name;
					}
				}
			}
		}		
	}  
	
	if(this.error=='')
	{
		this.form.submit();
	}
	else
	{
		alert('U heeft niet alle benodigde velden juist ingevuld.\r\nVul de gekleurde velden alsnog goed in.');
	}
}

