// JavaScript Document
function validateregister(frm)
	{	
		var message="";
		blnflag=true;
		message += validate_me(frm.username,"The Username Field Cannot Be Empty","");
		message += validate_me(frm.password,"The Password Field Cannot Be Empty","");	
		message += validate_me(frm.password,"The Password is greater then 6 chars","checklength",'6');		
		message += validate_me(frm.repassword,"The Confirm Password Field Cannot Be Empty","");
		message += validate_me(frm.firstname,"The FirstName Field Cannot Be Empty","");		
		message += validate_me(frm.lastname,"The LastName Field Cannot Be Empty","");
		message += validate_me(frm.email,"The Email Field Cannot Be Empty","");		
		message += validate_me(frm.email,"Please Enter a valid email address.","email");
		message += validate_me(frm.re_email,"The Re- Enter Email Field Cannot Be Empty","");
		message += validate_me(frm.re_email,"Please Enter a valid email address in Re- Enter Email Field.","email");
		message += validate_me(frm.city,"The City Field Cannot Be Empty","");
		message += validate_me(frm.phone,"Please Select Home Phone Field ","");
	//	phone 
	//message += validate_me(frm.state,"Please Select State Field ","");
		
		message += validate_me(frm.zipcode,"The Postal Code Field Cannot Be Empty","");
	
		
		message += validate_me(frm.county,"Please County Field can not be empty","");

		if(message!="")
		{
				message="The following field(s) were incomplete or incorrect:\n\n"+message;
				message+="\nPlease complete or correct the form and submit again.\n";
				alert(message);
				return false
		}	
	if(trim(frm.re_email.value) != trim(frm.email.value))
		{
		message += "Your both email addresses do not match. Please make sure you have entered them correctly";
		alert(message);
		return false;
		}
		if(trim(frm.repassword.value) != trim(frm.password.value))
		{
		message += "Your both password addresses do not match. Please make sure you have entered them correctly";
		alert(message);
		return false;
		}
		
	}
