// JavaScript Document

function validate()

{
//---------------Validate that first name is entered---------

		if (document.form1.fname.value=="")
		{
			alert("Please enter your first name")
			document.form1.fname.focus()
			return false
		}
		
//---------------Validate that last name is entered---------

		if (document.form1.lname.value=="")
		{
			alert("Please enter your last name")
			document.form1.lname.focus()
			return false
		}
		
//---------------Validate that address1 is entered---------

		if (document.form1.address1.value=="")
		{
			alert("Please enter your address")
			document.form1.address1.focus()
			return false
		}
		
//---------------Validate that city is entered---------

		if (document.form1.city.value=="")
		{
			alert("Please enter your city")
			document.form1.city.focus()
			return false
		}
		
//---------------Validate that provstate is entered---------

		if (document.form1.provstate.value=="")
		{
			alert("Please enter your province or state")
			document.form1.provstate.focus()
			return false
		}
		
//---------------Validate that country is entered---------

		if (document.form1.country.value=="")
		{
			alert("Please enter your country")
			document.form1.country.focus()
			return false
		}
		
//---------------Validate that pczip is entered---------

		if (document.form1.pczip.value=="")
		{
			alert("Please enter your Postal or Zip Code")
			document.form1.pczip.focus()
			return false
		}
		
//---------------Validate that phone is entered---------

		if (document.form1.phone.value=="")
		{
			alert("Please enter your Phone Number")
			document.form1.phone.focus()
			return false
		}
		
//---------------------Validate Email @ symbol---------------------------------
	
	if (document.form1.email.value.indexOf("@") == -1)
	{
		alert ("Please enter a valid email address")
		document.form1.email.focus()
		document.form1.email.select()
		return false
	}
		
//-----------------------Validate Email DOT symbol------------------------
	
	if (document.form1.email.value.indexOf(".") == -1)
	{
		alert ("Please enter a valid email address. There needs to be a dot in your email address")
		document.form1.email.focus()
		document.form1.email.select()
		return false
	}
		
//------------Validate that Email has an @ before the DOT symbol----------
	
	if (document.form1.email.value.indexOf("@") == -1 || 
	    document.form1.email.value.indexOf(".") == -1 ||
	    document.form1.email.value.lastIndexOf(".") <  document.form1.email.value.indexOf("@"))
	{
		alert ("Please enter a valid email address. There must be an @ before the dot")
		document.form1.email.focus()
		document.form1.email.select()
		return false
	}
	
//------------Validate that a Type of Site is selected----------	
	
	if (document.form1.siteclass.selectedIndex==0)
		{
			alert("Please specify a Type of Site")
			document.form1.siteclass.focus()
			return false
		}
		
//------------Validate that an Equipment Size is selected----------	
	
	if (document.form1.equip.selectedIndex==0)
		{
			alert("Please specify your Equipment Size")
			document.form1.equip.focus()
			return false
		}

//------------Validate that a Check-In Month is selected----------	
	
	if (document.form1.cimonth.selectedIndex==0)
		{
			alert("Please specify a Check-In Month")
			document.form1.cimonth.focus()
			return false
		}
		
//------------Validate that a Check-In Day is selected----------	
	
	if (document.form1.ciday.selectedIndex==0)
		{
			alert("Please specify a Check-In Day")
			document.form1.ciday.focus()
			return false
		}
		
//------------Validate that a Check-In Year is selected----------	
	
	if (document.form1.ciyear.selectedIndex==0)
		{
			alert("Please specify a Check-In Year")
			document.form1.ciyear.focus()
			return false
		}
		
//------------Validate that a Check-Out Month is selected----------	
	
	if (document.form1.comonth.selectedIndex==0)
		{
			alert("Please specify a Check-Out Month")
			document.form1.comonth.focus()
			return false
		}
		
//------------Validate that a Check-Out Day is selected----------	
	
	if (document.form1.coday.selectedIndex==0)
		{
			alert("Please specify a Check-Out Day")
			document.form1.coday.focus()
			return false
		}
		
//------------Validate that a Check-Out Year is selected----------	
	
	if (document.form1.coyear.selectedIndex==0)
		{
			alert("Please specify a Check-Out Year")
			document.form1.coyear.focus()
			return false
		}
		
		
//------------End of Javascript----------
}



