
<!-- // Get the HTTP Object
 var httpObject = null; 
 
	function getHTTPObject() {
		if (window.ActiveXObject) 
			return new ActiveXObject("Microsoft.XMLHTTP");
		else if (window.XMLHttpRequest) 
			return new XMLHttpRequest();
		else {
			alert("Your browser does not support AJAX.");
			return null;
			}
		}    
		// Change the value of the outputText field
		function setOutput(){
			if(httpObject.readyState == 4){
				document.getElementById('username1').value = httpObject.responseText;
			}
		} 
		// Implement business logic
		function searchUsername(){	
		
			httpObject = getHTTPObject();
		//		if (httpObject != null) {
					
					httpObject.open("GET", "username.php?username="+document.getElementById('username').value, true); 
					httpObject.send(null);
					httpObject.onreadystatechange = setOutput;
			//		}
		}
		
   