	/***********************************************
* http://www.peelschools.org SIDE NAVIGATION
* Last updated March 13th, 2006
* Written By Yang Wang
***********************************************/

/******************************************************************************************

* Side Navigation Documentation
* This file will generate HTML code that creates a side bar using the information 
* in the array according to the URL of the document that contains the side bar.
*  
* To insert the side navigation into a page:
* write
* <SCRIPT language="javaScript" src="/scripts/side_bar1.js"></SCRIPT>
* in the head section
* go to the place you want to insert the menu
* paste in the following code:
* <script language="javascript">
* make_menu()
* </script>
*
* Array Structure
* list[1][0]="" ====> Title of the item
* list[1][1]="" ====> Address of the item
* list[1][2]="" ====> DIV ID of the item, the ID used by the code to expand the sublists
* list[1][3]="" ====> Parent ID of the item, if the item is a sublist item of
*					  "Contact Directory", then put in the DIV ID of "Contact Directory"
*					  which is "contact"
* 
* To append items after a list or sublist:
* just create one more item in the array with the appropriate DIV ID and Parent ID
* 
* To insert items ino the middle of a list or sublist
* Create the item to be inserted
* Use the function: list.splice(6,0,list[15])
* 6 -> where to insert the array
* 0 -> number of elements to be deleted from the index number
* list[15] -> the element to be added at the index
* this will move list[15] to the 6th position and shifts everything else after 6 down
* 
* To switch the order of two sublists 
* use the switchOrder function:
* switchOrder(19,28) will change list[19] to list[28]
* and list[28] to list[19]
* 
* Try not to insert to use the above code to switch item order or insert items in the middle of
* lists, these changes will not be shown in the code, and it would be too hard to manage with
* too many of those changes, it is recommended to change the order on the array directly
* to keep everything clean.

******************************************************************************************/

var enablepersist="off" //Enable saving state of content structure using session cookies? (on/off)
var memoryduration="7" //persistence in # of days

var contractsymbol='minus.gif' //Path to image to represent contract state.
var expandsymbol='plus.gif' //Path to image to represent expand state.
var expand=false
var pageIndex=0
var expand_id=""
var myLocation=document.URL
if(myLocation.charAt(myLocation.length-1)=='/')
{
	myLocation=myLocation+"index.htm"
	
}
var myLocation2=myLocation
var siteRoot="http://mdx.peelschools.org/"


myLocation=myLocation.replace("facts/facts/", "facts/justthefacts/")
myLocation=myLocation.replace("parents/facts/", "parents/parentsfact/")
myLocation=myLocation.replace(siteRoot, "")
var DirList=myLocation.split("/")
var locationLevel=DirList.length
//var root=null
var root=DirList[locationLevel-2]
if(DirList.length>2)
{
//	root=DirList[DirList.length-3]
	root=DirList[0]
} else if(DirList.length==1)
{
	root=DirList[0]

}
if(root==null)
{
//	alert("hi")
	root="none"
}
var root_item
var list_done=false

//var level=locationLevel-1
//document.write("Location: " + myLocation+"</br>")
//document.write("LocationLevel: " + locationLevel+"</br>")
//document.write("Root: " + root+"</br>")


for (i=0;i<DirList.length;i++)
//{
//	document.write(i+ ") " + DirList[i]+"</br>")
//}

var list_count=150
var list=new Array(list_count)
for (i=0;i<list_count;i++)
{
	list[i]=new Array(3)
}
/*
list[1][0]=""
list[1][1]=""
list[1][2]=""
list[1][3]="goals"
*/


list[0][0]="Get The Facts"
list[0][1]="/facts/index.htm"
list[0][2]="facts"
list[0][3]="none"

list[1][0]="Overview"
list[1][1]="/facts/index.htm"
list[1][2]="overview"
list[1][3]="facts"

list[2][0]="It's All About Learning"
list[2][1]="/facts/learning/learn.htm"
list[2][2]="learning"
list[2][3]="facts"

