function validateForm(seminar_id)
{
	trimFields();
	if(obj.first_name.value == "")
	{
		alert("Please enter Participant's First Name.");
		obj.first_name.focus();
		return;
	}
	if(obj.last_name.value == "")
	{
		alert("Please enter Participant's Last Name.");
		obj.last_name.focus();
		return;
	}
	if(obj.address.value == "")
	{
		alert("Please enter the Address.");
		obj.address.focus();
		return;
	}
	if(obj.city.value == "")
	{
		alert("Please enter the City.");
		obj.city.focus();
		return;
	}
	if(obj.state.selectedIndex == 0)
	{
		alert("Please select a US or Canada State.");
		obj.state.focus();
		return;
	}
	if(obj.zip.value == "")
	{
		alert("Please enter the Zip.");
		obj.zip.focus();
		return;
	}
	if(obj.phone.value == "")
	{
		alert("Please enter the Phone Number.");
		obj.phone.focus();
		return;
	}
	if(obj.email.value == "")
	{
		alert("Please enter the Email.");
		obj.email.focus();
		return;
	}
	if(!chkEmail(obj.email.value))
	{
		alert("Please enter a valid Email Address.");
		obj.email.focus();
		obj.email.select();
		return;
	}
	if(obj.how_many.value != "")
	{
		if(isNaN(obj.how_many.value) || obj.how_many.value < 0 || parseInt(obj.how_many.value) != obj.how_many.value)
		{
			alert("Please enter a valid number of persons attending this seminar.");
			obj.how_many.focus();
			obj.how_many.select();
			return;
		}
	}
	if(obj.hear_about.selectedIndex == 0)
	{
		alert("Please select How did you hear about us?.");
		obj.hear_about.focus();
		return;
	}
	if(obj.hear_about.value == 'Other' && obj.other.value == '')
	{
		alert("Please enter the How did you hear about us?.");
		obj.other.focus();
		return;
	}
	if(obj.security_code.value == "")
	{
		alert("Please enter 6-digit security code correctly");
		obj.security_code.focus();
		return;
	}
	//All fine?
	obj.action = 'seminar_registration.php?id='+seminar_id;
	obj.submit();
}

function showOther(val)
{
	if(val == "Other")
	{
		document.getElementById('other_blk').style.display = 'block';
		obj.other.focus();
	}
	else
	{
		document.getElementById('other_blk').style.display= 'none';
		document.getElementById('other').value = '';
	}
}
