/*
  objEvents.js
  Version: 20020530.1
  Created: 2002-05-30
  Andrew Spencer <andrew@fallingblue.com>

  This script contains functions that are called from menu object events.
*/

var CAPSULE;
var COLOR;
var PARENT;
var VISIBILITY;

function setGlobals(id, visibility) {
  CAPSULE = id + 'capsule';
  VISIBILITY = visibility;
}

function setMenu(id, hover) {
  try {
    PARENT = id.substring(0,5);

    if (hover) {
      COLOR = '#fefeeb';
      VISIBILITY = 'visible';
    }
    else {
      COLOR = '';
      VISIBILITY = 'hidden';
    }

    arrObjs[PARENT].setBackgroundColor(COLOR);
    arrObjs[PARENT + 'capsule'].setVisibility(VISIBILITY);
  }
  catch(errorObject) {}
}

function setBgColor(id, hover) {
  try {
    PARENT = id.substring(0,5);

    if (hover) {
      COLOR = '#fefeeb';
    }
    else {
      COLOR = '';
    }

    arrObjs[PARENT].setBackgroundColor(COLOR);
  }
  catch(errorObject) {}
}