list[3][0]="Contact Directory"
list[3][1]="/facts/contact/contact.htm"
list[3][2]="contact"
list[3][3]="facts"

	list[4][0]="Director's Office"
	list[4][1]="/facts/contact/directorsoffice.htm"
	list[4][2]="directorsoffice"
	list[4][3]="contact"
	
	list[5][0]="Senior Administration"
	list[5][1]="/facts/contact/senioradmin.htm"
	list[5][2]="senioradmin"
	list[5][3]="contact"
	
	list[6][0]="Superintendents"
	list[6][1]="/facts/contact/superintendents.htm"
	list[6][2]="superintendents"
	list[6][3]="contact"
	
	list[7][0]="Responsibilities"
	list[7][1]="/facts/contact/respon.htm"
	list[7][2]="responsibilities"
	list[7][3]="contact"

list[8][0]="Schools"
list[8][1]="/schools/index.htm"
list[8][2]="schools"
list[8][3]="facts"

list[9][0]="Goals"
list[9][1]="/facts/goals/goals.htm"
list[9][2]="goals"
list[9][3]="facts"

	
	list[10][0]="High Expectations"
	list[10][1]="/facts/goals/highexpectations.htm"
	list[10][2]="highexpectations"
	list[10][3]="goals"
	
	list[11][0]="Positive Relations"
	list[11][1]="/facts/goals/encourage.htm"
	list[11][2]="encourage"
	list[11][3]="goals"
	
	list[12][0]="Effective Resource"
	list[12][1]="/facts/goals/resources.htm"
	list[12][2]="resources"
	list[12][3]="goals"
	
	list[13][0]="School Success planning"
	list[13][1]="/facts/goals/maximize.htm"
	list[13][2]="ssp"
	list[13][3]="goals"
	
	list[14][0]="Learn and Work"
	list[14][1]="/facts/goals/ensure.htm"
	list[14][2]="ensure"
	list[14][3]="goals"
	
	list[15][0]="Achieve Equity"
	list[15][1]="/facts/goals/achieve.htm"
	list[15][2]="achieve"
	list[15][3]="goals"
	
	list[16][0]="Use Technology"
	list[16][1]="/facts/goals/technology.htm"
	list[16][2]="technology"
	list[16][3]="goals"
	
	list[17][0]="Attract"
	list[17][1]="/facts/goals/attract.htm"
	list[17][2]="attract"
	list[17][3]="goals"

list[18][0]="Just the Facts"
list[18][1]="/facts/facts/facts.htm"
list[18][2]="justthefacts"
list[18][3]="facts"

	list[19][0]="Community"
	list[19][1]="/facts/facts/community.htm"
	list[19][2]="community"
	list[19][3]="justthefacts"
	
	list[20][0]="Student in Peel"
	list[20][1]="/facts/facts/costofed.htm"
	list[20][2]="costofed"
	list[20][3]="justthefacts"
	
	list[21][0]="French Immersion"
	list[21][1]="/facts/facts/french.htm"
	list[21][2]="french"
	list[21][3]="justthefacts"
	
	list[22][0]="Special Education"
	list[22][1]="/facts/facts/special.htm"
	list[22][2]="special"
	list[22][3]="justthefacts"

	list[23][0]="Education Centre"
	list[23][1]="/facts/facts/edcentre.htm"
	list[23][2]="edcentre"
	list[23][3]="justthefacts"

	list[24][0]="Joint Transportation"
	list[24][1]="/facts/facts/joint.htm"
	list[24][2]="joint"
	list[24][3]="justthefacts"

	list[25][0]="Transportation"
	list[25][1]="/facts/facts/joint.htm"
	list[25][2]="special"
	list[25][3]="joint"
	
	list[26][0]="Custodians"
	list[26][1]="/facts/facts/custodian.htm"
	list[26][2]="custodians"
	list[26][3]="justthefacts"
	
	list[27][0]="Student First"
	list[27][1]="/facts/facts/students.htm"
	list[27][2]="studentsfirst"
	list[27][3]="justthefacts"

	list[28][0]="Archives"
	list[28][1]="/facts/facts/archive.htm"
	list[28][2]="archives"
	list[28][3]="justthefacts"
	
list[29][0]="Annual Report"
list[29][1]="/facts/report/report.htm"
list[29][2]="annualreport"
list[29][3]="facts"

list[30][0]="Questions? Concerns?"
list[30][1]="/facts/questions/qandc.htm"
list[30][2]="questionsandconcerns"
list[30][3]="facts"

list[31][0]="Board Highlights"
list[31][1]="/trustee/high/high.htm"
list[31][2]="boardhighlights"
list[31][3]="facts"


