// path

//var mypath = "http://www.craig.co.za/"
var mypath = "http://www.gracefieldschool.co.uk/"

// USAGE: Menu(a, b, c, [d], [e])
//	a   : internal menu identifier. must be "root" for the main menus.
//	b   : font
//	c   : font color
//	d   : imag path
//	[e] : optional (used by submenus). x-position of submenu
//	[f] : optional (used by submenus). y-position of submenu

var oRoot = new Menu( "root", "arial, verdana", "#ffcf31" );

// USAGE: addMenuItem(a, b, c, [d])
//	a   : menu item text
//	b   : open Submenu (True or False)
//	c   : link href
//	[d] : optional. this must contain the internal menu identifier of the submenu to display

oRoot.addMenuItem( "Home", false, mypath + "index.htm" );
oRoot.addMenuItem( "Headmistress Message", true, mypath + "pages/01_headmistressmessage.htm", "hm_sub" );
oRoot.addMenuItem( "Mission Statement", true, mypath + "pages/02_mission.htm", "ms_sub" );
oRoot.addMenuItem( "Curriculum", true, mypath + "pages/03_curriculum.htm", "curr_sub" );
oRoot.addMenuItem( "Fees", true, mypath + "pages/04_fees.htm", "fees_sub" );
oRoot.addMenuItem( "Staff", false, mypath + "pages/05_staff.htm" );
oRoot.addMenuItem( "Classes", false, mypath + "pages/06_classes.htm" );
oRoot.addMenuItem( "School Facilities", false, mypath + "/pages/07_facilities.htm" );
oRoot.addMenuItem( "Extra Curricular Clubs", false, mypath + "pages/08_curricular_clubs.htm" );
oRoot.addMenuItem( "Term Dates", false, mypath + "pages/09_calendar.htm" );
oRoot.addMenuItem( "Newsletters", false, mypath + "pages/10_newsletters.htm" );
oRoot.addMenuItem( "School Uniform", false, mypath + "pages/11_uniform.htm" );
oRoot.addMenuItem( "Links", false, mypath + "pages/12_links.htm" );
oRoot.addMenuItem( "Photo Album", false, mypath + "pages/13_album.htm" );

var oSubMenus = new Array();

// Headmistress Message
oSubMenus[ 0 ] = new Menu( "hm_sub", "arial, verdana", "#ffcf31", 182, 180 );
oSubMenus[ 0 ].addMenuItem( "About Us", false, mypath + "pages/01a_aboutus.htm" );
oSubMenus[ 0 ].addMenuItem( "Contact Us", false, mypath + "pages/01b_contact.htm" );
oSubMenus[ 0 ].addMenuItem( "Gracefield Alumni", false, mypath + "pages/01c_alumni.htm" );
oSubMenus[ 0 ].addMenuItem( "Vacancies", false, mypath + "pages/01d_vacancies.htm" );

oSubMenus[ 1 ] = new Menu( "ms_sub", "arial, verdana", "#ffcf31", 182, 210 );
oSubMenus[ 1 ].addMenuItem( "Home-School Agreement", false, mypath + "pages/02a_homeschool_agree.htm" );
oSubMenus[ 1 ].addMenuItem( "Behaviour and Discipline", false, mypath + "pages/02b_behaviour.htm" );

oSubMenus[ 2 ] = new Menu( "curr_sub", "arial, verdana", "#ffcf31", 182, 170 );
oSubMenus[ 2 ].addMenuItem( "Literacy", false, mypath + "pages/03a_literacy.htm" );
oSubMenus[ 2 ].addMenuItem( "Mathematics", false, mypath + "pages/03b_mathematics.htm" );
oSubMenus[ 2 ].addMenuItem( "Science", false, mypath + "pages/03c_science.htm" );
oSubMenus[ 2 ].addMenuItem( "ICT", false, mypath + "pages/03d_ict.htm" );
oSubMenus[ 2 ].addMenuItem( "Music", false, mypath + "pages/03e_music.htm" );
oSubMenus[ 2 ].addMenuItem( "Homework", false, mypath + "pages/03f_homework.htm" );
oSubMenus[ 2 ].addMenuItem( "Geography", false, mypath + "pages/03g_geography.htm" );
oSubMenus[ 2 ].addMenuItem( "History", false, mypath + "pages/03h_history.htm" );
oSubMenus[ 2 ].addMenuItem( "Art", false, mypath + "pages/03i_art.htm" );
oSubMenus[ 2 ].addMenuItem( "DT", false, mypath + "pages/03j_dt.htm" );
oSubMenus[ 2 ].addMenuItem( "RE", false, mypath + "pages/03k_re.htm" );
oSubMenus[ 2 ].addMenuItem( "PSHE", false, mypath + "pages/03l_pshe.htm" );
oSubMenus[ 2 ].addMenuItem( "PE", false, mypath + "pages/03m_pe.htm" );
oSubMenus[ 2 ].addMenuItem( "Reception", false, mypath + "pages/03n_receptionyear.htm" );

oSubMenus[ 3 ] = new Menu( "fees_sub", "arial, verdana", "#ffcf31", 182, 270 );
oSubMenus[ 3 ].addMenuItem( "FAQs Parents", false, mypath + "pages/04a_faq_parents.htm" );
oSubMenus[ 3 ].addMenuItem( "FAQs Children", false, mypath + "pages/04b_faq_kids.htm" );
oSubMenus[ 3 ].addMenuItem( "Learning Support", false, mypath + "pages/04c_learning_support.htm" );

// root menu is placed on the page, where we want it.
function drawSubMenus() {
	for ( idx = 0; idx < oSubMenus.length; idx++ ) {
		oSubMenus[ idx ].drawMenu();
	}
}

// preload mouseover images
preloadImages();