			function ValidateForm() 
			{
				var FirstName = document.Form1.FirstName;
				var Email = document.Form1.Email;
				var DayPhone = document.Form1.DayPhone;
				var CityFrom = document.Form1.CityFrom;
				var StateFrom = document.Form1.StateFrom;
				var ZipFrom = document.Form1.ZipFrom;
				var CityTo = document.Form1.CityTo;
				var StateTo = document.Form1.StateTo;
				var TypeOfMove = document.Form1.TypeOfMove;
				var MovingDate = document.Form1.MovingDate;
				var Vehicle = document.Form1.Vehicle;
				var Comments = document.Form1.Comments;
				
				if (FirstName.value == "")
				{
					window.alert("Missing Required Field: First Name");
					FirstName.focus();
					return false;
				}
							
				str = Email.value;
				var emailRegEx = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
				if(!str.match(emailRegEx))
				{
					window.alert("Valid Email address required");
					Email.focus();
					return false;
				}
				
				if ((DayPhone.value.length < 10) || (DayPhone.value.length > 10))
				{
					window.alert("Day Phone is Invalid");
					DayPhone.focus();
					return false;
				}
				
				if (CityFrom.value == "")
				{
					window.alert("Missing Required Field: City From");
					CityFrom.focus();
					return false;
				}
				
				if (ZipFrom.value.length != 5)
				{
					window.alert("Missing or Invalid Required Field: Zip From");
					ZipFrom.focus();
					return false;
				}
				
				if (CityTo.value == "")
				{
					window.alert("Missing Required Field: City To");
					CityTo.focus();
					return false;
				}
							
				if (TypeOfMove.selectedIndex < 1)
				{
					window.alert("Must Select One: Move Size");
					TypeOfMove.focus();
					return false;
				}
				

				
				//document.Form1.submit();

				if (document.Form1.Vehicle[0].checked == true)
				{
					var vehicleInfo = window.showModalDialog('form2.php','','dialogWidth:552px; dialogHeight:256px; dialogcenter:yes; status:no; dialogLeft:center; dialogTop:center; location:no; directories:no; menubar:no; toolbar:no; resizable:yes');
					
					if(vehicleInfo != null) {
						for(var index in vehicleInfo) {
							document.getElementById(index).value = vehicleInfo[index];
						}
					}
				}

				
				return true;
			}


			function ValidateVehicleForm(){
			

				var carmake1 = document.Form1.carmake1;
				var carmodel1 = document.Form1.carmodel1;
				var caryear1 = document.Form1.caryear1;



				if (carmake1.value == ""){

					window.alert("Missing Required Field: Make of Vehicle #1");
					carmake1.focus();
					return false;
				}

				if (carmodel1.value == ""){

					window.alert("Missing Required Field: Model of Vehicle #1");
					carmodel1.focus();
					return false;
				}

				if (caryear1.value == ""){

					window.alert("Missing Required Field: Year of Vehicle #1");
					caryear1.focus();
					return false;
				}
				
				window.returnValue = {
					'carmake1': document.Form1.carmake1.value,
					'carmodel1': document.Form1.carmodel1.value,
					'caryear1': document.Form1.caryear1.value,
					'carmake2': document.Form1.carmake2.value,
					'carmodel2': document.Form1.carmodel2.value,
					'caryear2': document.Form1.caryear2.value
				};
				
				window.close();
				return false;

			}//ValidateVehicleForm



			function numbersonly(myfield, e, dec)
			{
				var key;
				var keychar;
				if (window.event)
				key = window.event.keyCode;
				else if (e)
				key = e.which;
				else
				return true;
				keychar = String.fromCharCode(key);
				// control keys
				if ((key==null) || (key==0) || (key==8) || 
				(key==9) || (key==13) || (key==27) )
				return true;
				// numbers
				else if ((("0123456789").indexOf(keychar) > -1))
				return true;
				// decimal point jump
				else if (dec && (keychar == "."))
				{
					myfield.form.elements[dec].focus();
					return false;
				}
				else
				{
					return false;
				}
			}


			
