
function valid_submit(itntiform)
{
	var myerror = "";

	var countryval = itntiform.country.options[itntiform.country.selectedIndex].value;
	var cityval = itntiform.city.options[itntiform.city.selectedIndex].value;

	if (countryval == "0")
	{
		myerror += "You must select Country\n";
	}

	if (cityval == "0")
	{
		myerror += "You must select City\n";
	}

	if (itntiform.username.value == "")
	{
		myerror += "You must enter Email\n";
	}

	if (itntiform.passwd1.value == "")
	{
		myerror += "You must enter Password\n";
	}

	if (itntiform.passwd1.value.length < 6)
	{
		myerror += "Password must be minimum 6 digits\n";
	}

	if (itntiform.passwd2.value == "")
	{
		myerror += "You must enter Confirm Password\n";
	}

	if (itntiform.passwd1.value != itntiform.passwd2.value)
	{
		myerror += "Password and Confirm Password did not match\n";
	}

	if (itntiform.fname.value == "")
	{
		myerror += "You must enter First Name\n";
	}

	if (itntiform.lname.value == "")
	{
		myerror += "You must enter Last Name\n";
	}

	educationval = itntiform.education.options[itntiform.education.selectedIndex].value;
	experienceval = itntiform.experience.options[itntiform.experience.selectedIndex].value;

	if (educationval == "0")
	{
		myerror += "You must select Education\n";
	}

	if (experienceval == "0")
	{
		myerror += "You must select Experience\n";
	}

	if (itntiform.age.value == "")
	{
		myerror += "You must enter Age\n";
	}

	if (itntiform.age.value != "")
	{
		ageval = parseInt(itntiform.age.value);
		if (ageval < 18)
		{
			myerror += "Your Age must be greater than 18\n";
		}
	}

	if (itntiform.address.value == "")
	{
		myerror += "You must enter Address\n";
	}

	if (!itntiform.agree.checked)
	{
		myerror += "You must agree to the Terms and Conditions in order to register\n";
	}

	if (myerror != "")
	{
		alert(myerror);
		return false;
	}
	else
	{
		return true;
	}
}

