function changeopenmenu(id){
//create an array of UL classnames
var all_uls = new Array();
all_uls[0]='ul_one';
all_uls[1]='ul_two';
all_uls[2]='ul_three';
all_uls[3]='ul_four';
all_uls[4]='ul_five';
all_uls[5]='ul_six';
all_uls[6]='ul_seven';
all_uls[7]='ul_eight';
all_uls[8]='ul_nine';
//create an array of LI classnames
var all_lis = new Array();
all_lis[0] = 'li_one';
all_lis[1] = 'li_two';
all_lis[2] = 'li_three';
all_lis[3] = 'li_four';
all_lis[4] = 'li_five';
all_lis[5] = 'li_six';
all_lis[6] = 'li_seven';
all_lis[7] = 'li_eight';
all_lis[8] = 'li_nine';
//loop through all the ULs and LIs setting everything back to default
for(i=0;i<all_uls.length;i++){
document.getElementById(all_uls[i]).style.display = 'none';
document.getElementById(all_lis[i]).childNodes[0].style.background = '#059033';/* green background color of unclicked main menu items */
document.getElementById(all_lis[i]).childNodes[0].style.color = '#ffffff';/* white text for main menu and submenu items */
}
//change the selected UL(submenu) to display:block and the matching LI(parent link)to black bkgd
the_ul = document.getElementById(all_uls[id]);
the_li = document.getElementById(all_lis[id]);
the_ul.style.display = 'block';
the_li.childNodes[0].style.background = '#004900';/* light green background color of clicked main menu items */
the_li.childNodes[0].style.color = '#ff00ff';
//blur the selected button
clearButtons();
}
function clearButtons() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
anchor.blur();
}
} 