﻿//<script type="text/javascript">
///***********************************************
//* Pop-it menu- © Dynamic Drive (www.dynamicdrive.com)
//* This notice MUST stay intact for legal use
//* Visit http://www.dynamicdrive.com/ for full source code
//***********************************************/

var defaultMenuWidth="200px" //set default menu width.

//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT
var linkset=new Array()

linkset[0]='<a href="uniform.html">Uniform</a>'
linkset[0]+='<a href="School_times.html">School Times</a>'
linkset[0]+='<a href="Calendar.html">Calendar&nbsp;and&nbsp;Events</a>'
linkset[0]+='<a href="School_clubs.html">School&nbsp;clubs</a>'
linkset[0]+='<a href="Newsletters.html">Newsletters</a>'
linkset[0]+='<a href="EmergencyClosure.html">Emergency&nbsp;School&nbsp;Closure</a>'

linkset[1]='<a href="Curriculum.html">Introduction</a></a>'
linkset[1]+='<a href="ELG.html">Early Learning Goals</a></a>'
linkset[1]+='<a href="National_Curriculum.html">National Curriculum</a>'
linkset[1]+='<a href="Formal_Assessments.html">Formal Assessments</a>'
linkset[1]+='<a href="English.html">English</a>'
linkset[1]+='<a href="Mathematics.html">Mathematics</a>'
linkset[1]+='<a href="Science.html">Science</a>'
linkset[1]+='<a href="RE.html">Religious Education</a>'
linkset[1]+='<a href="ICT.html">ICT</a>'
linkset[1]+='<a href="PE.html">Physical Education</a>'
linkset[1]+='<a href="Music.html">Music</a>'
linkset[1]+='<a href="History.html">History</a>'
linkset[1]+='<a href="Geography.html">Geography</a>'
linkset[1]+='<a href="DT.html">Design &amp Technology</a>'
linkset[1]+='<a href="PSHCE.html">PSHCE</a>'
linkset[1]+='<a href="SMSC.html">SMSC</a>'
linkset[1]+='<a href="Art.html">Art</a>'
linkset[1]+='<a href="Homework.html">Homework</a>'
linkset[1]+='<a href="ResidentialTrip.html">Annual Residential Trip</a>'

linkset[2]='<a href="PR_Remembrance.html">Remembrance Service</a>'
linkset[2]+='<a href="PR_Outstanding.html">Outstanding Success</a>'

linkset[3]='<a href="Staff_List.html">Staff List</a>'
linkset[3]+='<a href="Governor_List.html">Governor List</a>'
linkset[3]+='<a href="Subject_responsibilities.html">Subject Responsibilities</a>'
linkset[3]+='<a href="Governors_report.html">Governors\' Report 2009</a>'
linkset[3]+='<a href="FGBMinutes.html">Minutes of Meetings</a>'

linkset[4]='<a href="About_FOSS.html">About FOSS</a>'
linkset[4]+='<a href="FOSS_Committee.html">FOSS Committee</a>'
linkset[4]+='<a href="FOSS_Newsletter.html">FOSS Newsletter</a>'

//linkset[5]='<a href="HTCurrentStatus.html">Current Position</a>'
//linkset[5]+='<a href="HTJobAdvert.html">Job Advert</a>'
//linkset[5]+='<a href="HTJobSpec.html">Job Specification</a>'

var ie5=document.all && !window.opera
var ns6=document.getElementById

if (ie5||ns6)
document.write('<div id="popitmenu" onMouseover="clearhidemenu();" onMouseout="dynamichide(event)"></div>')

