//    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 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('Educator &amp; P Credit Courses',	'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,'-Horticultural Therapy Partnership',		'education_htp.html');
	CreateLink( Opt,10,'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,'Educator &amp; <br />P Credit Courses',						'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 <br /> Partnership',	'education_htp.html');	
	CreateLink( Opt,2,'Annual HT Forum',							'education_htp_htpforum.html');
	CreateLink( Opt,3,'HT Curriculum Guides',						'education_htp_curriculum.html');
	CreateLink( Opt,4,'HT Partner Organizations',					'education_htp_partners.html');
	CreateLink( Opt,5,'Online Forum & Links<br />',					'education_htp_links.html');
	CreateLink( Opt,6,'Back to Education &amp; Resources Menu',		'education.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 />" ); }
}

