	function validate()	{



		

		a = document.form.question;

		if (a.value.length == 0) {

			alert("Please fill out the Question !");

			a.focus();

			return false;

		}



		a = document.form.E1;

		if (a.value.length == 0) {

			alert("Please fill out the Company !");

			a.focus();

			return false;

		}



		a = document.form.E2;

		if (a.value.length == 0) {

			alert("Please fill out the City!");

			a.focus();

			return false;

		}

		



		a = document.form.E3;

		if (a.value.length == 0) {

			alert("Please fill out the State !");

			a.focus();

			return false;

		}

		



		a = document.form.D1;

		if (a.value.length == 0) {

			alert("Please fill out the Model Number !");

			a.focus();

			return false;

		}





				

		a = document.form.T3;

		

		if (a.value.length == 0) {

			alert("Please fill out Name !");

			a.focus();

			return false;

		}

		

		a = document.form.T4;

	

		if (a.value.length == 0) {

			alert("Please fill out Phone Number !");

			a.focus();

			return false;

		}



		a = document.form.T5;

		if ((a.value != null) && (!isEmailAddress(a.value))){

			alert("Please fill out valid Email Address !");

			a.focus();

			return false;		

		}

		

		return true;

	}

	

	function validate_login()	{

	

		       var isChecked = false;



		       for (var i = 0; i < document.form.Q1.length; i++) {

			   if (document.form.Q1[i].checked) {

			      isChecked = true;

			   }

		       }

		       

		       

	               if (isChecked == false) {

				alert("Please check the Type of your questions !");

				return false;

			}

			

			a = document.form.question;

			if (a.value.length == 0) {

				alert("Please fill out the Question !");

				a.focus();

				return false;

			}

			

			a = document.form.E1;

			if (a.value.length == 0) {

				alert("Please fill out the Dealer Name !");

				a.focus();

				return false;

			}

	

			a = document.form.E2;

			if (a.value.length == 0) {

				alert("Please fill out the City!");

				a.focus();

				return false;

			}

			

	

			a = document.form.E3;

			if (a.value.length == 0) {

				alert("Please fill out the State !");

				a.focus();

				return false;

			}

					

			a = document.form.T3;

			if (a.value.length == 0) {

				alert("Please fill out Name !");

				a.focus();

				return false;

			}

			

			a = document.form.T4;

			if (a.value.length == 0) {

				alert("Please fill out Phone Number !");

				a.focus();

				return false;

			}

	

			a = document.form.T5;

			if ((a.value != null) && (!isEmailAddress(a.value))){

				alert("Please fill out valid Email Address !");

				a.focus();

				return false;		

			}

			

			return true;

		}





	function isEmailAddress (string) {

		var addressPattern = /^(\w+[-])*(\w+[.])*(\w+[-])*\w+\@(\w+[-])*(\w+[.])+\w+$/;

		return addressPattern.test(string);

	}



	function regvalidate()	{



		

		a = document.form.fname;

		if (a.value.length == 0) {

			alert("Please fill out the First Name !");

			a.focus();

			return false;

		}



		a = document.form.lname;

		if (a.value.length == 0) {

			alert("Please fill out the Last Name !");

			a.focus();

			return false;

		}

				

		a = document.form.title;

		if (a.value.length == 0) {

			alert("Please fill out Title !");

			a.focus();

			return false;

		}



		a = document.form.email;

		if ((a.value != null) && (!isEmailAddress(a.value))){

			alert("Please fill out valid Email Address !");

			a.focus();

			return false;		

		}

		

		a = document.form.phone;

		if (a.value.length == 0) {

			alert("Please fill out Phone !");

			a.focus();

			return false;

		}

		

		a = document.form.dealer;

		if (a.value.length == 0) {

			alert("Please fill out Dealer !");

			a.focus();

			return false;

		}		

		

		return true;

	}

		function contest_validate()	{



		

		a = document.contest_form.firstname;

		if (a.value.length == 0) {

			alert("Please fill out the First Name !");

			a.focus();

			return false;

		}



		a = document.contest_form.lastname;

		if (a.value.length == 0) {

			alert("Please fill out the Last Name !");

			a.focus();

			return false;

		}

				

		a = document.contest_form.contact_number;

		if (a.value.length == 0) {

			alert("Please fill out the Contact Number !");

			a.focus();

			return false;

		}



		a = document.contest_form.email;

		if ((a.value != null) && (!isEmailAddress(a.value))){

			alert("Please fill out a valid Email Address !");

			a.focus();

			return false;		

		}

		

		a = document.contest_form.dealership_name;

		if (a.value.length == 0) {

			alert("Please fill out the Dealership Name !");

			a.focus();

			return false;

		}

		

		a = document.contest_form.city;

		if (a.value.length == 0) {

			alert("Please fill out the City !");

			a.focus();

			return false;

		}		

		a = document.contest_form.state;

		if (a.value.length == 0) {

			alert("Please fill out the State !");

			a.focus();

			return false;

		}			

		
		a = document.contest_form.asm_name;

		if (a.value.length == 0) {

			alert("Please fill out the ASM's Name !");

			a.focus();

			return false;

		}
		
		
		a = document.contest_form.proposalfile;

		if (a.value.length == 0) {

			alert("Please upload the Proposal File !");

			return false;

		}
		
		a = document.contest_form.videofile;

		if (a.value.length == 0) {

			alert("Please upload the Video File !");

			return false;

		}
		
		return true;

	}

