img1_on = new Image(43, 17);
img1_on.src = "/images/menu_home_on.png";
img2_on = new Image(58, 17);
img2_on.src = "/images/menu_about_on.png";
img3_on = new Image(66, 17);
img3_on.src = "/images/menu_how_to_on.png";
img4_on = new Image(94, 17);
img4_on.src = "/images/menu_resources_on.png";
img5_on = new Image(65, 17);
img5_on.src = "/images/menu_events_on.png";
img6_on = new Image(50, 17);
img6_on.src = "/images/menu_news_on.png";
img7_on = new Image(65, 17);
img7_on.src = "/images/menu_donate_on.png";
img8_on = new Image(75, 17);
img8_on.src = "/images/menu_contact_us_on.png";

function changeSrc(controlId, newSrc) {
	if (document.all) { //IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + controlId + ".src = '" + newSrc + "';");
	}
	if (document.layers) { //IS NETSCAPE 4 or below
		document.layers[controlId].src = newSrc;
	}
	if (document.getElementById && !document.all) {
		submenu = document.getElementById(controlId);
		submenu.src = newSrc;
	}
}
function img_on(imageCtrl) {
	imageCtrl.src = '/images/menu_' + imageCtrl.name + '_on.png';
}
function img_off(imageCtrl) {
	imageCtrl.src = '/images/menu_' + imageCtrl.name + '_off.png';
}
function imgOnById(imageCtrl) {
	imageUrl = '/images/menu_' + imageCtrl + '_on.png';
	changeSrc(imageCtrl, imageUrl);
}
function imgOffById(imageCtrl) {
	imageUrl = '/images/menu_' + imageCtrl + '_off.png';
	changeSrc(imageCtrl, imageUrl);
}
function arrow_on(imageCtrl) {
	imageUrl = '/images/arrow_orange.png';
	changeSrc(imageCtrl, imageUrl);
}
function arrow_off(imageCtrl) {
	imageUrl = '/images/arrow_blue.png';
	changeSrc(imageCtrl, imageUrl);
}

var state = 'hidden';
function showhide(layer_ref, state) {
	if (document.all) { //IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + layer_ref + ".style.visibility = '" + state + "';");
	}
	if (document.layers) { //IS NETSCAPE 4 or below
		document.layers[layer_ref].visibility = state;
	}
	if (document.getElementById && !document.all) {
		submenu = document.getElementById(layer_ref);
		submenu.style.visibility = state;
	}
}
function show(obj) {
	showhide(obj, 'visible');
}
function hide(obj) {
	showhide(obj, 'hidden');
}

function changeStyle(obj,stateOnOff){
	if (stateOnOff == 'on') {
		obj.className = 'submenu_td_on';
	}
	if (stateOnOff == 'off') {
		obj.className = 'submenu_td_off';
	}
}
