
//Contents for menu1  intranet
var menu1=new Array()
menu1[0]='<a href="https://www.jwheatley.ac.uk/students/index.asp">Students Website</a>'
menu1[1]='<a href="https://www.jwheatley.ac.uk/staff/index.asp">Staff Intranet</a>'
menu1[2]='<a href="https://www.jwheatley.ac.uk/board/"   >Board Intranet</a>'
//menu1[3]='<a href="vacancies.html">Vacancies</a>'
//menu1[4]='<a href="calendar.asp">Academic Calendar</a>'
//menu1[5]='<a href="projects/">Projects</a>'
//menu1[6]='<a href="campuses.html">Campuses</a>'
//menu1[7]='<a href="community.html">Community</a>'



//Contents for menu 2 Contacts
//var menu2=new Array()
//menu2[0]='<a href="contact.html">Contact Details</a>'
//menu2[1]='<a href="contact/maps.html">How to find us</a>'
//menu2[2]='<a href="contact/contact.asp">Contact Form</a>'
//menu2[4]='<a href="contact/linkPartners.html">Links to Partners</a>'


		
var menuwidth1='420px' //default menu width
var menubgcolor1='white'  //menu bgcolor
var disappeardelay1=30  //menu disappear speed onMouseout (in miliseconds)
var hidemenu1_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv1" style="visibility:hidden;width:'+menuwidth1+';background-color:'+menubgcolor1+'" onMouseover="clearhidemenu1()" onMouseout="dynamichide1(event)"></div>')

function getposOffset1(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide1(obj, e, visible, hidden, menuwidth1){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth1!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth1
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest1(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge1(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest1().scrollLeft+iecompattest1().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest1().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest1().scrollTop+iecompattest1().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu1(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu1(obj, e, menucontents, menuwidth1){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu1()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv1") : dropmenudiv1
populatemenu1(menucontents)

if (ie4||ns6){
showhide1(dropmenuobj.style, e, "visible", "hidden", menuwidth1)
dropmenuobj.x=getposOffset1(obj, "left")
dropmenuobj.y=getposOffset1(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge1(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge1(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue1()
}

function clickreturnvalue1(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide1(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu1()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu1()
}

function hidemenu1(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu1(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu1()",disappeardelay1)
}

function clearhidemenu1(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu1_onclick=="yes")
document.onclick=hidemenu1

function MM_jumpMenu1(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