list[32][0]="Meeting Agendas"
list[32][1]="/trustee/agenda/agenda.htm"
list[32][2]="meetingagendas"
list[32][3]="facts"

list[33][0]="Centre for Education and Learning"
list[33][1]="http://www.tcet.com/"
list[33][2]="tcef"
list[33][3]="facts"

list[34][0]="Parents Boost Learning"
list[34][1]="/parents/index.htm"
list[34][2]="parents"
list[34][3]="none"

list[35][0]="Overview"
list[35][1]="/parents/index.htm"
list[35][2]="parents-overview"
list[35][3]="parents"

list[36][0]="Activities"
list[36][1]="/parents/activities/act.htm"
list[36][2]="activities"
list[36][3]="parents"

list[37][0]="Parent Fact Sheets"
list[37][1]="/parents/facts/facts.htm"
list[37][2]="parentsfact"
list[37][3]="parents"

	list[38][0]="4 and 5-year-olds"
	list[38][1]="/parents/facts/kinder.htm"
	list[38][2]="4and5year"
	list[38][3]="parentsfact"
	
	list[39][0]="ESL"
	list[39][1]="/parents/facts/esl.htm"
	list[39][2]="esl"
	list[39][3]="parentsfact"

	list[40][0]="French Immersion"
	list[40][1]="/parents/facts/french.htm"
	list[40][2]="french-immersion-parents"
	list[40][3]="parentsfact"
	
	list[41][0]="Special Education Programs"
	list[41][1]="/parents/facts/special.htm"
	list[41][2]="special-education-parents"
	list[41][3]="parentsfact"
	
	list[42][0]="Special Education Plan"
	list[42][1]="/parents/facts/spec-edplan.htm"
	list[42][2]="special-education-plan"
	list[42][3]="parentsfact"	

	list[43][0]="Measuring Student Success"
	list[43][1]="/parents/facts/measure.htm"
	list[43][2]="measure-student-success"
	list[43][3]="parentsfact"
	
	list[44][0]="New curriculum"
	list[44][1]="/parents/facts/newcurr.htm"
	list[44][2]="new-curriculum"
	list[44][3]="parentsfact"
	
	list[45][0]="Ride the School Bus"
	list[45][1]="/parents/facts/busride.htm"
	list[45][2]="busride"
	list[45][3]="parentsfact"
	
	list[46][0]="Spelling is important"
	list[46][1]="/parents/facts/spelling.htm"
	list[46][2]="spelling"
	list[46][3]="parentsfact"
	
	list[47][0]="Wellness"
	list[47][1]="/parents/facts/wellness.htm"
	list[47][2]="wellness"
	list[47][3]="parentsfact"
	
	list[48][0]="New Math Curriculum"
	list[48][1]="/parents/facts/mathcurr.htm"
	list[48][2]="mathcurr"
	list[48][3]="parentsfact"
	
	list[49][0]="Immunization"
	list[49][1]="/parents/facts/immune.htm"
	list[49][2]="immune"
	list[49][3]="parentsfact"

	list[50][0]="Science & Technology"
	list[50][1]="/parents/facts/sciecurr.htm"
	list[50][2]="sciecurr"
	list[50][3]="parentsfact"
	
	list[51][0]="What is KIP?"
	list[51][1]="/parents/facts/kip.htm"
	list[51][2]="kip"
	list[51][3]="parentsfact"

