// JavaScript Document
function checkForm()
{
	var spm_nm = document.getElementById("name").value;
	var spm_ml = document.getElementById("email").value;
	if(spm_nm.length > 0   ||  spm_ml.length > 0)
	{
		alert("Dont try to spam");
		return;
	}
	else
	{
		var real_name = document.getElementById("name1").value;
		var real_email= document.getElementById("actual_mail_box").value;
		if(real_name.length <= 0   ||   real_email.length <= 0)
		{
			alert("You must enter your name and email");
			return;
		}
		else
		{
			requestCustomerInfo();
		}
		
	}
}
   function requestCustomerInfo() 
   {     
      /*var sId = document.getElementById("txtCustomerId").value;*/
	  
	  /*var sId = document.getElementById("select1").value;*/
	  
	  var u_name = document.getElementById("name1").value;
	  var u_email= document.getElementById("actual_mail_box").value; 
	  var u_prob = document.getElementById("list").value; 
	  var u_phone= document.getElementById("phone").value;
	  var phone_len = u_phone.length; 

	  if(phone_len > 0)
	  {
	      http.open("GET", url + escape(u_name) + "&ml=" + escape(u_email) + "&prob=" + escape(u_prob) + "&phone=" + escape(u_phone), true);
	  }
	  else
	  {
	  	  http.open("GET", url + escape(u_name) + "&ml=" + escape(u_email) + "&prob=" + escape(u_prob) , true);
	  }
      http.onreadystatechange = handleHttpResponse;
      http.send(null);
	  //alert(url);
   }
   
	function getHTTPObject() 
	{
	  var xmlhttp;
	  if(window.XMLHttpRequest)
	  {
		xmlhttp = new XMLHttpRequest();
	  }
	  else if (window.ActiveXObject)
	  {
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		if (!xmlhttp)
		{
			xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
	  }
	  return xmlhttp;
	}
	var http = getHTTPObject(); // We create the HTTP Object