// JavaScript Document

var timeout = null;
var timeout2 = null;
var objects = new Array('our_team', 'our_story', 'our_community', 'other_links');

// this function shows the drop down menu passed
function showSub(obj) {
  if (timeout != null) {
	clearTimeout(timeout);
	for (i = 0; i < objects.length; i++) {
	  delayMenuHide(objects[i]);
	}
  }
  main_obj = findObj(obj).style;
  sub_obj = findObj(obj + '_sub').style;
  main_obj.color = '#FFFFFF';
  sub_obj.visibility = 'visible';
}


// this function hides the menu after a half second delay
function hideSub(obj) {
  timeout = setTimeout("delayMenuHide('" + obj + "')", 500);
}


// this is the function that actually hides the menu
function delayMenuHide(obj) {
  main_obj = findObj(obj).style;
  sub_obj = findObj(obj + '_sub').style;
  main_obj.color = '#CCCCCC';
  sub_obj.visibility = 'hidden';
}
