// JavaScript Document

var ajax = null; 

// Create AJAX Object
function createObject()
{
	var ajaxObj;
	if (window.XMLHttpRequest)
	{
		ajaxObj = new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
		ajaxObj = new ActiveXObject("Microsoft.XMLHTTP");
	}
	return ajaxObj;	
}


// Pass the url and function name here
function makeRequest(url,functionName)
{
	
	
	ajax = createObject();
	ajax.onreadystatechange = eval(functionName);		
	ajax.open("GET", url, true);
	ajax.send(null);	
}






// Specific Functions
function checkEmailAvailability()
{
	
	
		
	if (ajax.readyState==4 && ajax.status==200)
	{
		xmlData = ajax.responseText;
		document.getElementById("showresultE").innerHTML = xmlData;
		
	}
	else
	{
		
		document.getElementById("showresultE").innerHTML = "Processing...";
	}
	
}





// Specific Functions
function checkGroupAvailability()
{
	
	
		
	if (ajax.readyState==4 && ajax.status==200)
	{
		xmlData = ajax.responseText;
		document.getElementById("showresultG").innerHTML = xmlData;
		
	}
	else
	{
		
		document.getElementById("showresultG").innerHTML = "Processing...";
	}
	
}
