﻿// JScript File


function ajaxFunction()
 {
 var xmlHttp;
 
 try
    {
   // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
 catch (e)
    {

  // Internet Explorer
   try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
   catch (e)
      {

      try
         {
         xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
         }
      catch (e)
         {
         alert("sorry! AJAX initialization failed!");
         return false;
         }
      }
    }
    return xmlHttp;
 }
function CustomerLogin(CustomerEmail)
{
   xmlhttp = new ajaxFunction();
   xmlhttp.onreadystatechange=function()
   {
   	if(xmlhttp.readyState==4)
	{
		if(xmlhttp.status==200)
		{
			document.getElementById('errorBox').innerHTML=xmlhttp.responseText;
		}
	}
   }
   url="ajaxCustomer.aspx?CustomerEmail="+CustomerEmail;
   xmlhttp.open('GET',url,true);
   xmlhttp.send(null);
   
}

