function addemail() { 
  var url = "shopEmailSubscribe.php?email="; // The server-side script 
  document.getElementById('email_result').innerHTML = "<div class=copyright>...WAIT...</div>"; 
  email = document.getElementById('email').value;
    
  http_lg.open("GET", url + email, true); 
  http_lg.onreadystatechange = handleHttpResponse_lg; 
  http_lg.send(null); 
} 

function handleHttpResponse_lg() { 
  if (http_lg.readyState == 4) { 
    results = http_lg.responseText; 
    document.getElementById('email_result').innerHTML = results; 
  } 
} 

function getHTTPObject_lg() { 
  var xmlhttp; 
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { 
    try { 
      xmlhttp = new XMLHttpRequest(); 
    } catch (e) { 
      xmlhttp = false; 
    } 
  }else if(typeof window.ActiveXObject != "undefined"){
        try {
            xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.4.0");
        }
        catch(e){
            try {
                xmlhttp = new ActiveXObject("MSXML2.XMLHTTP");
            }
            catch(e){
                try {
                    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                }
                catch(e){
                    xmlhttp = null;
                }
            }
        }
    } 
  return xmlhttp; 
} 
var http_lg = getHTTPObject_lg(); // We create the HTTP Object 
