/*
 * menuExpandable3.js - implements an expandable menu based on a HTML list
 * Author: Dave Lindquist (http://www.gazingus.org)
 */
if (!document.getElementById)
document.getElementById = function() { return null; }

function initializeMenu(menuId, actuatorId) {
var menu = document.getElementById(menuId);
var actuator = document.getElementById(actuatorId);

if (menu == null || actuator == null) return;
actuator.parentNode.style.backgroundImage = "url(plus.gif)";
actuator.onclick = function() {
var display = menu.style.display;
this.parentNode.style.backgroundImage =
(display == "block") ? "url(plus.gif)" : "url(minus.gif)";
menu.style.display = (display == "block") ? "none" : "block";
return false;
}
}

//Code added by Gavin Thomas to open the menu.
function setToBlock(menuId,actuatorId) {
var menu = document.getElementById(menuId);
var actuator=document.getElementById(actuatorId);
//this.parentNode.style.backgroundImage = "url(minus.gif)";
menu.style.display = "block";
actuator.parentNode.style.backgroundImage = "url(minus.gif)";
return false;

}

function setToNoBlock(menuId,actuatorId) {
var menu = document.getElementById(menuId);
var actuator=document.getElementById(actuatorId);
//this.parentNode.style.backgroundImage = "url(minus.gif)";
menu.style.display = "none";
actuator.parentNode.style.backgroundImage = "url(plus.gif)";
return false;

}


//Code added by Gavin Thomas to open the menu.
function setToClass(actuatorId) {
var actuator=document.getElementById(actuatorId);
  if (actuator){actuator.className="selectedlink";
  return false;
  }
}
