/* AUTHOR: inrasoi@yahoo.com */
/* Generated by AceHTML Freeware http://freeware.acehtml.com */
/* Creation date: 6/18/2004 */


function validateAndSubmit(theform) 
{
if (theform.username.value == "" ) 
   {
          alert("Please enter your username.");
		   theform.username.focus();
        return false;
    }
	else
	{
	 theform.username.value=replace(theform.username.value);
	}
	
	if (theform.password.value == "" ) 
   {
          alert("Please enter your password.");
		   theform.password.focus();
        return false;
    }
	else
	{
	 theform.password.value=replace(theform.password.value);
	}



	if (theform.firstname.value == "" ) 
   {
          alert("Please enter your first name.");
		   theform.firstname.focus();
        return false;
    }
	else
	{
	 theform.firstname.value=replace(theform.firstname.value);
	}
		if (theform.lastname.value == "" ) 
   {
          alert("Please enter your last name.");
		   theform.lastname.focus();
        return false;
    }
		else
	{
	 theform.lastname.value=replace(theform.lastname.value);
	}
		if (theform.address.value == "") 
   {
          alert("Please enter street address");
		   theform.address.focus();
        return false;
    }
		    else
	{
	 theform.address.value=replace(theform.address.value);
	}
	if (theform.city.value == "") 
   {
          alert("Please enter city.");
		   theform.city.focus();
        return false;
    }
	else
	{
	 theform.city.value=replace(theform.city.value);
	}
	if (theform.state.value == "") 
   {
          alert("Please enter state.");
		   theform.state.focus();
        return false;
    }
		else
	{
	 theform.state.value=replace(theform.state.value);
	}
	if (theform.country.value == "") 
   {
          alert("Please enter about country.");
		   theform.country.focus();
        return false;
    }
	if (theform.homephone.value == "") 
   {
          alert("Please enter homephone.");
		   theform.homephone.focus();
        return false;
    }
			else
	{
	 theform.homephone.value=replace(theform.homephone.value);
	}
	if (theform.howheard.value == "" ) 
   {
          alert("Please enter how heard.");
		   theform.howheard.focus();
        return false;
    }
		else
	{
	 theform.howheard.value=replace(theform.howheard.value);
	}
	if (theform.email.value == "") 
   {
          alert("Please enter email.");
		   theform.email.focus();
        return false;
    }
				else
	{
	 theform.email.value=replace(theform.email.value);
	}
	
	return true;
	
	
}
function replace(field)
{
var newstring= field;
newstring=newstring.replace("\'"," ");
newstring=newstring.replace("\""," ");
field=newstring;
return field;
}