list[52][0]="Parent Tip Sheets"
list[52][1]="/parents/tips/tips.htm"
list[52][2]="tips"
list[52][3]="parents"

	list[53][0]="Tip Sheets 2005"
	list[53][1]="/parents/2005num-index.htm"
	list[53][2]="literacy-tip-sheets-2005"
	list[53][3]="tips"
	
	list[54][0]="Tip Sheets 2004"
	list[54][1]="/parents/2004num-index.htm"
	list[54][2]="literacy-tip-sheets-2004"
	list[54][3]="tips"
	
	list[55][0]="Tip Sheets 2003"
	list[55][1]="/parents/tips/num-index.htm"
	list[55][2]="literacy-tip-sheets-2003"
	list[55][3]="tips"

	list[56][0]="Tip Sheets 2002"
	list[56][1]="/parents/tips/lit-index.htm"
	list[56][2]="literacy-tip-sheets-2002"
	list[56][3]="tips"
	
	list[57][0]="Improve Math Skills"
	list[57][1]="/parents/tips/math.htm"
	list[57][2]="improve-math-skills"
	list[57][3]="tips"
	
	list[58][0]="Prepare for School"
	list[58][1]="/parents/tips/trans-to-k.htm"
	list[58][2]="trans-to-k"
	list[58][3]="tips"
	
	list[59][0]="Family Literacy"
	list[59][1]="/parents/tips/literacy.htm"
	list[59][2]="family-literacy"
	list[59][3]="tips"
	
	list[60][0]="Postsecondary Education Choice"
	list[60][1]="/parents/tips/howto.htm"
	list[60][2]="influence-postsecondary-education"
	list[60][3]="tips"

	list[61][0]="Family Life"
	list[61][1]="/parents/tips/family.htm"
	list[61][2]="family-life"
	list[61][3]="tips"
	
	list[62][0]="Achieving Success"
	list[62][1]="/parents/tips/success.htm"
	list[62][2]="achieving-success"
	list[62][3]="tips"
	
	list[63][0]="Have a Good Summer"
	list[63][1]="/parents/tips/goodsum.htm"
	list[63][2]="good-summer"
	list[63][3]="tips"

	list[64][0]="Help Girls Improve Self-Esteem"
	list[64][1]="/parents/tips/girls.htm"
	list[64][2]="girls-self-esteem"
	list[64][3]="tips"

	list[65][0]="Keep Your Teen Interested in School"
	list[65][1]="/parents/tips/keep.htm"
	list[65][2]="keep-interested"
	list[65][3]="tips"
	
	list[66][0]="Use Study Groups"
	list[66][1]="/parents/tips/study.htm"
	list[66][2]="study-groups"
	list[66][3]="tips"
	
	list[67][0]="Summer Activities"
	list[67][1]="/parents/tips/summact.htm"
	list[67][2]="Summer Activities"
	list[67][3]="tips"
	
	list[68][0]="Stay Connected with Your Teen"
	list[68][1]="/parents/tips/10ways.htm"
	list[68][2]="10ways"
	list[68][3]="tips"
	
	list[69][0]="Keeping children safe on the internet"
	list[69][1]="/parents/tips/internet.htm"
	list[69][2]="keep-chilren-safe-on-internet"
	list[69][3]="tips"
	
	list[70][0]="Family Vacations"
	list[70][1]="/parents/tips/vacation.htm"
	list[70][2]="family-vacation"
	list[70][3]="tips"
	
	list[71][0]="Quality Summer Program"
	list[71][1]="/parents/tips/simple.htm"
	list[71][2]="quality-summer-program"
	list[71][3]="tips"
	
	list[72][0]="Mentoring"
	list[72][1]="/student/mentor/mentor.htm"
	list[72][2]="mentoring-o"
	list[72][3]="parents"
	
list[73][0]="Meet Your Trustees"
list[73][1]="/trustee"
list[73][2]="trustee"
list[73][3]="none"	

list[74][0]="Overview"
list[74][1]="/trustee/index.htm"
list[74][2]="overview-trustee"
list[74][3]="trustee"	

list[75][0]="What's My Ward?"
list[75][1]="/trustee/ward/ward.htm"
list[75][2]="whatsmyward"
list[75][3]="trustee"	

list[76][0]="Meeting Agendas"
list[76][1]="/trustee/agenda/agenda.htm"
list[76][2]="meeting-agendas"
list[76][3]="trustee"	

	list[77][0]="Instructional Programs/ Curriculum Committee"
	list[77][1]="/trustee/agenda/ipcc.htm"
	list[77][2]="instructionalprogramsa"
	list[77][3]="meeting-agendas"	
	
	list[78][0]="Physical Planning and Building Committee"
	list[78][1]="/trustee/agenda/ppbc.htm"
	list[78][2]="physicalplanningandbulidingcommitee"
	list[78][3]="meeting-agendas"	
	
	list[79][0]="Special Education Advisory Committee"
	list[79][1]="/trustee/agenda/seac.htm"
	list[79][2]="specialedadvisory"
	list[79][3]="meeting-agendas"	
		
	list[80][0]="Subscribe"
	list[80][1]="http://subscribe.peel.edu.on.ca/newsletter.nsf/Subscription"
	list[80][2]="subscribe"
	list[80][3]="meeting-agendas"


