// 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		//    ---> english    //var fieldRequired = Array("company", "name", "firstname", "street", "place", "zipcode", "country", "tel", "fax", "email", "txt", "chk1", "chk2");	//var fieldRequired = Array("Firma", "Name", "Vorname", "Straße", "Ort", "PLZ", "Land", "Telefon", "Fax", "Email", "Nachricht", "chk1");	var fieldRequired = Array("Name", "Vorname", "Telefon", "Email");	// field description to appear in the dialog box	//    ---> english    //var fieldDescription = Array("company", "name", "firstname", "street", "place", "zipcode", "country", "tel", "fax", "email", "txt", "chk1");	//var fieldDescription = Array("Firma", "Name", "Vorname", "Straße", "Ort", "PLZ", "Land", "Telefon", "Fax", "Email", "Nachricht", "chk1");	var fieldDescription = Array("Name", "Vorname", "Telefon", "Email");	// dialog message	//var alertMsg = "Please complete the following fields:\n";    ---> english	var alertMsg = "Bitte füllen Sie folgende Felder aus:\n\n";	var l_Msg = alertMsg.length;		for (var i = 0; i < fieldRequired.length; i++){		var obj = formobj.elements[fieldRequired[i]];		if (obj){			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":				if (obj.value == "" || obj.value == null){					alertMsg += " - " + fieldDescription[i] + "\n";				}				break;			default:			}			if (obj.type == undefined){				var blnchecked = false;				for (var j = 0; j < obj.length; j++){					if (obj[j].checked){						blnchecked = true;					}				}				if (!blnchecked){					alertMsg += " - " + fieldDescription[i] + "\n";				}			}		}	}	if (alertMsg.length == l_Msg){		return true;	}else{		alert(alertMsg);		return false;	}}
