
function showToolTip(left, top, src)
{
	if (document.all){
		popupToolTip 			= document.all('toolTip');
		popupToolTip.style.left = left;   
	} else {
		popupToolTip 			= document.getElementById('toolTip');
		popupToolTip.style.left = left+10; 
	}

	popupToolTip.style.top   	= top;
	popupToolTip.src 			= src;
	popupToolTip.style.display	= '';

	return;
}
/*
	This function prevents a user from double clicking a button
	form = formname
*/
function preventDoubleClick(form)
{
	if (form.submit.value != "Even geduld aub...")
	{
		form.submit.value = "Even geduld aub...";
		return true;
	}
	else
	{
		return false;
	}
}	

/*
	This function counts the number of characters that are left in the concerning textbox
	veld 	= the field in which the text is typed
	telveld = the field that shows how many characters are left
	maximum = the maximum number of characters to be typed in the field in which the text is typed
*/
function tekstteller(veld,telveld,maximum) 
{
	if (veld.value.length > maximum) 
		veld.value 		= veld.value.substring(0, maximum);
	else
		telveld.value 	= maximum - veld.value.length;
}

/*
	This function makes a info box appear for a specific input field 
	naam 		= name of the input field
	tekst 		= info about the input field
	voorbeeld 	= an example of the info that can be put inside the input field
*/
function schrijfHelptekst(naam, tekst, voorbeeld)
{
	document.getElementById('helptekst').innerHTML = tekst;
	if(typeof(voorbeeld) != "undefined"){
		document.getElementById('voorbeeldtekst').innerHTML = voorbeeld;
		document.getElementById('voorbeeldt').style.display = '';
}else{
		document.getElementById('voorbeeldtekst').innerHTML = '';
		document.getElementById('voorbeeldt').style.display = 'none';
	}
}

/*
	This function makes a pop up appear by which a specific action can be confirmed or canceled
	bericht = A message about the confirmation
	url 	= A url that appears after confirming the action
*/
function bevestig_popup(bericht, url)
{ 
    var bevestigd = confirm(bericht);
    if (bevestigd)
       window.location.href = url;
}