BLANK_IMAGE = '/images/b.gif';

/* ***********************

Coding Notes:

- This script employs inheritance of attributes: formatting applied to one item applies to that item and all subitems, unless specified differently by the individual subitems.
- Follow coding syntax carefully.  Any mistake will result in the menu failing to load.

Coding Attributes:

- pos:[x,y] - an absolute x,y location for the item.
- itemoff:[x,y] - a relative x,y location for the item based on the previous item's location.
- leveloff:[x,y] - a relative x,y location for the sub level based on the previous item's location.
- size:[x,y] - height, width of the current item.
- style:XXXX - appearance and behaviour of the current item (currently only Imaged or Standard are defined)

Changing Item Size:

1. In the code: section of the item, following the item label, use the format:{}, command to enter coding attributes.  Set the size:[] attribute to the desired item height, width.
   eg. code:"Really Really Long Label", format:{size:[48,140]},
2. If the resized item has a submenu, the subitems will inherit the size change.  In the sub[] attributes section ({...} before the first code: section) set the size:[] attribute to the original height, width
   eg. {size:[24,140]},
3. The item that follows the resized item must have it's offset changed to account for the larger size of the previous item.  In the code: section of the next item, following the item label, format the item using the itemoff:[] attribute.  Set the itemoff:[] attribute to the desired item height, width minus one.
   eg. format:{itemoff:[47,0]}
4. If the item following the resized item has a submenu, the subitems will inherit the offset change.  In the sub[] attributes section ({...} before the first code: section) set the itemoff:[] attribute to the original offset.
   eg. {itemoff[23,0]}

*********************** */

var STYLE = {
	border:1,			// item's border width, pixels; zero means "none"
	shadow:1,			// item's shadow size, pixels; zero means "none"
	color:{
		border:"#ff6600",	// color of the item border, if any
		shadow:"#333333",	// color of the item shadow, if any
		bgON:"#ffbd83",		// background color for the items
		bgOVER:"#fff5d8"	// background color for the item which is under mouse right now
	},
	css:{
		ON:"clsCMOn",		// CSS class for items
		OVER:"clsCMOver"	// CSS class for item which is under mouse
	}
};

var IMAGED_STYLE = {
	border:0,			// item's border width, pixels; zero means "none"
	shadow:0,			// item's shadow size, pixels; zero means "none"
	color:{
		border:"",	// color of the item border, if any
		shadow:"",	// color of the item shadow, if any
		bgON:"",		// background color for the items
		bgOVER:""	// background color for the item which is under mouse right now
	},
	css:{
		ON:"clsCMOnImaged",	// CSS class for items
		OVER:"clsCMOverImaged"	// CSS class  for item which is under mouse
	}
};

