<!--

	// Prepare and print all JS menus

	//////// !!!!!! SET UP NEW MENU LINKS HERE !!!!!! ////////

	//////// !!!!!! If you add new links, don't forget to also add them to main pages for non-javascript users,
	//////// !!!!!! such as http://www.domain.com/reception/index.php

	function printLayers() {

		// Set up links for Reception

		reception = new Array();
		reception[0] = new Array	('Governors\' Annual Report','/reception/governorsreport');
		reception[1] = new Array	('College Policies','/reception/policies');
		reception[2] = new Array	('Current Vacancies','/reception/vacancies');
		reception[3] = new Array	('Business Links &amp; Associates','/reception/businesslinks');
		reception[4] = new Array	('OFSTED Report','/reception/ofsted');

		// Set up links for Prospectus

		prospectus = new Array();
		prospectus[0] = new Array	('Message from the Principal','/prospectus/welcome');
		prospectus[1] = new Array	('Excellence &amp; Achievement','/prospectus/achievement');
		prospectus[2] = new Array	('College Standards','/prospectus/statement');
		prospectus[3] = new Array	('College Facilities','/prospectus/facilities');
		prospectus[4] = new Array	('Extra Curricular Activities','/prospectus/extracurricular');
		prospectus[5] = new Array	('Pastoral Care &amp; Welfare','/prospectus/care');

		// Set up links for Subjects

		subjects= new Array();
		subjects[0] = new Array		('Curriculum','http://hcce.hamilton.leicester.sch.uk/');
		subjects[1] = new Array		('Special Educational Needs','/subjects/specialneeds');
		subjects[2] = new Array		('Careers Information','/subjects/careers');
		subjects[3] = new Array		('Years 7 - 11 Tutor Teams','/subjects/yeargroups');
		subjects[4] = new Array		('Year 7 Transition','/subjects/transition');

		// Set up links for Resources

		resources= new Array();
		resources[0] = new Array	('Parents Gateway','/resources/parentsgateway');
		resources[1] = new Array	('Moodle Virtual Learning','/resources/moodle');
		resources[2] = new Array	('Useful Links','/resources/links');



		///////////////////////////////////////////////////////////////////////








		//document.write('<h2 class="novisible">Website Sub-menus</h2>');

		printMenu(1,112,'Reception',reception); // Print Reception menu
		printMenu(2,235,'Prospectus',prospectus); // Print Prospectus menu
		printMenu(3,358,'Subjects',subjects); // Print Subjects menu
		printMenu(4,481,'Resources',resources); // Print Resources menu
	}



	// Print layer menu for IE and new Netscape
	// "menu" is the id of the menu we want to print
	// "position" is the left-hand position of the menu in pixels
	// "heading" is the heading of this menu
	// "content" is a 2D array of content ("Page Name" and "Document Name")

	function printMenu(menu,position,heading,content) {

		document.write('<div class="dropdownmenu" id="menu' + menu + '" style="position:absolute;left:' + position + 'px;top:29px;visibility:hidden;">');
		document.write('<hr class="novisible">');
		document.write('<table width="293" cellpadding="0" cellspacing="0" border="0">');
		document.write('	<tr>');
		document.write('		<td width="293" colspan="10"><a href="#" onMouseOver="hideAll();"><img src="/images/pixel.gif" width="293" height="50" alt="" border="0"></a></td>');
		document.write('	</tr>');
		document.write('	<tr>');
		document.write('		<td width="30"><a href="#" onMouseOver="hideAll();"><img src="/images/pixel.gif" width="19" height="25" alt="" border="0"></a></td>');
		document.write('		<td width="1" class="dropdownouter"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="1" class="dropdownmenu' + menu + '"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');

		document.write('		<td width="122" class="dropdownname"><span class="dropdownname' + menu + '">' + heading + '</span></td>');

		document.write('		<td width="1" class="dropdownmenu' + menu + '"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="1" class="dropdownouter"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="105"><a href="#" onMouseOver="hideAll();"><img src="/images/pixel.gif" width="105" height="25" alt="" border="0"></a></td>');
		document.write('		<td width="1"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="1"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="30"><a href="#" onMouseOver="hideAll();"><img src="/images/pixel.gif" width="21" height="25" alt="" border="0"></a></td>');
		document.write('	</tr>');
		document.write('	<tr>');
		document.write('		<td width="30"><a href="#" onMouseOver="hideAll();"><img src="/images/pixel.gif" width="19" height="1" alt="" border="0"></a></td>');
		document.write('		<td width="1" class="dropdownouter"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="1" class="dropdownmenu' + menu + '"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="122" class="dropdownbody"><img src="/images/pixel.gif" width="122" height="1" alt=""></td>');
		document.write('		<td width="1" class="dropdownmenu' + menu + '"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="1" class="dropdownouter"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="105" class="dropdownouter"><img src="/images/pixel.gif" width="105" height="1" alt=""></td>');
		document.write('		<td width="1" class="dropdownouter"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="1" class="dropdownouter"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="30"><a href="#" onMouseOver="hideAll();"><img src="/images/pixel.gif" width="21" height="1" alt="" border="0"></a></td>');
		document.write('	</tr>');
		document.write('	<tr>');
		document.write('		<td width="30"><a href="#" onMouseOver="hideAll();"><img src="/images/pixel.gif" width="19" height="1" alt="" border="0"></a></td>');
		document.write('		<td width="1" class="dropdownouter"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="1" class="dropdownmenu' + menu + '"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="122" class="dropdownbody"><img src="/images/pixel.gif" width="122" height="1" alt=""></td>');
		document.write('		<td width="1" class="dropdownmenu' + menu + '"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="1" class="dropdownmenu' + menu + '"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="105" class="dropdownmenu' + menu + '"><img src="/images/pixel.gif" width="105" height="1" alt=""></td>');
		document.write('		<td width="1" class="dropdownmenu' + menu + '"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="1" class="dropdownouter"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="30"><a href="#" onMouseOver="hideAll();"><img src="/images/pixel.gif" width="21" height="1" alt="" border="0"></a></td>');
		document.write('	</tr>');
		document.write('	<tr>');
		document.write('		<td width="30" onMouseOver="hideAll();"><a href="#" ><img src="/images/pixel.gif" width="30" height="30" alt="" border="0"></a></td>');
		document.write('		<td width="1" class="dropdownouter"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="1" class="dropdownmenu' + menu + '"><img src="/images/pixel.gif" width="1" height="24" alt=""></td>');
		document.write('		<td width="229" colspan="4" class="dropdownbody"><p class="dropdownlinkstop">&nbsp;</p>');

		for (var count = 0; count < content.length; count++) {

			document.write('				<p class="dropdownlinks"><a href="' + content[count][1] + '" class="dropdownlink' + menu + '" onMouseOver=\'window.status="' + content[count][0].replace(/'/g,"") + '"; return true;\' onMouseOut="window.status=\'\'; return true">' + content[count][0] + '</a></p>');
		}

		document.write('			<p class="dropdownlinksbottom">&nbsp;</p>');
		document.write('		</td>');
		document.write('		<td width="1" class="dropdownmenu' + menu + '"><img src="/images/pixel.gif" width="1" height="24" alt=""></td>');
		document.write('		<td width="1" class="dropdownouter"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="30" onMouseOver="hideAll();"><a href="#" onMouseOver="hideAll();"><img src="/images/pixel.gif" width="30" height="30" alt="" border="0"></a></td>');
		document.write('	</tr>');
		document.write('	<tr>');
		document.write('		<td width="30"><a href="#" onMouseOver="hideAll();"><img src="/images/pixel.gif" width="19" height="1" alt="" border="0"></a></td>');
		document.write('		<td width="1" class="dropdownouter"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="231" colspan="6" class="dropdownmenu' + menu + '"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="1" class="dropdownouter"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="30"><a href="#" onMouseOver="hideAll();"><img src="/images/pixel.gif" width="21" height="1" alt="" border="0"></a></td>');
		document.write('	</tr>');
		document.write('	<tr>');
		document.write('		<td width="30"><a href="#" onMouseOver="hideAll();"><img src="/images/pixel.gif" width="19" height="1" alt="" border="0"></a></td>');
		document.write('		<td width="233" colspan="8" class="dropdownouter"><img src="/images/pixel.gif" width="1" height="1" alt=""></td>');
		document.write('		<td width="30"><a href="#" onMouseOver="hideAll();"><img src="/images/pixel.gif" width="21" height="1" alt="" border="0"></a></td>');
		document.write('	</tr>');
		document.write('	<tr>');
		document.write('		<td width="293" colspan="10"><a href="#" onMouseOver="hideAll();"><img src="/images/pixel.gif" width="293" height="50" alt="" border="0"></a></td>');
		document.write('	</tr>');
		document.write('</table>');
		document.write('</div>');

	}



	// Show a JS menu

	function showIt(menu) {

		// Test to see if the menu has been printed yet

		if (testMenus() == false) {
			return false;
		}

		hideAll(); // Hide all menus first

		// IE
		if (document.all) {
			if (document.all[menu]) { document.all[menu].style.visibility = "visible"; } // Show the menu
		}

		// Netscape
		else if (document.getElementById) {
			if (document.getElementById(menu)) { document.getElementById(menu).style.visibility = "visible"; } // Show the menu
		}
	}



	// Hide all JS menus

	function hideAll() {

		// Test to see if the menu has been printed yet

		if (testMenus() == false) {
			return false;
		}

		// IE
		if (document.all) {
			if (document.all.menu1) { document.all.menu1.style.visibility = "hidden"; }
			if (document.all.menu2) { document.all.menu2.style.visibility = "hidden"; }
			if (document.all.menu3) { document.all.menu3.style.visibility = "hidden"; }
			if (document.all.menu4) { document.all.menu4.style.visibility = "hidden"; }
		}

		// Netscape
		else if (document.getElementById) {
			if (document.getElementById('menu1')) { document.getElementById('menu1').style.visibility = "hidden"; }
			if (document.getElementById('menu2')) { document.getElementById('menu2').style.visibility = "hidden"; }
			if (document.getElementById('menu3')) { document.getElementById('menu3').style.visibility = "hidden"; }
			if (document.getElementById('menu4')) { document.getElementById('menu4').style.visibility = "hidden"; }
		}
	}


	// Function to test if the dropdown menus were successfully printed out to the browser by the JavaScript

	function testMenus() {

		if (document.getElementById('bottomnav')) {
			return true;
		}
		else {
			//alert('Nav not loaded yet');
			return false;
		}
	}



	// JavaScript to print out email address and prevent email harvesters

	function printEmail(user) {

		var domain = 'hamilton.leicester.sch.uk';

		document.write('<a href="mailto:');

		document.write(user);
		document.write('@');
		document.write(domain);

		document.write('">');

		document.write(user);
		document.write('@');
		document.write(domain);

		document.write('</a>');

	}


	function toggleVisible(section) {

		if (document.getElementById) {
			var sectionID = document.getElementById("section_" + section);
			if (sectionID.style.display == 'block') {
				sectionID.style.display = 'none';
				if (document.images) {
					document["bullet_" + section].src = '/images/plus.gif';
				}
			}
			else {
				sectionID.style.display = 'block';
				if (document.images) {
					document["bullet_" + section].src = '/images/minus.gif';
				}
			}
		}

	}

	function hideAllBitesize() {

		// Hide all bitesize elements on subject pages

   		divElems = document.getElementsByTagName("div"); 
    
		for (i=0; i<divElems.length; i++) { 

			if (divElems[i].className == 'bitesize') { 
				divElems[i].style.display = 'none'; 
			} 
		}
	}




//-->
