
<!--
// Copyright information must stay intact
// FormCheck v1.10
// Copyright NavSurf.com 2002, all rights reserved
// Creative Solutions for JavaScript navigation menus, scrollers and web widgets
// Affordable Services in JavaScript consulting, customization and trouble-shooting
// Visit NavSurf.com at http://navsurf.com

function formCheck(formobj){
	// name of mandatory fields
	var fieldRequired = Array("strNickName", "strLastName", "strName", "strStreet", "strStreetNumber", "strPostcode", "strPlace", "strPhoneWork", "strPhoneHome",  "strFunction", "strEmail",  "strComments", "strSearchTerm", "strPassword", "strOldPassword", "strPassword1", "strPassword2", "strType", "strMark", "strTitle", "strPrice", "FCKeditor1", "strContent", "strException", "userfile" , "strSendCost", "strOk", "strTitel", "strPrice1", "strPrice2", "limit" );
	// field description to appear in the dialog box
	var fieldDescription = Array("Nickname", "Achternaam", "Voorletters", "Straatnaam", "Straatnummer" , "Postcode", "Plaats", "Telefoon werk", "Telefoon thuis", "Functie", "Email", "Opmerking", "Zoekterm", "Wachtwoord", "Oud wachtwoord", "Nieuw wachtwoord", "Herhaal nieuw wachtwoord", "Type nummer", "Merk", "Titel", "Prijs", "Inhoud", "Omschrijving", "Bijzonderheden", "Plaatje", "Betalingswijze", "Acceptatie algemene voorwaarden", "Naam", "Aantal euro's", "Aantal eurocenten", "Minimale bedrag van 5,00 € nog niet bereikt" );
	// dialog message
	var alertMsg = "Vul de volgende veld(en) in:\n";
	
	var l_Msg = alertMsg.length;
	
	for (var i = 0; i < fieldRequired.length; i++){
		var obj = formobj.elements[fieldRequired[i]];
		if (obj){
			if (obj.type == null){
				var blnchecked = false;
				for (var j = 0; j < obj.length; j++){
					if (obj[j].checked){
						blnchecked = true;
					}
				}
				if (!blnchecked){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				continue;
			}

			switch(obj.type){
			case "select-one":
				if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "select-multiple":
				if (obj.selectedIndex == -1){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "text":
					case "textarea":
			case "file":
			case "checkbox":
			case "FCKeditor1":
			case "hidden":
			case "password":
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				

				
				
				break;
			default:
			}
		}
	}

	if (alertMsg.length == l_Msg){
		return true;
	}else{
		alert(alertMsg);
		return false;
	}
	
	

	
	
}



