// JavaScript Document

	_button_default=null;
	_isMenuActive=false;
	_active_button=null;
	imageOK=true;

	function Button_on(){
		if (!imageOK) return;
		if (_active_button!=null)
			_active_button.off();
		_isMenuActive=true;
		_active_button=this;
		document[this.name].src=this.onImage.src;
	}
	
	function _defButtonOn(){
		if (_button_default==null)
			return;
			
		_button_default.on();
	}
	
	
	function Button_off(){
		if (!imageOK) return;
		_isMenuActive=false;
		_active_button=null;
				
		document[this.name].src=this.offImage.src;
		timerID=setTimeout('if (!_isMenuActive) _defButtonOn()', 1);
	}
		
	function setDefaultButton(button){
		if (imageOK==false){
			return;
		}
		_button_default=button;
		_active_button=_button_default;
		_button_default.defImage.src=_button_default.onImage.src;
		_button_default.on();
	}
	
	function Button(onName, offName, name){
		this.on=Button_on;
		this.off=Button_off;
		if (!document.images){
			imageOK=false;
			return;
		}
		this.nameOn=onName;
		this.nameOff=offName;
		this.name=name;
		this.on=Button_on;
		this.off=Button_off;
		this.onImage=new Image();
		this.onImage.src=this.nameOn;
		this.offImage=new Image();
		this.offImage.src=this.nameOff;
		this.defImage=new Image();
		this.defImage.src=null;
	}

	button_about=new Button("/images/nav_about_over.gif","/images/nav_about.gif","nav_about");
	button_mission=new Button("/images/nav_mission_over.gif","/images/nav_mission.gif","nav_mission");
	button_programs=new Button("/images/nav_programs_over.gif","/images/nav_programs.gif","nav_programs");
	button_events=new Button("/images/nav_events_over.gif","/images/nav_events.gif","nav_events");
	button_help=new Button("/images/nav_help_over.gif","/images/nav_help.gif","nav_help");
	button_contact=new Button("/images/nav_contact_over.gif","/images/nav_contact.gif","nav_contact");
	
	