list[81][0]="Board Highlights"
list[81][1]="/trustee/high/high.htm"
list[81][2]="boardhighlights"
list[81][3]="trustee"

list[82][0]="Meeting Schedule"
list[82][1]="/trustee/schedule/schedule.htm"
list[82][2]="meetingschedule"
list[82][3]="trustee"

list[83][0]="Trustee Roles"
list[83][1]="/trustee/role/role.htm"
list[83][2]="trusteeroles"
list[83][3]="trustee"

list[84][0]="Boards Working Together"
list[84][1]="/trustee/together/together.htm"
list[84][2]="boardworkingtogether"
list[84][3]="trustee"

list[85][0]="Links"
list[85][1]="/trustee/links/links.htm"
list[85][2]="links"
list[85][3]="trustee"

list[86][0]="Schools"
list[86][1]="/"
list[86][2]="schools"
list[86][3]="none"

list[87][0]="Search Our Schools"
list[87][1]="/schools/index.htm"
list[87][2]="search-schools"
list[87][3]="schools"

list[88][0]="By Community"
list[88][1]="/schools/c_schls.htm"
list[88][2]="by-community"
list[88][3]="schools"

	list[89][0]="Brampton"
	list[89][1]="/schools/c_schls.htm#brampton"
	list[89][2]="schools-brampton"
	list[89][3]="by-community"
	
	list[90][0]="Caledon"
	list[90][1]="/schools/c_schls.htm#caledon"
	list[90][2]="schools-caledon"
	list[90][3]="by-community"
	
	list[91][0]="Mississauga"
	list[91][1]="/schools/c_schls.htm#mississauga"
	list[91][2]="schools-mississauga"
	list[91][3]="by-community"

list[92][0]="By Name"
list[92][1]="/schools/n_schls.htm"
list[92][2]="by-name"
list[92][3]="schools"

	list[93][0]="Elementary"
	list[93][1]="/schools/n_schls.htm#elementary"
	list[93][2]="schools-elementary"
	list[93][3]="by-name"

	list[94][0]="Secondary"
	list[94][1]="/schools/n_schls.htm#secondary"
	list[94][2]="schools-secondary"
	list[94][3]="by-name"
	
list[95][0]="By Ward"
list[95][1]="/schools/w_schls.htm"
list[95][2]="by-ward"
list[95][3]="schools"

list[96][0]="French Immersion"
list[96][1]="/schools/fr_schls.htm"
list[96][2]="french-immersion"
list[96][3]="schools"

	list[97][0]="Elementary"
	list[97][1]="/schools/fr_schls.htm#elementary"
	list[97][2]="french-elementary"
	list[97][3]="french-immersion"

	list[98][0]="Secondary"
	list[98][1]="/schools/fr_schls.htm#secondary"
	list[98][2]="french-secondary"
	list[98][3]="french-immersion"
	
	list[99][0]="Extended"
	list[99][1]="/schools/fr_schls.htm#extended"
	list[99][2]="french-extended"
	list[99][3]="french-immersion"
	
	list[100][0]="Extended Elementary"
	list[100][1]="/schools/fr_schls.htm#ex_element"
	list[100][2]="french-extended"
	list[100][3]="french-immersion"

	list[101][0]="Extended Secondary"
	list[101][1]="/schools/fr_schls.htm#ex_secondary"
	list[101][2]="french-extended"
	list[101][3]="french-immersion"
	
list[102][0]="School Councils"
list[102][1]="/councils"
list[102][2]="councils"
list[102][3]="none"	

list[103][0]="Every Voice Counts"
list[103][1]="/councils/index.htm"
list[103][2]="council-overview"
list[103][3]="councils"	

list[104][0]="School Councils In Peel"
list[104][1]="#"
list[104][2]="councils-in-peel"
list[104][3]="councils"	

