function $( id )
{
  return document.getElementById( id );
}


var Browser = {
  n: (document.layers != null || document.layers instanceof Object) ? 1:0,
  ie: (document.all != null || document.all instanceof Object) ? 1:0
}


var Ajax = {
  request: null,

  getRequest: function( callback )
  {
    if( this.request == null )
    {
      try 
      {
        this.request = new XMLHttpRequest();
      } 
      catch( e ) 
      {
        try 
        {
          this.request = new ActiveXObject( "Microsoft.XMLHTTP" );
        } 
        catch( e ) 
        {}
      }
    } 
    else
    {
      
    }

    if( this.request != null )
    {
      this.request.abort();
      this.request.onreadystatechange = this.listener;
      this.callback = callback;
    }

    return this.request;
  },

  listener: function()
  {
    if( Ajax.request != null && Ajax.request.readyState == 4 && Ajax.callback != null )
    {
      Ajax.callback( Ajax.request );
    }
  }
}

/*
var OnLoadHook = {
  hooks: null,

  add: function( hook )
  {
    if( this.hooks == null )
    {
      this.hooks = new Array();
    }
    this.hooks[ this.hooks.length ] = hook;
  },

  invoke: function()
  {
    if( this.hooks != null )
    {
      for( var i = 0; i < this.hooks.length; i++ )
      {
        eval( this.hooks[ i ] );
      }
    }
  }
}
*/