var bkite = {
  username : '',
  init: function(){
      $('username').focus();
      $('indicator').hide();
      var myForm = $('peopleSearch');
      if(!myForm){return false;}
      Event.observe('peopleSearch','submit',function(event){
        bkite.username = $F('username').strip();
        if(bkite.username == ''){Event.stop(event)}
        bkite.call(bkite.username);
        Event.stop(event);
      });
  },
  call: function(username){
      $('indicator').show();
      var url = '/people/'+bkite.username;
      var myAjax = new Ajax.Request(url, {
        method: 'get',
        onSuccess: function(transport) {
          $('results').innerHTML = transport.responseText; //ugly
          $('indicator').hide();
        }
      });
  }
}

window.onload = function(){
    bkite.init();
}