function display(id)
{

	status = document.getElementById(id).style.display;

	if (status == "none")
	{
		document.getElementById(id).style.display = "block";
	}
	else
		document.getElementById(id).style.display = "none";

}

function display2(id,type)
{
	//alert(id);
	if( type == 'show' )
		type = 'block';
	else
		type = 'none';

	document.getElementById(id).style.display = type;
}

function confirmAction(description)
{
	return confirm(description);
}

var nrGroupParticipants = 0;

function addGroupParticipant(div)
{
	nrGroupParticipants++;

	var elementName = 'groupParticipant_'+nrGroupParticipants;
	var par = document.getElementById( div );

	var box = document.createElement('div');
	box.setAttribute('id','box'+elementName);
	par.appendChild(box);

	par = box;

	var t = document.createElement('h3');
	t.appendChild( document.createTextNode('Deelnemer nr.'+nrGroupParticipants) );
	par.appendChild(t);
	par.appendChild(document.createElement('br'));

	// Naam
	var n = document.createElement('label');
	n.setAttribute( 'for', elementName+'_name');
	n.appendChild( document.createTextNode( 'Naam : *') );
	par.appendChild(n);
	par.appendChild(document.createElement('br'));

	n = document.createElement('input');
	n.setAttribute( 'type',  'text');
	n.setAttribute( 'name',  elementName+'_name' );
	n.setAttribute( 'id',    elementName+'_name' );
	n.setAttribute( 'value', '' );
	par.appendChild(n);
	par.appendChild(document.createElement('br'));

	// Voornaam
	var n = document.createElement('label');
	n.setAttribute( 'for', elementName+'_surname');
	n.appendChild( document.createTextNode( 'Voornaam : *') );
	par.appendChild(n);
	par.appendChild(document.createElement('br'));

	n = document.createElement('input');
	n.setAttribute( 'type',  'text');
	n.setAttribute( 'name',  elementName+'_surname' );
	n.setAttribute( 'id',    elementName+'_surname' );
	n.setAttribute( 'value', '' );
	par.appendChild(n);
	par.appendChild(document.createElement('br'));

	// Geboortedatum
	var n = document.createElement('label');
	n.setAttribute( 'for', elementName+'_birthdate');
	n.appendChild( document.createTextNode( 'Geboortedatum ( dd / mm / jjjj ) : ') );
	par.appendChild(n);
	par.appendChild(document.createElement('br'));

	n = document.createElement('input');
	n.setAttribute( 'type',  'text');
	n.setAttribute( 'name',  elementName+'_birthdate' );
	n.setAttribute( 'id',    elementName+'_birthdate' );
	n.setAttribute( 'value', '' );
	par.appendChild(n);
	par.appendChild(document.createElement('br'));

	// Deelname
	var n = document.createElement('label');
	n.setAttribute( 'for', elementName+'_type');
	n.appendChild( document.createTextNode( 'Deelname : ') );
	par.appendChild(n);
	par.appendChild(document.createElement('br'));

	n = document.createElement('select');
	n.setAttribute( 'name',  elementName+'_type' );
	n.setAttribute( 'id',    elementName+'_type' );
	
	var p = document.createElement('option');
	p.setAttribute( 'value', 'Deelnemer' );
	p.appendChild( document.createTextNode('Deelnemer') );
	n.appendChild(p);
	p = document.createElement('option');
	p.setAttribute( 'value', 'Begeleider' );
	p.appendChild( document.createTextNode('Begeleider') );
	n.appendChild(p);

	par.appendChild(n);
	par.appendChild(document.createElement('br'));

	document.getElementById('groupParticipantCount').value = nrGroupParticipants;

	document.getElementById('box'+elementName).className = 'box';

	return false;
}
