// JavaScript Document
function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}
function get_page_response(url){
 var xmlHttp;
 try{
   // Firefox, Opera 8.0+, Safari
   xmlHttp=new XMLHttpRequest();
 }
 catch (e){
   // Internet Explorer
   try{
     xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
   }
   catch (e){
     try{
       xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
     }
     catch (e){
       //browser does not support AJAX
       return false;
     }
   }
 }
 xmlHttp.onreadystatechange = function(){
     if(xmlHttp.readyState==4){
        if(xmlHttp.responseText == 1){
            document.getElementById('usernamealert').style.display = "block";
            document.forms["signupform"].username.value="";
            document.forms["signupform"].username.focus();
        } else {
            document.getElementById('usernamealert').style.display = "none";
        }
     }
 }
 xmlHttp.open("POST",url, true);
 xmlHttp.send(null);
} 
