//    JavaScript Document
//

//
//  MENU TOP BAR: 
//  to show the main menu    		ShowMenu( Popup-active )
//	to create a PopUpMenu use 		CreatePopUp( namepopup, imagen-in-menu, imagen-rollover, popup-height-pixels, page-to-link )
//	to create an option on popup 	CreateOption( label-in-popup, page-to-link )
//	to finish the PopUp creation	ClosePopUp()
//
//  Indications:  - Popup-Active value 1 to 4.
//				  - Images MUST be located in  images/naveg/
//                - Images MUST be : 108 pixels x 30 pixels.
//                - if more options are created you must adjust popup-height-pixels to fit new size
//

function ShowMenu(MenuActive){

var Button1Pict = 'hsny_menu_about_white.gif';
var Button2Pict = 'hsny_menu_education_white.gif';
var Button3Pict = 'hsny_menu_programs_white.gif';
var Button4Pict = 'hsny_menu_support_white.gif';

switch(MenuActive){
	case 1: Button1Pict='hsny_menu_about_green.gif'; break;
	case 2: Button2Pict='hsny_menu_education_green.gif'; break;
	case 3: Button3Pict='hsny_menu_programs_green.gif'; break;
	case 4: Button4Pict='hsny_menu_support_green.gif'; break;
}

CreatePopUp('menu_about',Button1Pict,'hsny_menu_about_pink.gif','150','about.html' );
CreateOption('MISSION',							'about_mission.html');
CreateOption('HISTORY',							'about_history.html');
CreateOption('VISIT US',						'about_visit.html');
CreateOption('CONTACT US',						'about_contact.html');
CreateOption('WORK WITH US',					'about_workopportunities.html');
CreateOption('OUR PARTNERS',					'about_partners.html');
CreateOption('STAFF &amp; BOARD',				'about_staff.html');
ClosePopUp();

CreatePopUp('menu_education',Button2Pict,'hsny_menu_education_pink.gif','190','education.html' );
CreateOption('HORTICULTURE &amp; PLANT CARE',	'education_horticulture.html');
CreateOption('THE HORT LIBRARY',				'education_library.html');		
CreateOption('BUILD A GARDEN',					'education_buildagarden.html');
CreateOption('CHILDREN&prime;S EDUCATION',		'education_appleseed.html');
CreateOption('VOCATIONAL TRAINING &amp; HORTICULTURAL THERAPY',		'education_greenhouse_greenteam.html');		 
CreateOption('SPACE RENTAL',					'education_spacerental.html');
ClosePopUp();

CreatePopUp('menu_programs',Button3Pict,'hsny_menu_programs_pink.gif','150','programs.html' );
CreateOption('EVENTS CALENDAR',					'programs_eventscalendar.html');		
CreateOption('WORKSHOPS&#44; <br />TALKS &amp; TOURS',	'programs_workshops_talks_tours.html');	
CreateOption('EXHIBITIONS',						'programs_exhibitions.html');				
CreateOption('FILM SERIES',						'programs_films.html');				
CreateOption('FOR KIDS',						'programs_children.html');				
CreateOption('CLASSES &amp; TRAINING',						'programs_training.html');				
ClosePopUp();

CreatePopUp('menu_support',Button4Pict,'hsny_menu_support_pink.gif','120','support.html' );
CreateOption('BECOME A MEMBER',					'support_becomeamember.html');
CreateOption('PARTNERSHIPS',					'about_partners.html');		
CreateOption('SUPPORT THE HORT',				'support_contribute.html');		
CreateOption('SPECIAL EVENTS',					'support_specialevents.html');		 
CreateOption('VOLUNTEER',						'support_volunteer.html');		 
ClosePopUp();

}


//
//  MENU SIDE BAR for pages: 
//	to show menu side in ABOUT pages 		ShowMenuAbout( Option-selected )
//	to show menu side in RESOURCES pages	ShowMenuResources( Option-selected )
//	to show menu side in PROGRAMS pages		ShowMenuPrograms( Option-selected )
//	to show menu side in supportpages 		ShowMenuSupport( Option-selected )
//
//	to create an option 	CreateLink( Always-is-"Opt", option-number, label, page-to-link )
//

function ShowMenuAbout(Opt){
	CreateLink( Opt,1,'<u>ABOUT US</u><br/>',							'about.html');	
	CreateLink( Opt,2,'MISSION',						'about_mission.html');
	CreateLink( Opt,3,'HISTORY',						'about_history.html');	
	CreateLink( Opt,4,'VISIT US',						'about_visit.html');	
	CreateLink( Opt,5,'CONTACT US',						'about_contact.html');	
	CreateLink( Opt,6,'WORK OPPORTUNITIES',				'about_workopportunities.html');	
	CreateLink( Opt,7,'OUR PARTNERS',					'about_partners.html');	
	CreateLink( Opt,8,'STAFF &amp; BOARD',				'about_staff.html');	
}

