function GetXmlHttpObject()
  { var xmlHttp=null;
    try // Firefox, Opera 8.0+, Safari
    { xmlHttp=new XMLHttpRequest(); }
    catch (e) //Internet Explorer
    { try
      { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); }
      catch(e)
      { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } }
    return xmlHttp;
}
function addemail(){
	 var msg=getObj('AddEmailForm');
	 xmlHttp=GetXmlHttpObject()
  	 if(xmlHttp==null) { alert("Browser does not support HTTP Request"); return }
  	 var url="ajaxControl.php?action=addemail&msg="+ msg.AddEmail.value
	 document.getElementById('ShowEmailTD').innerHTML = "<img src='image/load.gif' align='left'>";	
     xmlHttp.onreadystatechange=function (){ 
  		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
    		{ 
				document.getElementById('ShowEmailTD').innerHTML=	xmlHttp.responseText;
			}
 	}
   	xmlHttp.open("GET",url,true)
   	xmlHttp.send(null)
} 
function getObj(objName){ 
	return document.getElementById(objName) 
}
