// JScript Validation SourceCode
	function ValidateForm(Counter){

			form_ok = true;
				
			for (f=0;f <= Counter && form_ok;f++){

				form_element = eval("document.theform." + check_array[f].name);
				
				if (check_array[f].type == "text"){
					if (form_element.value == ""){
						form_ok = false;
						alert("You must enter a value for " + check_array[f].message + " before you can submit the form");
						form_element.focus()
					}
				}
				if (check_array[f].type == "select"){
					if (form_element.options[form_element.selectedIndex].value == ""){
						form_ok = false;
						alert("You must select a value for " + check_array[f].message + " before you can submit the form");
						form_element.focus()
					}
				}
				if (check_array[f].type == "multiple"){
					option_selected = false;
					for (g=0;g<form_element.options.length;g++){
						if (form_element.options[g].selected){
							option_selected = true;
						}
					}
					if (option_selected==false){
						form_ok = false;
						alert("You must select a value for " + check_array[f].message + " before you can submit the form");
						form_element.focus()
					}
				}	
				if (check_array[f].type == "email"){
						form_ok = isEmail(form_element.value) 
						if (form_ok == false){
							alert("You must enter a valid " + check_array[f].message + " before you can submit the form");
							form_element.focus()
						}
				}
				
				if (check_array[f].type == "tel"){
					form_ok = isTelephone(form_element.value);
					if (form_ok == false){
						alert("You must enter a valid " + check_array[f].message + " before you can submit the form \n\n Can only contain characters [0-9] and [+()].");
						form_element.focus()
					}
				}
				if (check_array[f].type == "fax"){
					form_ok = isFax(form_element.value);
					if (form_ok == false){
						alert("You must enter a valid " + check_array[f].message + " before you can submit the form \n\n Can only contain characters [0-9] and [+()].");
						form_element.focus()
					}
				}				
			}
		return form_ok;
	}

