<!-- begin

function gBookValidation(){

	var frm = document.frmGBook;
    
	with (frm){
		
		//fullname validation
		if (fullname.value==""){
			alert("Please insert your name");
			fullname.select();
	    		fullname.focus();
			return false;
	    	}
	    	
		//gender validation
		if (!(gender[0].checked) && !(gender[1].checked)){
			alert("Please choose your gender");
			gender[0].select();
			gender[0].focus();
			return false;
		}
	    	
		//e-mail validation
		if (email.value != ""){
		        text = email.value;
		        addrs = text.indexOf('@');
		        dot = text.indexOf('.');
		        validmail = 1;
		        if (addrs==-1 || addrs==-1 || text.indexOf(' ')!=-1)
		        	validmail=0;                                 //"gamer yahoo com"
		       	if (dot==text.length-1)
		          	validmail=0;                                 //"gamer@yahoo."
		       	if (addrs==0)
		          	validmail=0;                                 //"@yahoo.com"
		       	if (addrs==dot-1)
		          	validmail=0;                                 //"gamer@.com"
		       	if (addrs>dot)
		          	validmail=0;                                 //"gamer.com@yahoo"
		       	if (validmail==0){
		  		alert("Invalid e-mail address ('name@domain.type')");
		       	     	email.select();
		       	     	email.focus();
		             	return false;
		       }
    		}
	    	
		//city validation
		if (city.value==""){
			alert("Please insert city");
	    		city.select();
	    		city.focus();
			return false;
	    	}
	    	
	    	//zipcode validation
		if (zipcode.value != ""){
			if (isNaN(zipcode.value) || zipcode.value == " "){
				alert("Zip Code must be filled with numbers");
				zipcode.select();
				zipcode.focus();
				return false;
			}
		}
		
		//country validation
		if (country.value==""){
			alert("Please insert country");
			country.select();
	    	country.focus();
			return false;
	    	}
	    	
		//comments validation
	    	if (comments.value==""){
			alert("Comments must not empty");
			comments.select();
			comments.focus();
			return false;
	    	} else {
			len = comments.value.length;
			if (len>90){
				alert("Comments only 90 characters maximum");
				comments.select();
				comments.focus();
				return false;
			}
	    	}
	    	
  			if (recaptcha_response_field.value==""){
    		alert("Please type in the words shown in the reCaptcha box.");
    		recaptcha_response_field.select();
    		recaptcha_response_field.focus();
    		return false;
  			}	
	    	
	}
	
	return true;
	
}


function isValidDate(object_value)
{
	any_pattern =/(?:0[1-9]|1[0-2])\/(?:0[1-9]|[12][0-9]|3[01])\/(?:19|20\d{2})/; //('^([1-9]|0[1-9]|1[012])[- /.]([1-9]|0[1-9]|[12][0-9]|3[01])[- /.]([1-2][0-9])\d\d$')
	return any_pattern.test(object_value);
}


//--> end