function openpopup(popurl, w, h, sizable) {
	str = 'width='+w+',height='+h;
	if ( sizable != true ) {
		str = str + ',scrollbars=no,resizable=no,status=no';
	} else {
		str = str + ',scrollbars=yes,resizable=yes,status=yes';
	}
	window.open(popurl,'',str);
}

menuItems = new Array('mi_journey', 'mi_fundraising', 'mi_team');
document.onmouseover = hideAllMenuItems;

function highlightMenuItem(objectId) {
    changeObjectClass(objectId, 'mit_on')
    return true; // assume a success, life's too short
}
function unHighlightMenuItem(objectId) {
    changeObjectClass(objectId, 'mit_off')
    return true; // assume a success, life's too short
}

function showMenuItems(menuName) {
    hideAllMenuItems();
    if(changeObjectVisibility(menuName, 'visible')) {
	return true;
    } else {
	return false;
    }
}
function hideAllMenuItems() {
    for(counter = 0; counter < menuItems.length; counter++) {
      changeObjectVisibility(menuItems[counter], 'hidden');
    }
    return true; // assume a success, life's too short
}

function changeObjectClass(objectId, newClass) {
    var allObject = getObject(objectId);
    if(allObject) {
			allObject.className = newClass;
			return true;
    } else {
			//we couldn't find the object, so we can't change its visibility
			return false;
    }
}

function changeObjectVisibility(objectId, newVisibility) {
    // get a reference to the cross-browser style object and make sure the object exists
    var allObject = getObject(objectId);
    if(allObject) {
			allObject.style.visibility = newVisibility;
			return true;
    } else {
			//we couldn't find the object, so we can't change its visibility
			return false;
    }
}
function getObject(objectId) {
    // cross-browser function to get an object's style object given its id
    if(document.getElementById && document.getElementById(objectId)) {
			// W3C DOM
			return document.getElementById(objectId);
    } else if (document.all && document.all(objectId)) {
			// MSIE 4 DOM
			return document.all(objectId);
    } else if (document.layers && document.layers[objectId]) {
			// NN 4 DOM.. note: this won't find nested layers
			return document.layers[objectId]; // this may return the style, but we want object
    } else {
			return false;
    }
}
