function nav(id,active,showSub) {
	var obj = document.getElementById(id)
	var ext = obj.src.substr((obj.src.length-3),obj.src.length)
	if(!active) {
		if(obj.src.indexOf('__o.'+ext)==-1){
			obj.src=obj.src.replace('.'+ext,'__o.'+ext)
		}else{
			obj.src=obj.src.replace('__o.'+ext,'.'+ext)
		}
	}
	if(document.getElementById('sub'+id)){
		if(showSub){
			ypSlideOutMenu.showMenu(id);
		}else{
			ypSlideOutMenu.hideMenu(id);
		}
	}
}

ypSlideOutMenu.parentMenuShow = function(thisId,otherId,state,isCurrentMain) {
	if (state == 'off') {
		if (isCurrentMain == 1) {
			document.getElementById(otherId).src=menu_states[otherId]['on'];
		} else {
			document.getElementById(otherId).src=menu_states[otherId][state];
		}
	} else {
		document.getElementById(otherId).src = menu_states[otherId][state];
	}
}