function ajax() {
	try {
		xmlHttp = new XMLHttpRequest(); // Firefox, Opera 8.0+, Safari
		return xmlHttp;
	} catch (e) {
		try {
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
			return xmlHttp;
		} catch (e) {
			try {
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
				return xmlHttp;
			} catch (e) {
				alert("Your browser does not support AJAX.");
				return false;
			}
		}
	}
}

function submit() {

	var name = document.getElementById("name").value;
	var email = document.getElementById("email").value;
	var phone = document.getElementById("phone").value;
	var notes = document.getElementById("notes").value;

	var selyear = document.getElementById("year");
	var year = selyear.options[selyear.selectedIndex].value;

	var selcar = document.getElementById("make");
	var carmake = selcar.options[selcar.selectedIndex].value;

	var model = document.getElementById("model").value;
	var bodystyle = document.getElementById("bodystyle").value;
	var glass = document.getElementById("glass").value;

	var selglass = document.getElementById("glass");
	var glass = selglass.options[selglass.selectedIndex].value;

	var ip = document.getElementById("ip").value;
	var httpref = document.getElementById("httpref").value;
	var httpagent = document.getElementById("httpagent").value;

	var divid = "formsubmit";
	var url = "actions.php";

	// Name & email
	if (!name || !email) {
		alert("Please enter a valid Name and Email");
		die("Go back! ! ");
	}

	// Email format
	if ((email.indexOf('@') < 0) || (email.indexOf('.') < 0)) {
		alert('Please Enter a valid Email Address');
		die("Go back! ! ");
	}

	// Car info
	if (!year || !carmake || !model || !bodystyle || !glass) {
		alert("Please enter Your Car infomation - Year, Car, Model, Body Style, Glass");
		die("Go back! ! ");
	}

	// check for selection values
	if (model == "Model") {
		alert("Please type in a valid Car Model");
		die("Go back! ! ");
	}

	// check for selection values
	if (bodystyle == "Sedan, Coupe ...") {
		alert("Please type in a valid Body Style");
		die("Go back! ! ");
	}
	
	// check for selection values
	if (year == "Select Model Year") {
		alert("Please select a valid Model Year");
		die("Go back! ! ");
	}

	// check for selection values
	if (carmake == "Select Car Make") {
		alert("Please select a valid Car Make");
		die("Go back! ! ");
	}

	// check for selection values
	if ((glass=="Select Auto Glass")||(glass == "Seperator")||(glass == "Front")||(glass == "Rear")||(glass == "Vent Glass")||(glass == "Quarter Glass")) {
		alert("Please select a valid Auto Glass");
		die("Go back! ! ");
	}

	// Create xmlHttp
	var xmlHttp_one = ajax();

	// No cache
	var nocacheurl = url + "?action=submit";
	nocacheurl += "&name=" + name + "&email=" + email + "&phone=" + phone
			+ "&notes=" + notes + "&year=" + year + "&carmake=" + carmake
			+ "&model=" + model + "&bodystyle=" + bodystyle + "&glass=" + glass
			+ "&ip=" + ip + "&httpref=" + httpref + "&httpagent=" + httpagent;

	// The code...
	xmlHttp_one.onreadystatechange = function() {
		if (xmlHttp_one.readyState == 4) {
			document.getElementById(divid).innerHTML = xmlHttp_one.responseText;
			displayHeader();
		}
	};

	xmlHttp_one.open("GET", nocacheurl, true);
	xmlHttp_one.send(null);
}

function about(){
  alert('Locally owned since 1991 ! Built on Trust and Quality');	
}

function copyright(){
	  alert('Copyright of WindShieldReplacement.com - no Part of this website may be reproduced without prior permission');	
	}

function contact(){
	  alert( 
'For a Quote : Fill up the form above \n \
   or call us \n \
Phone: 214 - 978 - 4406');	
	}

function clearme(e) {
  document.getElementById(e).value="";
  document.getElementById(e).style.color="black";
}<!-- COPYRIGHT -->
<SCRIPT language=JavaScript type=text/javascript src="http://LoneStarMarketing-Texas.net/includes/copyright.js"> | </SCRIPT>
©Copyright 2002-2010 <A href="http://LoneStarMarketing-Texas.net/" target=_top>LoneStarMarketing-Texas.net | All Rights 
Reserved<BR>For more information please Contact Us</A><BR>