function validate_form(the_form){
	
//var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
//var address = document.forms[form1].elements[email].value;
	
	if(the_form.contact_person.value==''){
		alert('Please enter name of the contact person');
		the_form.contact_person.focus();
		return(false);
	}
	
	/*if (the_form.email.value == '' ){
		alert("Please Enter Email Address");
		the_form.email.focus();
		return (false);
	}*/
   
   var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	if (reg.test(the_form.email.value) == false || the_form.email.value == '' ){
		alert("Please enter a valid Email Address");
		the_form.email.focus();
		return (false);
	}
	
	if (the_form.email_confirm.value == ''){
		alert("Please Confirm Your Email Address");
		the_form.email_confirm.focus();
		return (false);
	}
	if(the_form.email.value != the_form.email_confirm.value){
		alert('Your email address and the confirmation email address does not match');
		the_form.email_confirm.focus();
		return(false);
	}
	
	if(the_form.password_1.value==''){
		alert("Please Enter Password");
		the_form.password_1.focus();
		return(false);
	}
	if(the_form.password_1.value!=the_form.password_2.value){
		alert('Please Confirm your password');
		the_form.password_2.focus();
		return(false);
	}
	if(the_form.category_id.value==''){
		alert('Please select a category');
		the_form.category_id.focus();
		return(false);
	}
	if(the_form.name.value==''){
		alert('Please enter your business name');
		the_form.name.focus();
		return(false);
	}
	if(the_form.url_1.value==''){
		alert('Please enter URL of your business website');
		the_form.url_1.focus();
		return(false);
	}
	if(the_form.description.value==''){
		alert('Please enter a small description about your organization.');
		the_form.description.focus();
		return(false);
	}
	if(the_form.address_1.value==''){
		alert('Please enter business address');
		the_form.address_1.focus();
		return(false);
	}
	if(the_form.city.value==''){
		alert('Please enter business city');
		the_form.city.focus();
		return(false);
	}
	if(the_form.county_id.value==''){
		alert('Please Select your county');
		the_form.county_id.focus();
		return(false);
	}
	
	if(the_form.phone_1.value==''){
		alert('Please enter business phone number');
		the_form.phone_1.focus();
		return(false);
	}

	return(true);
	
	

}