var code = "<div id=\"container\"><div id=\"topspan\"></div><div id=\"navlist\">";
code += "<a href=\"index.htm\">Home</a>";
code += " | <a href=\"about.html\">About&nbsp;our&nbsp;School</a>";
code += " | <a href=\"Mission.html\">Mission Statement</a>";
code += " | <a style=\"cursor:hand\" id=\"DayToDay\" onmouseover=\"showmenu(event,linkset[0], 'DayToDay', 200)\" onmouseout=\"delayhidemenu()\">Day to Day Information</a>";
code += " | <a style=\"cursor:hand\" id=\"Curriculum\" onmouseover=\"showmenu(event,linkset[1], 'Curriculum', 200)\" onmouseout=\"delayhidemenu()\">Curriculum</a>";
code += " | <a href=\"admissions.html\">Admissions</a>";
code += " | <a href=\"prospectus.html\">Prospectus</a>";
code += " | <a href=\"Ofsted.html\">Ofsted</a>";
code += "</div>";
code += "<div id=\"navlist2\">";
code += "<a href=\"Statistics.html\">SAT&nbsp;Results</a>";
code += " | <a style=\"cursor:hand\" id=\"PressRelease\" onmouseover=\"showmenu(event,linkset[2], 'PressRelease', 200)\" onmouseout=\"delayhidemenu()\">Press&nbsp;Releases</a>";
code += " | <a style=\"cursor:hand\" id=\"StaffGovs\" onmouseover=\"showmenu(event,linkset[3], 'StaffGovs', 200)\" onmouseout=\"delayhidemenu()\">Staff & Governors</a>";
code += " | <a href=\"School_Community.html\">School & the Community</a>";
code += " | <a style=\"cursor:hand\" id=\"FOSS\" onmouseover=\"showmenu(event,linkset[4], 'FOSS', 200)\" onmouseout=\"delayhidemenu()\">FOSS</a>";
//code += " | <a style=\"cursor:hand\" id=\"HTRecruit\" onmouseover=\"showmenu(event,linkset[5], 'HTRecruit', 200)\" onmouseout=\"delayhidemenu()\">Recruitment of Head</a>";
code += " | <a href=\"contact.html\">Contact Us</a>";
code += "</div>";
document.write(code);

////No need to edit beyond here
function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}
function getAbsLeft(o) {
    oLeft = o.offsetLeft;
    while (o.offsetParent!=null) {

        oParent = o.offsetParent;
        oLeft += oParent.offsetLeft
        o = oParent;
    }
    return oLeft;
}

function getAbsTop(o) {
    oTop = o.offsetTop;
    while (o.offsetParent!=null) {

        oParent = o.offsetParent;
        oTop += oParent.offsetTop
        o = oParent;
    }
    return oTop;
}



function showmenu(e, which, td, optWidth){
if (!document.all&&!document.getElementById)
return
clearhidemenu()
menuobj=ie5? document.all.popitmenu : document.getElementById("popitmenu")
menuobj.innerHTML=which
menuobj.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj.contentwidth=menuobj.offsetWidth
menuobj.contentheight=menuobj.offsetHeight
eventX=ie5? event.clientX : e.clientX
eventY=ie5? event.clientY : e.clientY
//Find out how close the mouse is to the corner of the window
var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie5? iecompattest().clientHeight-eventY : window.innerHeight-eventY
//if the horizontal distance isn't enough to accomodate the width of the context menu
//if (rightedge<menuobj.contentwidth)
////move the horizontal position of the menu to the left by it's width
//menuobj.style.left=ie5? iecompattest().scrollLeft+eventX-menuobj.contentwidth+"px" : window.pageXOffset+eventX-menuobj.contentwidth+"px"
//else
////position the horizontal position of the menu where the mouse was clicked
//menuobj.style.left=ie5? iecompattest().scrollLeft+eventX+"px" : window.pageXOffset+eventX+"px"
////same concept with the vertical position
//if (bottomedge<menuobj.contentheight)
//menuobj.style.top=ie5? iecompattest().scrollTop+eventY-menuobj.contentheight+"px" : window.pageYOffset+eventY-menuobj.contentheight+"px"
//else
//menuobj.style.top=ie5? iecompattest().scrollTop+event.clientY+"px" : window.pageYOffset+eventY+"px"

var top= getAbsTop(document.getElementById(td))
var left = getAbsLeft(document.getElementById(td))

menuobj.style.top = ie5? top + 22 + "px" : window.pageYOffset+top+21+"px"
//menuobj.style.top = ie5? top + 24 : window.pageYOffset+top+24
//menuobj.style.top = top + 24
menuobj.style.left = ie5? left + 22 + "px" : window.pageXOffset+left+21+"px"
menuobj.style.visibility="visible"
return false
}

function contains_ns6(a, b) {
//Determines if 1 element in contained in another- by Brainjar.com
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function hidemenu(){
if (window.menuobj)
menuobj.style.visibility="hidden"
}

function dynamichide(e){
if (ie5&&!menuobj.contains(e.toElement))
hidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("hidemenu()",500)
}

function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
}

if (ie5||ns6)
document.onclick=hidemenu