var MENU_ITEMS = [
	{pos:[3,86], clickToActivate:true, itemoff:[0,142], leveloff:[24,0], style:IMAGED_STYLE, size:[24,140], levelFilters:[ 'progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=0.25,wipestyle=0,motion=forward,duration=0.5)', 'progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=0.25,wipestyle=0,motion=forward,duration=0.5)' ]},
	{code:"<img src='/images/arr_or_dn_sm.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Events",
		sub:[
			{itemoff:[23,0], leveloff:[27,0], style:STYLE},
			{code:"Anne Portnuff Events", url:"/news/anneportnuff/index.html"
			},
			{code:"<img src='/images/arr_or_rt.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Athletes of the Month", format:{size:[48,140]},
				sub:[
					{leveloff:[0,142], size:[24,140]},
					{code:"September", url:"/news/athletes/september/september.html"},
					{code:"October", url:"/news/athletes/october/october.html"},
					{code:"November", url:"/news/athletes/november/november.html"},
					{code:"December", url:"/news/athletes/december/december.html"},
					{code:"January", url:"/news/athletes/january/january.html"},
					{code:"February", url:"/news/athletes/february/february.html"},
					{code:"March", url:"/news/athletes/march/march.html"},
					{code:"April", url:"/news/athletes/april/april.html"},
					{code:"May", url:"/news/athletes/may/may.html"},
					{code:"June", url:"/news/athletes/june/june.html"}
				]
			},
			{code:"Awards Night", url:"/news/awardsnight/index.html", format:{itemoff:[47,0]}},			
			{code:"Academic Calendar", url:"/news/academiccalendar/index.html"},
			{code:"<img src='/images/arr_or_rt.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Calendar", 
				sub:[
					{leveloff:[0,142], size:[24,140], itemoff:[23,0]},
					{code:"September", url:"/news/calendar/september/september.html"},
					{code:"October", url:"/news/calendar/october/october.html"},
					{code:"November", url:"/news/calendar/november/november.html"},
					{code:"December", url:"/news/calendar/december/december.html"},
					{code:"January", url:"/news/calendar/january/january.pdf"},
					{code:"February", url:"/news/calendar/february/february.pdf"},
					{code:"March", url:"/news/calendar/march/march.pdf"},
					{code:"April", url:"/news/calendar/april/april.html"},
					{code:"May", url:"/news/calendar/may/may.html"},
					{code:"June", url:"/news/calendar/june/june.html"}
				]
			},
			{code:"EuroTrip", url:"/news/trips/index.html"
			},
			{code:"Graduation", url:"/news/grad/index.html"
			},
			{code:"Magazine Campaign", url:"/news/magcampaign/index.html"
			},
			{code:"Musical", url:"/news/musical/index.html"
			},
			{code:"Party Program", url:"/news/party/index.html"
			},
			{code:"<img src='/images/arr_or_rt.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Pep Rallies",
				sub:[
					{leveloff:[0,142]},
					{code:"Homecoming", url:"/news/peprally/homecoming/index.html"},
					{code:"Mag Camp Kick Off", url:"/news/peprally/magcampaign/index.html"},
					{code:"Intro to Sports Teams", url:"/news/peprally/sportsteams/index.html"},
					{code:"Mag Car Give Away", url:"/news/peprally/magcampaign/giveaway.html"}					
				]
			},
			{code:"<img src='/images/arr_or_rt.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Students of the Month", format:{size:[48,140]},
				sub:[
					{leveloff:[0,142], size:[24,140], itemoff:[23,0]},
					{code:"September", url:"/news/students/september/september.html"},
					{code:"October", url:"/news/students/october/october.html"},
					{code:"November", url:"/news/students/november/november.html"},
					{code:"December", url:"/news/students/december/december.html"},
					{code:"January", url:"/news/students/january/january.html"},
					{code:"February", url:"/news/students/february/february.html"},
					{code:"March", url:"/news/students/march/march.html"},
					{code:"April", url:"/news/students/april/april.html"},
					{code:"May", url:"/news/students/may/may.html"},
					{code:"June", url:"/news/students/june/june.html"}
				]
			},
			{code:"Talent Night", url:"/news/talentshow/index.html", format:{itemoff:[47,0]}
			},
			{code:"YRHS Car Show", url:"/news/carshow/index.html", format:{itemoff:[23,0]}
			},
			{code:"YRHS Live", url:"/LIVE/index.html"
			}
		]
	},
	{code:"<img src='/images/arr_or_dn_sm.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Classes",
		sub:[
			{itemoff:[23,0], leveloff:[27,0], style:STYLE},
			{code:"Program Options", url:"/departments/programs.html"
			},
			{code:"Credit Requirements", url:"/departments/requirements.html"
			},
			{code:"Course Catalog", url:"/departments/2008COURSECAT.pdf"
			},
			{code:"Alternative Education", url:"/departments/alted/index.html"
			},
			{code:"English / History", url:"/departments/enghist/index.html"
			},
			{code:"Math / Science", url:"/departments/mathscience/index.html"
			},
			{code:"Music", url:"/departments/music/index.html"
			},
			{code:"Practical & Applied Arts", url:"/departments/practicalappliedarts/index.html", format:{size:[48,140]}
			},
			{code:"Physical Education", url:"/departments/physed/index.html", format:{itemoff:[47,0], size:[24,140]}
			},
			{code:"TRAC", url:"/departments/trac/index.html", format:{itemoff:[23,0]}
			},
			{code:"Work Experience", url:"/departments/workexp/index.html"
			},
			{code:"Distance Learning", url:"/departments/online/index.html"
			}
		]
	},
	{code:"<img src='/images/arr_or_dn_sm.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Activities",
		sub:[
			{itemoff:[23,0], leveloff:[27,0], style:STYLE},
			{code:"Archery", url:"/activities/archery/index.html"
			},
			{code:"Autobody", url:"/activities/autobody/index.html"
			},
			{code:"Chess", url:"/activities/chess/index.html"
			},
			{code:"Debate", url:"/activities/debate/index.html"
			},
			{code:"Drama", url:"/activities/drama/index.html"
			},
			{code:"Guitar", url:"/activities/guitar/index.html"
			},
			{code:"Legacy Courtyard Group", url:"/activities/legacycourtyard/index.html", format:{size:[48,140]}
			},			
			{code:"Marching 100", url:"/activities/marching100/index.html", format:{itemoff:[47,0], size:[24,140]}
			},
			{code:"Newspaper", url:"/activities/newspaper/index.html", format:{itemoff:[23,0]}
			},
			{code:"SADD", url:"/activities/sadd/index.html"
			},
			{code:"<img src='/images/arr_or_rt.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> SRC",
				sub:[
					{leveloff:[0,142]},					
					{code:"Members", url:"/activities/src/members/index.html"},
					{code:"President's Message", url:"/activities/src/message/index.html"}
				]			
			},
			{code:"Theatre Crew", url:"/activities/theatre/index.html"
			},
			{code:"Volunteens", url:"/activities/volunteens/index.html"
			},
			{code:"Webpage", url:"/activities/webpage/index.html"
			},
			{code:"Yearbook", url:"/activities/yearbook/index.html"
			}
		]
	},
	{code:"<img src='/images/arr_or_dn_sm.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Sports",
		sub:[
			{itemoff:[23,0], leveloff:[27,0], style:STYLE},
			{code:"<img src='/images/arr_or_rt.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' />Badminton", 
				sub:[
					{leveloff:[0,142]},
					{code:"Junior Team", url:"/sports/badminton/jr_team/index.html"},				
					{code:"Senior Team", url:"/sports/badminton/sr_team/index.html"}
				]
			},
			{code:"<img src='/images/arr_or_rt.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Basketball",
				sub:[
					{leveloff:[0,142]},
					{code:"Junior Boys", url:"/sports/basketball/jrboys/index.html"},
					{code:"Junior Girls", url:"/sports/basketball/jrgirls/index.html"},
					{code:"Senior Boys", url:"/sports/basketball/srboys/index.html"},					
					{code:"Senior Girls", url:"/sports/basketball/srgirls/index.html"}
				]
			},
			{code:"Cheerleading", url:"/sports/cheerleading/index.html"
			},
			{code:"Curling", url:"/sports/curling/index.html"
			},
			{code:"Cross Country", url:"/sports/crosscountry/index.html"
			},
			{code:"<img src='/images/arr_or_rt.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Football",
				sub:[
					{leveloff:[0,142]},
					{code:"Junior Raiders", url:"/sports/football/junior/index.html"},
					{code:"Senior Raiders", url:"/sports/football/senior/index.html"},				
					{code:"Graduated Players", url:"/sports/football/graduated/index.html"}
				]
			},
			{code:"Golf", url:"/sports/golf/index.html"
			},
			{code:"<img src='/images/arr_or_rt.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Intramural",
				sub:[
					{leveloff:[0,142]},
					{code:"Curling", url:"/sports/intramural/curling/index.html"},					
					{code:"Hockey", url:"/sports/intramural/hockey/index.html"}
				]
			},
			{code:"<img src='/images/arr_or_rt.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Soccer",
				sub:[
					{leveloff:[0,142]},
					{code:"Boys", url:"/sports/soccer/srboys/index.html"},					
					{code:"Girls", url:"/sports/soccer/srgirls/index.html"}
				]
			},
			{code:"Track & Field", url:"/sports/track/index.html"
			},
			{code:"<img src='/images/arr_or_rt.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Volleyball",
				sub:[
					{leveloff:[0,142]},
					{code:"Gr 9 Boys", url:"/sports/volleyball/gr9boys/index.html"},
					{code:"Gr 9 Girls", url:"/sports/volleyball/gr9girls/index.html"},
					{code:"Junior Boys", url:"/sports/volleyball/jrboys/index.html"},
					{code:"Junior Girls", url:"/sports/volleyball/jrgirls/index.html"},
					{code:"Senior Boys", url:"/sports/volleyball/srboys/index.html"},					
					{code:"Senior Girls", url:"/sports/volleyball/srgirls/index.html"}
				]
			},
			{code:"Wrestling", url:"/sports/wrestling/index.html"
			},
			{code:"Sports Coaches", url:"/sports/sportscoaches/index.html"
			},
			{code:"ECDAA", url:"http://www.shsaa.ca/ec/index.php"
			}
		]
	},
	{code:"<img src='/images/arr_or_dn_sm.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Student Services",
		sub:[
			{itemoff:[23,0], leveloff:[27,0], style:STYLE},
			{code:"What We Do", url:"/studentservices/intro/index.html"
			},
			{code:"Staff Contacts", url:"/studentservices/staff/index.html"
			},
			{code:"<img src='/images/arr_or_rt.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Post Secondary",
				sub:[
					{leveloff:[0,142]},
					{code:"Graduation Requirements", url:"/studentservices/postsecondary/gradreq/index.html", format:{size:[48,140]}},
					{code:"Post Secondary Links", url:"/studentservices/postsecondary/postseclinks/index.html", format:{itemoff:[47,0], size:[24,140]}},
					{code:"Student Loans", url:"/studentservices/postsecondary/studentloans/index.html", format:{itemoff:[23,0]}},
					{code:"Scholarships, Bursaries, Awards", url:"/studentservices/postsecondary/scholarships/index.html", format:{size:[48,140]}},
					{code:"SATs and ACTs", url:"/studentservices/postsecondary/sat-act/index.html", format:{itemoff:[47,0], size:[24,140]}},
					{code:"Career Fair", url:"/studentservices/postsecondary/careerfair/index.html", format:{itemoff:[23,0]}},
					{code:"Visiting Universities", url:"/studentservices/postsecondary/universities/index.html"},
					{code:"Grad Information Night", url:"/studentservices/postsecondary/gradinfo/index.html"},
					{code:"Grad Email Archives", url:"/studentservices/postsecondary/grademail/index.html"}
				]
			},
			{code:"<img src='/images/arr_or_rt.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Career Counselling",
				sub:[
					{leveloff:[0,142]},
					{code:"Grad Interviews", url:"/studentservices/careercounselling/gradinterviews/index.html"},
					{code:"Bridges Career Resource", url:"https://accesscdn.bridges.ca/auth/login.do?locale=en_CA#", format:{size:[48,140]}},
					{code:"Career Cruising", url:"http://www.careercruising.com", format:{itemoff:[47,0], size:[24,140]}},
					{code:"Alberta Learning (ALIS)", url:"http://alis.alberta.ca", format:{itemoff:[23,0]}},
					{code:"Sask Learning Website", url:"http://www.sasked.gov.sk.ca"},
					{code:"Youth Apprenticeship", url:"/departments/practicalappliedarts/apprentice.html"},
					{code:"Career Planning Guide", url:"http://www.sasknetwork.gov.sk.ca/"},
					{code:"<img src='/images/arr_or_rt.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Service Canada",
					sub:[
						 {leveloff:[0,142]},
						 {code:"Service Canada", url:"/studentservices/careercounselling/servicecanada/index.html"},
						 {code:"Youth", url:"http://www.youth.gc.ca"},
						 {code:"WorkSafe", url:"http://www.worksafe.gc.ca"},
						 {code:"SchoolNet", url:"http://www.schoolnet.ca"},
						 {code:"JobFutures", url:"http://www.jobfutures.ca"},
						 {code:"CanLearn", url:"http://www.canlearn.ca"},
						 {code:"LabourMarketInfo", url:"http://www.labourmarketinformation.ca"},
						 {code:"JobsEtc", url:"http://www.jobsetc.ca"},
						 {code:"JobBank", url:"http://www.jobbank.gc.ca"},
						 {code:"SaskJobFutures", url:"http://www.saskjobfutures.ca"}
					]
					},
				]
			},
			{code:"Personal Counselling", url:"/studentservices/personalcounselling/index.html"
			},
			{code:"<img src='/images/arr_or_rt.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Out of School Programs", format:{size:[48,140]},
				sub:[
					{leveloff:[0,142], itemoff:[47,0], size:[48,140]},
					{code:"Forum for Young Canadians", url:"http://www.forum.ca"},
					{code:"Encounters with Canada", url:"http://www.ewc-rdc.ca"},
					{code:"Rotary Adventure Programs", url:"/studentservices/outschoolexp/rotary/index.html"},
					{code:"More Information", url:"/studentservices/outschoolexp/moreinfo/index.html", format:{size:[24,140]}}
				]
			}
		]
	},
	{code:"<img src='/images/arr_or_dn_sm.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Resources",
		sub:[
			{itemoff:[23,0], leveloff:[27,0], style:STYLE},
			{code:"<img src='/images/arr_or_rt.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Library",
				sub:[
					{leveloff:[0,142]},
					{code:"Background Info", url:"/ecquine/index.html"},
					{code:"Catalogue", url:"http://gssd.ca/library/Advanced.aspx"},
					{code:"Equipment", url:"/ecquine/equipment/index.html"},
					{code:"Information Resources", url:"/ecquine/inforesources/index.html"},
					{code:"Reference Request", url:"/ecquine/refrequest/index.html"},
					{code:"Resource Center Guide", url:"/ecquine/guide/index.html"},
					{code:"Quine Links", url:"/ecquine/quinelinks/index.html"},
					{code:"Tour", url:"/ecquine/tour/index.html"}
				]
			},
			{code:"Online Periodical Databases", url:"http://www.sasklearning.gov.sk.ca/branches/curr/evergreen/databases.shtml", format:{size:[48,140]}
			},
			{code:"Bridges Career Resource", url:"https://accesscdn.bridges.ca/auth/login.do?locale=en_CA", format:{itemoff:[47,0], size:[48,140]}
			},
			{code:"Career Cruising", url:"http://www.careercruising.com"
			}
		]
	},
	{code:"<img src='/images/arr_or_dn_sm.jpg' align='right' style='margin-top: 5px; margin-right: 4px;' /> Policies",
		sub:[
			{itemoff:[23,0], leveloff:[27,0], style:STYLE},
			{code:"Raider Code of Ethics", url:"/policies/codeofethics/index.html"
			},
			{code:"Appropriate Dress", url:"/policies/dresscode/index.html"
			},
			{code:"Attendance", url:"/policies/attendance/index.html"
			},
			{code:"Bullying", url:"/policies/bullying/index.html"
			},
			{code:"Cell Phones / PLD", url:"/policies/cellphone/index.html"
			},
			{code:"Exam Exemptions", url:"/policies/exemption/index.html"
			},
			{code:"Smoking", url:"/policies/smoking/index.html"
			},
			{code:"Substance Abuse", url:"/policies/subabuse/index.html"
			}
		]
	}
];
