/* email ellenorzo */


<!--

	Browser = navigator.appName;
	Verze = parseInt(navigator.appVersion);
	if ((Browser == "Netscape" && Verze >=3) || (Browser == "Microsoft Internet Explorer" &&
	Verze >= 3)) ScriptsOn = 1;
		else ScriptsOn = 0;

	
	function VarInit() {
		foundError = "";      	
		errText = "";    
		focusF = "contactname";	
	}

	function submit_page(form) {
		foundError = false;
		focusF = "";
		errText = "";
		
		if(isFieldBlank(form.contactname)) {
			errText = errText+"Név";
			foundError = true;
			focusF = "contactname";
		}

		if(isFieldBlank(form.contactphone)) {
			if(errText == "") {
				errText = " Telefon ";
			}
			else {
				errText = errText+", Telefon"
			 }
			foundError = true;
			if (focusF == "") {
			focusF = "contactphone";
			}
		}
		
		if(isFieldBlank(form.contactemail)) {
			if(errText == "") {
				errText = " E-mail ";
			}
			else {
				errText = errText+", E-mail"
			 }
			foundError = true;
			if (focusF == "") {
			focusF = "contactemail";
			}
		}

        	if(foundError == true) {
			alert ('A következő mezőt(ket) kérjük kitölteni : '+errText);
		}

		if(isFieldBlank(form.contactemail) == false) {
			if(isValidEmail(form.contactemail) == false) {
				alert("Hibás E-mail cím !");
				foundError = true;
				if (focusF == "") {
					focusF="contactemail";
				}
			}
		}
	 
		Field_focus(focusF);
}	

	function isFieldBlank(theField)  {
		if(theField.value == "")
			return true;
		else
			return false;
	}

	function isValidEmail(theField) {
		if(theField.value.indexOf('@', 0) == -1)
			return false;
		else
			return true;
	}

	function SendForm() {
		if (foundError == false) 
			return true;
		else
			return false;
	}

	function Field_focus(focusF) {
		if (ScriptsOn) {
			if(focusF == "contactname") {
				document.forms[0].contactname.focus();
			}
			if(focusF == "contactphone") {
				document.forms[0].contactphone.focus();
			}
			if(focusF == "contactemail") {
				document.forms[0].contactemail.focus();
			}
		} 		
	}
	
//-->