// <?php !! This fools phpdocumentor into parsing this file
/**
*	@author Denis Abramov
*   @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
*
* 	@example <script src="<?= $template; ?>/useful.js"></script> 
* 	@example <textarea onclick="showObj(linkUp,this)" style="width: 400px;height: 400px"></textarea>
*/

function checkContactForm() {
	var name = document.getElementById('name');
	var telephone = document.getElementById('telephone');
	var email = document.getElementById('email');
	var description = document.getElementById('description');
	
	if( name.value == '' ) {
		alert('אנא מלא שם.');
		name.focus();
		return false;
	}
	
	if( telephone.value == '' ) {
		alert('אנא מלא טלפון.');
		telephone.focus();
		return false;
	}
	
	if( validateEmail(email) == false ) {
		return false;
	}
	
	if( description.value == '' ) {
		alert('אנא מלא תאור.');
		description.focus();
		return false;
	}
	
	return true;
}
