// JavaScript Document
function insertEmail() {
	
	cId =  document.form1.email.value;

		var gURL = 'email.php?email=' + cId ;

	//create the Cross-browser XMLHttpRequest object
	if (window.XMLHttpRequest) { // code for Mozilla, Safari, etc 
		xmlhttp=new XMLHttpRequest();
		if (xmlhttp.overrideMimeType) {
			xmlhttp.overrideMimeType('text/xml');
		}
		xmlhttp.onreadystatechange=rmInd;
		xmlhttp.open("GET", gURL, true);
		xmlhttp.send(null);
	} else if (window.ActiveXObject) { //IE 
		xmlhttp=new ActiveXObject('Microsoft.XMLHTTP'); 
		if (xmlhttp) {
			xmlhttp.onreadystatechange=rmInd;
			xmlhttp.open('GET', gURL, false);
			xmlhttp.send();
		}
	}
	//alert(indId);
}

// function to handle asynchronus call
function rmInd() {
	
	if (xmlhttp.readyState==4) { 
		if (xmlhttp.status==200) { 
			document.getElementById('emailmsg').innerHTML=xmlhttp.responseText;
//		alert(indId);
		}
	}
}