function nowyouseeit(x)
{
	if(x.style.display == "")
	{
		x.style.display = "none";
	}
	else
	{
		x.style.display = "";
	}
}

function drawsubmenu(a, b, c, e, f)
{
	for(x=0; x<c.length; x++, a+=(b+2))
	{
		if(c[x].submenu != null)
		{
			document.write("<span id='" + c[x].localname + "' class='" + f + "' style='color:white; position: absolute; left: 152; display: none;top:" + a + "' onmouseover='this.style.display=&quot;&quot;' onmouseout='nowyouseeit(this)'>");
			for(t=0; t<c[x].submenu.length; t++)
			{
				temparray = c[x].submenu[t].split("::");
				document.write("<a class='" + e + "' href='" + temparray[1] + "'>" + temparray[0] + "</a><br>");
			}
			document.write("</span>");
		}
	}
	thezero += a;
}

menuvals = new Array;

function toolbar(localname, text, link, submenu)
{
	this.localname = localname;
	this.text = text;
	this.link = link;
	this.submenu = submenu;
}


menuvals = new Array(new toolbar('curriculum', 'Curriculum', 'http://www.acrsd.net/curriculum.html', new Array('Curriculum Guides::curriculum.html', 'Hoosac Valley High School::http://hvhs.acrsd.net/curriculum.html', 'Adams Memorial Middle School::http://amms.acrsd.net/curriculum.html', 'Cheshire Elementary School::http://ces.acrsd.net/curriculum.html', 'C.T. Plunkett Elementary School::http://ctp.acrsd.net/curriculum.html')), new toolbar('events', 'School Events', 'http://www.acrsd.net/events.html', new Array('Events Main Page::events.html', 'Hoosac Valley High School::http://hvhs.acrsd.net/events.html', 'Adams Memorial Middle School::http://amms.acrsd.net/events.html', 'Cheshire Elementary School::http://ces.acrsd.net/events.html', 'C.T. Plunkett Elementary School::http://ctp.acrsd.net/events.html')), new toolbar('activities', 'Activities', 'http://www.acrsd.net/activities.html', new Array('Activities Main Page::activities.html', 'Hoosac Valley High School::http://hvhs.acrsd.net/activities.html', 'Adams Memorial Middle School::http://amms.acrsd.net/activities.html', 'Cheshire Elementary School::http://ces.acrsd.net/activities.html', 'C.T. Plunkett Elementary School::http://ctp.acrsd.net/activities.html')), new toolbar('calendar', 'School Calendars', 'http://www.acrsd.net/calendar.html', new Array('Calendar Main Page::calendar.html', 'Hoosac Valley High School::http://hvhs.acrsd.net/calendarofevents.html', 'Adams Memorial Middle School::http://amms.acrsd.net/calendar.html', 'Cheshire Elementary School::http://ces.acrsd.net/calendar.html', 'C.T. Plunkett Elementary School::http://ctp.acrsd.net/calendar.html')), new toolbar('parents', 'For Parents', 'http://www.acrsd.net/parents.html', new Array('ACRSD Parents Welcome Page::parents.html', 'Letter from the Superintendent::lettertoparents.html',  'Hoosac Valley High School::http://hvhs.acrsd.net/parents.html', 'Adams Memorial Middle School::http://amms.acrsd.net/parents.html', 'Cheshire Elementary School::http://ces.acrsd.net/parents.html', 'C.T. Plunkett Elementary School::http://ctp.acrsd.net/parents.html', 'Health and Human Services Resources::humanservices.html')), new toolbar('acrsdpolicy', 'ACRSD Policies', 'http://www.acrsd.net/policies.html', new Array('ACRSD Policy Main Page::policies.html')), new toolbar('nclb', 'No Child Left Behind', 'http://www.acrsd.net/nclb.html', new Array('NCLB Main Page::nclb.html')), new toolbar('StrategicD', 'ACRSD Strategic Plan', 'http://www.acrsd.net/strategic.html', new Array('ACRSD Strategic Plan: <i>Strategic Direction</i> Main Page::strategic.html',  'ACRSD Strategic Plan: <i>Strategic Direction</i> Document::http://www.acrsd.net/sdplan.html', 'ACRSD Strategic Plan: Status::http://www.acrsd.net/sdstatus.html')), new toolbar('ACEtext', 'ACE Partnership', 'http://www.acrsd.net/ace/index.html', new Array('ACE Partnership Main Page::http://www.acrsd.net/ace/index.html')), new toolbar('webmail', 'ACRSD Webmail', 'https://mail.acrsd.net/OWA', new Array('ACRSD Webmail::https://mail.acrsd.net/OWA')), new toolbar('technology', 'Technology', 'http://www.acrsd.net/technology.html'), new toolbar('etools', 'ACRSD eTools', 'http://etools.acrsd.net'));

//if you get a x.style.display runtime error, it means there are duplicate menu items.

lowermenu = new Array(new toolbar('jobpostings', '<center>Job Openings</center>', 'jobpostings.html'), new toolbar('busroutes', '<center>2011-2012 Bus Routes</center>', 'http://www.acrsd.net/2011-2012BusRoutes.pdf'), new toolbar('buildingcommittee', '<center>Building Project Information</center>', 'buildingproject.html'), new toolbar('phone', '<center>Phone Directory</center>', 'files/phone.pdf'), new toolbar('lunchmenus', '<center>Lunch Menus</center>', 'lunch.html'), new toolbar('swine flu', '<center>Swine Flu Fact Sheet from Mass Dept of Public Health</center>', '04-27-09 Swine Flu Fact Sheet FINAL.pdf'), new toolbar('localweather', '<center>Live Webcam and Weather</center>', 'http://ctp.acrsd.net/weather.html'), new toolbar('contactinfo', '<center>Contact Information</center>', 'contact.html'), new toolbar('calendar2', '<center>District Calendar</center>', 'calendar.html'), new toolbar('Pols', '<center>District Policies</center>', 'policies.html', new Array('Section A: Foundations and Basic Commitments::pola.htm', 'Section B: Board Governance and Operations::polb.htm', 'Section C: General School Administration::polc.htm', 'Section D: Fiscal Management::pold.htm', 'Section E: Support Services::pole.htm', 'Section F: Facilities Development::polf.htm', 'Section G: Personnel::polg.htm', 'Section H: Negotiations::polh.htm', 'Section I: Instruction::poli.htm', 'Section J: Students::polj.htm', 'Section K: Community Relations::polk.htm', 'Section L: Community Agency Relations::poll.htm')));

thezero = 0;
drawsubmenu(106, 20, menuvals, 'submenu', 'subcolor');
drawsubmenu((thezero+18), 18, lowermenu, 'lowersubmenu', 'lowersubcolor');
