// JavaScript Document

function requestecityname(city_name)

		 {
			 
		    //var city_name=document.getElementById(city_name);
						var oXmlHttp = zXmlHttp.createRequest();
            oXmlHttp.open("get", "city_search.php?name="+ city_name.value, true);
			//alert(city_name.value);
			oXmlHttp.onreadystatechange = function ()
			 {
			  if (oXmlHttp.readyState == 4)
				 {
                    if (oXmlHttp.status == 200)

					 {

                       displaycityname(oXmlHttp.responseText);
						
                    } else {
				
					    displaycityname("An error occurred: " + oXmlHttp.statusText); //statusText is not always accurate

                        //requestCustomerInfo1("An error occurred: " + oXmlHttp.statusText); //statusText is not always accurate

                    }
                }            
            };

            oXmlHttp.send(null);
        }    
		function displaycityname(sText) {
            var divcityname = document.getElementById("cityname");
           divcityname.innerHTML = sText;
			
			// var xyus = document.getElementById("abcdivCustomerInfo");
           // xyus.innerHTML = "";

        }
//////////////////////////////////////////////
function requestcityInfo(city)

		 {
			 var city=document.getElementById(city);
			var oXmlHttp = zXmlHttp.createRequest();
			//alert(city.value);
            oXmlHttp.open("post", "email2.php", true);
			oXmlHttp.onreadystatechange = function ()
			 {
			  if (oXmlHttp.readyState == 4)
				 {
                    if (oXmlHttp.status == 200)

					 {

                       displayformInfo(oXmlHttp.responseText);
						
                    } else {
				
					    displayformInfo("An error occurred: " + oXmlHttp.statusText); //statusText is not always accurate

                        //requestCustomerInfo1("An error occurred: " + oXmlHttp.statusText); //statusText is not always accurate

                    }
                }            
            };

            oXmlHttp.send(null);
        }    
		function displayformInfo(sText) {
            var divCustomerInfo = document.getElementById("erroremail");
            divCustomerInfo.innerHTML = sText;
			// var xyus = document.getElementById("abcdivCustomerInfo");
           // xyus.innerHTML = "";

        }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function requestFormInfo(form2)
{
	var form2=document.getElementById(form2);
	var oXmlHttp = zXmlHttp.createRequest();
	//alert(form2.city.value);
	//alert(form2.emailId.value);
	oXmlHttp.open("get", "indexValidation.php?city=" + form2.city.value + "&email=" + form2.emailId.value + "&pass=" + form2.password.value + "&state=" + form2.state.value + "&month=" + form2.month1.value + "&day=" + form2.date1.value, true);

oXmlHttp.onreadystatechange = function ()
			 {
			  if (oXmlHttp.readyState == 4)
				 {
                    if (oXmlHttp.status == 200)

					 {

                       displayFormInfo(oXmlHttp.responseText);
						
                    } else {
				
					    displayFormInfo("An error occurred: " + oXmlHttp.statusText); //statusText is not always accurate

                        //requestCustomerInfo1("An error occurred: " + oXmlHttp.statusText); //statusText is not always accurate

                    }
                }            
            };

            oXmlHttp.send(null);
        }
		
function displayFormInfo(sText) {
            var divCustomerInfo = document.getElementById("error");
            divCustomerInfo.innerHTML = sText;
			// var xyus = document.getElementById("abcdivCustomerInfo");
           // xyus.innerHTML = "";

        }
//password email id

function requestemailpassword(emailId)
 {
			 
		    //var city_name=document.getElementById(city_name);
			var oXmlHttp = zXmlHttp.createRequest();
            oXmlHttp.open("get", "email_search.php?email="+ emailId.value, true);
			//alert(city_name.value);
			oXmlHttp.onreadystatechange = function ()
			 {
			  if (oXmlHttp.readyState == 4)
				 {
                    if (oXmlHttp.status == 200)

					 {

                       displayemailpassword(oXmlHttp.responseText);
						
                    } else {
				
					    displaycityname("An error occurred: " + oXmlHttp.statusText); //statusText is not always accurate

                        //requestCustomerInfo1("An error occurred: " + oXmlHttp.statusText); //statusText is not always accurate

                    }
                }            
            };

            oXmlHttp.send(null);
        }    
		
		function displayemailpassword(sText) {
            var divCustomerInfo = document.getElementById("pass");
            divCustomerInfo.innerHTML = sText;
			// var xyus = document.getElementById("abcdivCustomerInfo");
           // xyus.innerHTML = "";

        }
