




function openXMLHttpRequest() {
  
	if (window.XMLHttpRequest) {    // Mozilla version
       
		xhr = new XMLHttpRequest();				
	}

	else if (window.ActiveXObject) {	// IE version         
		xhr = new ActiveXObject("Microsoft.XMLHTTP");
	}
 return xhr;
}


function getGenDetails(id){
 
	 document.getElementById("msgArea").innerHTML = 'Loading........';
 
     xhr = openXMLHttpRequest();
      
	id=encodeURIComponent(id);

	xhr.open("POST","/modules/ajaxCalls.php");

	xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
    
	// xhr.send(id);
    xhr.send('id='+id+'&action=getGenDetails');
	xhr.onreadystatechange=function() {

	
		if (xhr.readyState==4) {
						
			statusx = xhr.responseText;					
			document.getElementById("msgArea").innerHTML = statusx; 			
		}
	}

	return false;
}


function checkEmail(email) {

	 xhr = openXMLHttpRequest();
	 
	email=encodeURIComponent(email);

	xhr.open("POST","/modules/ajaxCalls.php");

	xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');

	xhr.send('email='+email+'&action=emailvalidation');

	xhr.onreadystatechange=function() {

		if (xhr.readyState==4) {
						
			statusx = xhr.responseText;
			
			alert (" Status: " + statusx);

		}

	}

	return false;

}