list[105][0]="Fact Sheets"
list[105][1]="/councils/facts/facts.htm"
list[105][2]="councils-facts"
list[105][3]="councils"	

	list[106][0]="Run for Election"
	list[106][1]="/councils/facts/run.htm"
	list[106][2]="run-for-election"
	list[106][3]="councils-facts"	
	
	list[107][0]="The Election Process"
	list[107][1]="/councils/facts/elect.htm"
	list[107][2]="the-election-process"
	list[107][3]="councils-facts"	
	
	list[108][0]="Results of Survey"
	list[108][1]="/councils/facts/survey.htm"
	list[108][2]="results-of-survey"
	list[108][3]="councils-facts"	
	
list[109][0]="School Council Policy"
list[109][1]="/councils/policy/policy.htm"
list[109][2]="councils-policy"
list[109][3]="councils"	
	
	list[110][0]="Peel Board Policy"
	list[110][1]="/councils/policy/brd.htm"
	list[110][2]="peel-board-policy"
	list[110][3]="councils-policy"	
	
	list[111][0]="Ministry Policy"
	list[111][1]="/councils/policy/min.htm"
	list[111][2]="ministry-policy"
	list[111][3]="councils-policy"	
	
list[112][0]="Calendar"
list[112][1]="/calendar/"
list[112][2]="calendar"
list[112][3]="none"	

list[113][0]="School Calendar"
list[113][1]="/calendar/index.htm"
list[113][2]="school-calendar"
list[113][3]="calendar"	

list[114][0]="Media Desk"
list[114][1]="/media"
list[114][2]="media"
list[114][3]="none"	

list[115][0]="Your source for education news "
list[115][1]="/media/index.htm"
list[115][2]="sourceforeducation"
list[115][3]="media"	


list[116][0]="New Releases"
list[116][1]="/media/news2002/news5.htm"
list[116][2]="newreleases"
list[116][3]="media"	

list[117][0]="Quick Facts"
list[117][1]="/facts/index.htm"
list[117][2]="quickfacts"
list[117][3]="media"

list[118][0]="Board Highlights"
list[118][1]="/trustee/high/high.htm"
list[118][2]="boardhighlights"
list[118][3]="media"

list[119][0]="School Year"
list[119][1]="/calendar/index.htm#year"
list[119][2]="schoolyear"
list[119][3]="calendar"	

list[120][0]="Teacher Training"
list[120][1]="/calendar/index.htm#training"
list[120][2]="teachertraningdays"
list[120][3]="calendar"	

list[121][0]="P.A. Elementary"
list[121][1]="/calendar/index.htm#elementary"
list[121][2]="paelementary"
list[121][3]="calendar"	

list[122][0]="P.A. Secondary"
list[122][1]="/calendar/index.htm#secondary"
list[122][2]="pasecondary"
list[122][3]="calendar"	

list[123][0]="EQAO"
list[123][1]="/calendar/index.htm#eqao"
list[123][2]="eqao"
list[123][3]="calendar"	

list[124][0]="Secondary Examinations"
list[124][1]="/calendar/index.htm#x_second"
list[124][2]="secexam"
list[124][3]="calendar"	

list[125][0]="Secondary Semester 1"
list[125][1]="/calendar/index.htm#one"
list[125][2]="secsem1"
list[125][3]="calendar"	

list[126][0]="Secondary Semester 2"
list[126][1]="/calendar/index.htm#two"
list[126][2]="secsem2"
list[126][3]="calendar"	

list[127][0]="Overview"
list[127][1]="/partner/index.htm"
list[127][2]="overview-partner"
list[127][3]="partner"	

list[128][0]="Partnership Policy"
list[128][1]="/partner/policy/policy.htm"
list[128][2]="partnershippolicy"
list[128][3]="partner"	

list[129][0]="Partnership Tip Sheets"
list[129][1]="/partner/tipsheet/tips.htm"
list[129][2]="partnertips"
list[129][3]="partner"	

list[130][0]="Partnership List"
list[130][1]="#"
list[130][2]="partnerlist"
list[130][3]="partner"	

list[131][0]="Work in Peel"
list[131][1]="/work/index.htm"
list[131][2]="work-overview"
list[131][3]="work"	

list[132][0]="What We Offer"
list[132][1]="/work/offer/offer.htm"
list[132][2]="whatweoffer"
list[132][3]="work"	

list[133][0]="Job Board"
list[133][1]="/work/board/board.htm"
list[133][2]="jobboard"
list[133][3]="work"	

list[134][0]="How to Apply"
list[134][1]="/work/how/how.htm"
list[134][2]="applyforajob"
list[134][3]="work"	

