/** GLOBAL CONSTANTS **/

BROWSER_SUPPORTS_LAYERS = false;
INACTIVE_BULLET = null;
ACTIVE_BULLET = null;

/**
 * Initializes global constants.
 */
function init() {

  BROWSER_SUPPORTS_LAYERS = ( document.getElementById ) ? true : false;
  INACTIVE_BULLET = new Image();
  ACTIVE_BULLET   = new Image();
  INACTIVE_BULLET.src = "/images/inactive_bullet.gif";
  ACTIVE_BULLET.src   = "/images/active_bullet.gif";

} // End function init():void

/**
 * Shows a particular menu.
 *
 * @param menu Menu to show.
 */
function show ( menu ) {

  if ( BROWSER_SUPPORTS_LAYERS )
    document.getElementById ( menu ).style.visibility = "visible";

} // End function show ( String ):void

/**
 * Hides a particular menu.
 *
 * @param menu Menu to hide.
 */  
function hide ( menu ) {

  if ( BROWSER_SUPPORTS_LAYERS ) {
 
    var layer = document.getElementById ( menu );	  

    if ( !layer.contains ( event.toElement ) )
      layer.style.visibility = "hidden";

  } // End if

} // End funtion hide ( String ) : void

/**
 * Activates bullet.
 *
 * @param bullet Bullet to activate.
 */
function activateBullet ( bullet ) {

  document.images [ bullet ].src = ACTIVE_BULLET.src;

} // End function activateBullet ( String ) : void

/**
 * Deactivates bullet.
 *
 * @param bullet Bullet to deactivate.
 */
function deactivateBullet ( bullet ) {

  document.images [ bullet ].src = INACTIVE_BULLET.src;

} // End function deactivateBullet ( String ) : void
