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;

    //if (window.opera) return; // I'm too tired

    actuator.parentNode.style.listStyleImage = "url(/images/plus.gif)";
    actuator.onclick = function() {
        var display = menu.style.display;
        this.parentNode.style.listStyleImage =
            (display == "block") ? "url(/images/plus.gif)" : "url(/images/minus.gif)";
        menu.style.listStyleImage = "url(/images/square.gif)";
        menu.style.display = (display == "block") ? "none" : "block";

        return false;
    }
}

// showcrumb.js for ATG SiteMaster
var qs = location.search.substring(1);
  var nv = qs.split('&');
  var url = new Object();
  for(i = 0; i < nv.length; i++)
  {
    eq = nv[i].indexOf('=');
    url[nv[i].substring(0,eq).toLowerCase()] = unescape(nv[i].substring(eq + 1));
  }


// discover and reveal breadcrumb
// ******************************
function RevealBreadcrumb(){
// error handling	
	if(!url.sub)return;
	var target_name=url['sub'].toLowerCase();
	if(!document.images[target_name])return;
// variable setups
	var target_ImgObject = document.images[target_name];
	var target_LinkObject = document.getElementById(target_name);
	var foo = location.pathname.split('/');
	var str_greyDot= location.protocol+"//"+location.host+'/'+foo[1]+'/images/submenu/greydot.gif';
	var str_BiggreyDot=location.protocol+"//"+location.host+'/'+foo[1]+'/images/submenu/big_greydot.gif';
// switch to breadcrumb color dot
	if(target_name=='no_two_line_buttons'){
		target_ImgObject.src=str_BiggreyDot;
	}
	else{
		target_ImgObject.src=str_greyDot;
	}
// now disable the mouseover for this page's link
	target_LinkObject.onmouseover=null;
	target_LinkObject.onmouseout=null;

}

function showAlttext(){
	var output_text="";
	var imagearray_index=0;
	if(!url['sub'])return; //error handling for upper level documents, those not down in submenu level
	var current_submenu = url['sub'].toLowerCase();
	
	for(var i=0;i<document.images.length;i++){if(document.images[i].name==current_submenu)imagearray_index=i;}
	if(url['sub'].toLowerCase()!="news")document.write("<div id=\"superBreadcrumb\"><p>"+document.images[imagearray_index].alt+"</p></div>");
}


