
function validate(){
 
	var regex = new RegExp(/\S{1,}/);
 
	var f=document.contact;
	var c=0;
	var m='Sorry, could not proceed due to the errors listed below. Please correct all errors before proceeding.\n\n';
 
	if(f.query_type.value == 0){
		m+='    - A query type has not been selected.\n';
		c++;
	}

	if(f.realname.value.search(regex) == -1){
		m+='    - Full name is not valid.\n';
		c++;
	}

	if(f.email.value.search(regex) == -1){
		m+='    - Email is not valid.\n';
		c++;
	}

	if(f.query_details.value.search(regex) == -1){
		m+='    - Query details is not valid.\n';
		c++;
	}


	if (c > 0){
		m+='\n';
		alert(m);
		return false;
	}
	else {
		return true;
	}
}