list[135][0]="Career Categories"
list[135][1]="/work/category/cate.htm"
list[135][2]="careercategories"
list[135][3]="work"	

list[136][0]="Principles we Value"
list[136][1]="/work/principles/princ.htm"
list[136][2]="valuedprinciples"
list[136][3]="work"	

function switchOrder(index1, index2)
{
	tempArr=new Array(4)
	for(i=0;i<4;i++)
	{
		tempArr[i]=list[index1][i]
	}
	list.splice(index1,1,list[index2])
	list.splice(index2,1,tempArr)
}

var myLoc2=myLocation2

//document.write(document.URL)
for(i=0;i<list.length;i++)
{
	if(myLocation2==list[i][1])
	{
		pageIndex = i
	} 
}




/////No need to edit beyond here //////////////////////////

function make_menu()
{
	
	var flag
	
	//table title image (changes image title depending on section being shown)
	document.write("<table width=\"172\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td width=\"25\">&nbsp;</td><td width=\"147\">")
				   
	if(DirList[0]=="facts")
		{
			document.write("<img src=\"/images/titles/sidenav_facts.gif\" alt=\"Get the Facts\" />")
		} 
	
	else if (DirList[0]=="parents")
		{
			document.write("<img src=\"/images/titles/sidenav_parents.gif\" alt=\"Parents Boost Learning\" />")
		}
	else if (DirList[0]=="trustee")
		{
			document.write("<img src=\"/images/titles/sidenav_trustee.gif\" alt=\"Meet Your Trustee\" />")
		}
		else if (DirList[0]=="councils")
		{
			document.write("<img src=\"/images/titles/sidenav_councils.gif\" alt=\"School Councils\" />")
		}
		else if (DirList[0]=="media")
		{
			document.write("<img src=\"/images/titles/sidenav_media.gif\" alt=\"Media Desk\" />")
		}		
		else if (DirList[0]=="calendar")
		{
			document.write("<img src=\"/images/titles/sidenav_calendar.gif\" alt=\"Calendar\" />")
		}	
		else if (DirList[0]=="schools")
		{
			document.write("<img src=\"/images/titles/sidenav_schools.gif\" alt=\"Schools\" />")
		}	
		
		else if (DirList[0]=="partner")
		{
			document.write("<img src=\"/images/titles/sidenav_partner.gif\" alt=\"Be A Partner\" />")
		}	
		else if (DirList[0]=="work")
		{
			document.write("<img src=\"/images/titles/sidenav_work.gif\" alt=\"Work In Peel\" />")
		}	
	document.write("</td></tr>")
	//end table title image
	
	
	for (i=0;i<list.length;i++)
	{
		if (list[i][3]==root)
		{
		
			if(list[pageIndex][3]==list[i][2])
			{
				expand=true
			}
					if(expand_id=="" && list[pageIndex][3]==list[i][2])
					{
						expand_id=list[i][2]
					}
			
			document.write("<tr><td align=\"right\" valign=\"top\">")
			document.write("<div class=\"listcontent\">")
		
			if(list[i][1]==myLocation2 || (list[i][3]==list[pageIndex][2] &&  list[pageIndex][2]!=root ))
				{	
					document.write("<img src=\"/images/list_images/arrow_big_pink.gif\" hspace=\"5\"/>")
				} 
			
			else 
				{
					document.write("<img src=\"/images/list_images/dot_pink.gif\" hspace=\"5\" vspace=\"5\" />")
				}
			
			
			document.write("</div></td><td><a class=\"nav\" href=\"" + list[i][1] + "\">")
			document.write(list[i][0]+"</a></td></tr>")
			
			document.write("<tr><td></td><td>")
			document.write("<div id=\"" + list[i][2] + "\" class=\"switchcontent\">")

			document.write("<table width=\"147\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" >")
			flag = false
			for (j=0;j<list.length;j++)
			{

				
				if(list[j][3]==list[i][2])
				{

					
					if(expand_id=="" && list[pageIndex][2]==list[i][2])
					{
						expand_id=list[i][2]
					}
					
					if( flag == false)
						{
							document.write("<tr><td colspan=\"2\"><img src=\"/images/spacer.gif\" width=\"1\" height=\"5\" /></td></tr>")
							flag = true;
							
						}
				
					if(list[pageIndex][2]==list[i][2])
					{

						expand=true
					}
					document.write("<tr><td align=\"right\" valign=\"top\">")
					if(list[j][1]==myLocation2 )
						{
							document.write("<img src=\"/images/list_images/arrow_big_pink.gif\" hspace=\"5\"/>")
						} 
					else 
						{
							document.write("<img src=\"/images/list_images/dot_green.gif\" hspace=\"5\" vspace=\"5\"/>")
						}
					//document.write("<img src=\"/images/list_images/dot_yellow.gif\" hspace=\"5\"/>")
					document.write("</td><td><a class=\"nav\" href=\"" + list[j][1] + "\">")
					document.write(list[j][0])
					document.write("</a></td></tr>")
					
				}

			}
			
			if( flag == true)
				document.write("<tr><td colspan=\"2\"><img src=\"/images/spacer.gif\" width=\"1\" height=\"5\" /></td></tr>")
			document.write("</table></div>")

			document.write("</td></tr>")

		}
	}
	
	
	document.write("</table>")
} //end of function

function getElementbyClass(rootobj, classname){
var temparray=new Array()
var inc=0
var rootlength=rootobj.length
for (i=0; i<rootlength; i++){
if (rootobj[i].className==classname)
temparray[inc++]=rootobj[i]
}
return temparray
}

function sweeptoggle(ec){
var inc=0
while (ccollect[inc]){
ccollect[inc].style.display=(ec=="contract")? "none" : ""
inc++
}
revivestatus()
}


function expandcontent(curobj, cid){
if (ccollect.length>0){
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="none")? "none" : ""
curobj.src=(document.getElementById(cid).style.display=="none")? expandsymbol : contractsymbol
}
}

