
function valTextBox( curfield, fieldLabel ) { 
	var msg = "";
    fieldName   = document.forms[0][curfield]; 
    fieldValue  = fieldName.value; 
    fieldLength = fieldValue.length; 
		 
    if( fieldValue == "" ) { 
        msg = fieldLabel +  "\n"; 
    } 
    return msg;
}
	

function valNumericBox( curfield, fieldLabel ) {
	var msg = "";
	var strValidChars = "0123456789";
	var strChar;
	var blnResult = true;

	fieldName   = document.forms[0][curfield]; 
    fieldValue  = fieldName.value; 
    fieldLength = fieldValue.length; 
		 
    if( fieldValue == "" ) { 
        msg = fieldLabel +  "\n"; 
    } 
  
	else {
		for (i = 0; i < fieldLength && blnResult == true; i++)
		{
		strChar = fieldValue.charAt(i);
		if (strValidChars.indexOf(strChar) == -1)
			{
			msg = fieldLabel +  " - geen numerieke waarde\n";
			blnResult = false;
			}
		}
	}

	return msg;
}

function valSelectBox( fieldName, fieldLabel ) { 
	var msg = "";
    selected   = document.forms[0][fieldName].selectedIndex; 
    fieldValue = document.forms[0][fieldName].options[selected].value; 
		 
    if( fieldValue == "" ) { 
        msg = fieldLabel +  "\n"; 
    } 
    return msg;
} 

function valCheckBox( fieldName, fieldLabel ) { 
	var msg = "";
    selection  = null; 
    thisButton = document.forms[0][fieldName]; 
    for( var i=0; i<thisButton.length; i++ ) { 
        if( thisButton[i].checked ) { 
           selection = thisButton[i].value; 
        } 
    } 
    if( selection == null ) { 
       msg = fieldLabel +  "\n"; 
    } 
    return msg;
} 

function valRadioBox( fieldName, fieldLabel ) { 
	var msg = "";
    selection  = null; 
    thisButton = document.forms[0][fieldName]; 
    for( var i=0; i<thisButton.length; i++ ) { 
        if( thisButton[i].checked ) { 
           selection = thisButton[i].value; 
        } 
    } 
    if( selection == null ) { 
        msg = fieldLabel +  "\n"; 
    } 
    return msg;
}

    

