var xmlHttpShowSuggestion

function showSuggestion()
{
	xmlHttpShowSuggestion=getHTTPObject()
	if (xmlHttpShowSuggestion==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	
	fname= document.getElementById("firstname").value;
	lname= document.getElementById("lastname").value;
	username = document.getElementById("username1").value;
	var url="registration/php/getsuggestion.php"
	url=url+"?fname="+fname+"&lname="+lname+"&username="+username
	//alert(url);
	url=url+"&sid="+Math.random()
	xmlHttpShowSuggestion.onreadystatechange=stateChangedShowSuggestion
	xmlHttpShowSuggestion.open("GET",url,true)
	xmlHttpShowSuggestion.send(null)
} 

function stateChangedShowSuggestion() 
{ 
	if (xmlHttpShowSuggestion.readyState==4 || xmlHttpShowSuggestion.readyState=="complete")
	{
		document.getElementById("txtSuggestion").innerHTML=xmlHttpShowSuggestion.responseText 
	} 
}
