/*
 * Fäth GmbH V2.0
 * script: globals
 * language: independend
*/

function cn(o,n) { o.className=n; }

function checkContactForm() {
	var phone = document.getElementById("input_phone").value;
	var email = document.getElementById("input_email").value;
	var subject = document.getElementById("input_subject").value;
	var inquiry = document.getElementById("input_inquiry").value;
	
	if ( phone.length < 1 && email.length < 1 ) {
		alert( CONTACTFORM_ERROR_MESSAGE_NOCONTACT );
		return(false);
	} // end.no contact
	
	if ( subject.length < 1 ) {
		alert( CONTACTFORM_ERROR_NO_SUBJECT );
		return(false);
	} // end.no subject

	if ( inquiry.length < 1 ) {
		alert( CONTACTFORM_ERROR_NO_INQUIRY );
		return(false);
	} // end.no inquiry

	if ( confirm(CONTACTFORM_CONFIRM) ) {
		return(true);
	} // end.confirmed submir
	return(false);
} // end.check contact form