function revivecontent(){
selectedItem=getselectedItem()
selectedComponents=selectedItem.split("|")
for (i=0; i<selectedComponents.length-1; i++)
document.getElementById(selectedComponents[i]).style.display="none"
}

function revivestatus(){
var inc=0
while (statecollect[inc]){
if (ccollect[inc].style.display=="none")
statecollect[inc].src=expandsymbol
else
statecollect[inc].src=contractsymbol
inc++
}
}

function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function getselectedItem(){
if (get_cookie(window.location.pathname) != ""){
selectedItem=get_cookie(window.location.pathname)
return selectedItem
}
else
return ""
}

function saveswitchstate(){
var inc=0, selectedItem=""
while (ccollect[inc]){
if (ccollect[inc].style.display=="none")
selectedItem+=ccollect[inc].id+"|"
inc++
}
if (get_cookie(window.location.pathname)!=selectedItem){ //only update cookie if current states differ from cookie's
var expireDate = new Date()
expireDate.setDate(expireDate.getDate()+parseInt(memoryduration))
document.cookie = window.location.pathname+"="+selectedItem+";path=/;expires=" + expireDate.toGMTString()
}
}

function do_onload(){
uniqueidn=window.location.pathname+"firsttimeload"
var alltags=document.all? document.all : document.getElementsByTagName("*")
ccollect=getElementbyClass(alltags, "switchcontent")
statecollect=getElementbyClass(alltags, "showstate")
if (enablepersist=="on" && get_cookie(window.location.pathname)!="" && ccollect.length>0)
revivecontent()
if (ccollect.length>0 && statecollect.length>0)
revivestatus()
sweeptoggle('contract')
//var openContent=list[pageIndex][2]
//var openRoot=DirList[DirList.length-2]
//document.write(openContent)
//expandcontent(this,openContent)
//document.write(openRoot)
/*if(expand==true)
{
expandcontent(this,openRoot)
}*/
try
{
		if(expand_id=="")
		{
			
			expandcontent(this,DirList[1])
		}
		else 
		{
		expandcontent(this,expand_id)
		}
}
catch (err)
{
}
//expandcontent(this,DirList[DirList.length-2])

/*	if(document.getElementById(root)!=null)
	{
		expandcontent(this,root)
		document.write(root)
	} else
	{
		document.write("<p>no such item " +root+"</br></p>")
		document.write(document.getElementById(root))
	}
*/

}

if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload

if (enablepersist=="on" && document.getElementById)
window.onunload=saveswitchstate