function ShowMenuEducation(Opt){
	CreateLink( Opt,1,'<u>EDUCATION &amp; SERVICES</u><br/>',		'education.html');	
	CreateLink( Opt,2,'HORTICULTURE <br />&amp; PLANT CARE',	'education_horticulture.html');
	CreateLink( Opt,3,'THE HORT LIBRARY',				'education_library.html');
	CreateLink( Opt,4,'BUILD A GARDEN',					'education_buildagarden.html');
	CreateLink( Opt,5,'CHILDREN&prime;S EDUCATION',		'education_appleseed.html');
	CreateLink( Opt,6,'VOCATIONAL TRAINING &amp; HORTICULTURAL THERAPY',	'education_greenhouse_greenteam.html');
	CreateLink( Opt,7,'-GreenHouse at Rikers',					'education_greenhouse.html');
	CreateLink( Opt,8,'-GreenTeam Work Force',					'education_greenteam.html');
	CreateLink( Opt,9,'SPACE RENTAL',					'education_spacerental.html');

}

function ShowMenuPrograms(Opt){
	CreateLink( Opt,1,'<u>CALENDAR &amp; PROGRAMS</u><br/>',	'programs.html');	
	CreateLink( Opt,2,'EVENTS CALENDAR',				'programs_eventscalendar.html');
	CreateLink( Opt,3,'WORKSHOPS&#44; <br />TALKS &amp; TOURS',	'programs_workshops_talks_tours.html');
	CreateLink( Opt,4,'EXHIBITIONS',					'programs_exhibitions.html');
	CreateLink( Opt,5,'FILM SERIES',					'programs_films.html');
	CreateLink( Opt,6,'FOR KIDS',						'programs_children.html');
	CreateLink( Opt,7,'CLASSES &amp; TRAINING',						'programs_training.html');
}

function ShowMenuSupport(Opt){
	CreateLink( Opt,1,'<u>MEMBERSHIP &amp; SUPPORT</u><br/>',	'support.html');	
	CreateLink( Opt,2,'BECOME A MEMBER',				'support_becomeamember.html');
	CreateLink( Opt,3,'PARTNERSHIPS',					'about_partners.html');
	CreateLink( Opt,4,'SUPPORT THE HORT',				'support_contribute.html');
	CreateLink( Opt,5,'SPECIAL EVENTS',					'support_specialevents.html');
	CreateLink( Opt,6,'- Important Books &amp; <font color="#FFFFFF">-</font>&nbsp;Authors',
														'support_specialevents_booksandauthors.html');
	CreateLink( Opt,7,'- Annual Fall Luncheon',			'support_specialevents_fallluncheon.html');
	CreateLink( Opt,8,'- Flowers &amp; Design Gala',	'support_specialevents_flowersdesigngala.html');
	CreateLink( Opt,9,'VOLUNTEER',						'support_volunteer.html');
}

function ShowMenuHTP(Opt){
	CreateLink( Opt,1,'HORTICULTURAL THERAPY <br /> PARTNERSHIP',	'resources_htp_index.html');	
	CreateLink( Opt,2,'WHAT IS HORTICULTURAL THERAPY?',	'support_becomeamember.html');
	CreateLink( Opt,3,'CURRICULUM',						'support_contribute.html');
	CreateLink( Opt,4,'URBAN GREEN SPACES',				'support_specialevents.html');
	CreateLink( Opt,5,'LIVING ROOFS',					'support_specialevents_booksandauthors.html');		
	CreateLink( Opt,6,'GROWING FOOD',					'support_specialevents_fallluncheon.html');
	CreateLink( Opt,7,'OUTDOOR CLASSROOMS',			'support_specialevents_flowersdesigngala.html');
	CreateLink( Opt,8,'PRISONS &amp; JAILS',			'support_volunteer.html');
	CreateLink( Opt,9,'PARTNER LIST &amp; LINKS',		'support_volunteer.html');
}


//
//  From this point DON"T MODIFY
//
//  Menu functions:    CreatePopup();  CreateOption(); ClosePopUp();  
//

function CreatePopUp( PopName, ImgButton, ImgHover, PopHeight, PopLink  ){
	var StHtm = "";
	StHtm = StHtm + "<div id='"+PopName+"' Style='text-align:left;background-image:url(images/naveg/"+ImgButton+")' ";
	StHtm = StHtm + " onmouseover=\"jCss('"+PopName+"','height','"+PopHeight+"px');";
	StHtm = StHtm + "jCss('"+PopName+"','backgroundImage','url(images/naveg/"+ImgHover+")');\" ";
	StHtm = StHtm + " onmouseout =\"jCss('"+PopName+"','height','32px');";
	StHtm = StHtm + "jCss('"+PopName+"','backgroundImage','url(images/naveg/"+ImgButton+")');\" >"; 
	StHtm = StHtm + "<a class='menu_button' href='"+PopLink+"' >&nbsp;</a>";
	document.write ( StHtm );
	//jCss(PopName,'backgroundImage','url(images/naveg/'+ImgButton+')' );
}

function CreateOption( OptionName, OptionLink ){
	document.write ("<a class='menu_drop' href='"+OptionLink+"'>"+OptionName+"</a>" );
}

function ClosePopUp(){
	document.write ("</div>" );
}

function CreateLink(Ax,Ao, Aname, Alink){
	if (Ax==Ao) { document.write ( Aname+"<br />"); }
		   else { document.write ( "<a href='"+Alink+"'>"+Aname+"</a><br />" ); }
}

