// JavaScript Document
function checkAvailability() {
  var url="availableSD.cfm";
  new Ajax.Request(url, {
      method: 'get',
      parameters: { name: document.getElementById('UserName').value },
      onSuccess: process,
      onFailure: function() { 
      alert("There was an error with the connection"); 
    }
  });
  }
  
  function process(transport) {
  var response = transport.responseText;
  if(response =='0'){
  		
		
		alert("This Email/Username is already registered, please choose another");
		document.getElementById('UserName').value='';
		document.registerForm.UserName.focus(); 
		 }
}
