function sendEmail() {

	try 
	{
		http=new ActiveXObject("Msxml2.XMLHTTP"); 
	}
	catch(e) 
	{
	    try 
		{
			http=new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(f)
		{
			http=null;
		}
	}


	if(!http&&typeof XMLHttpRequest!="undefined") 
	{
		http=new XMLHttpRequest();
	}



	var user_email = document.getElementById('user_email').value 
	user_email = user_email.replace('@', '%40');
	try
	{

		http.open('POST',  '../../mailing-list/a.php?'+'pwd='+'test'+'&email='+user_email);
		http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		http.send('pwd='+'test'+'&email='+user_email);
	}
	catch(e)
	{
		document.write(http.responseText);
	}
	
}
<!-- being your stuff -->
	var state='block'
    var state2='none'
      
    function showhide(layer_ref) {
    
        if (state == 'block') {
            state = 'none';
            }
 
        else {
            state = 'block';
            }
 
        if (document.all) { 
            document.all[layer_ref].style.display= state;
            }
            
            
        if (document.getElementById &&!document.all) {
            hza = document.getElementById(layer_ref);
            hza.style.display = state;
            }
        } 
    
     function showhide2(layer_ref) {
    
        if (state2 == 'block') {
            state2 = 'none';
            }
 
        else {
            state2 = 'block';
            }
 
        if (document.all) { 
            document.all[layer_ref].style.display= state2;
            }
 
            
        if (document.getElementById &&!document.all) {
            hza = document.getElementById(layer_ref);
            hza.style.display = state2;
            }
        } 
        
     function msieversion()
   {
      var ua = window.navigator.userAgent
      var msie = ua.indexOf ( "MSIE " )
 
      if ( msie > 0 )      
         return parseInt (ua.substring (msie+5, ua.indexOf (".", msie )))
      else                
         return 0
    }

function checkEmail()
{
var x=document.getElementById('user_email').value 
var atpos=x.indexOf("@");
var dotpos=x.lastIndexOf(".");
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
  {
  alert("Not a valid e-mail address");
  return false;
  }
return true;
}
