/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1 about us
var menu1=new Array()
menu1[0]='<a href="wearethefuture.php">We are the future</a>'
menu1[1]='<a href="about.php?id=1">History</a>'
menu1[2]='<a href="about.php?id=2">Corporate information</a>'
menu1[3]='<a href="about.php?id=3">Faculties</a>'
menu1[4]='<a href="about.php?id=4">Relocation to Greenwich</a>'
menu1[5]='<a href="about.php?id=5">Publication scheme</a>'
menu1[6]='<a href="about.php?id=6">Teachers &amp; careers advisers</a>'
menu1[7]='<a href="about.php?id=7">Maps &amp; directions</a>'
menu1[8]='<a href="http://careers.rave.ac.uk/" target="_blank">Careers</a>'
menu1[9]='<a href="about.php?id=9">Contact us</a>'

//Contents for menu 2 press and media
var menu2=new Array()
menu2[0]='<a href="press.php?id=1">Contact the team</a>'
menu2[1]='<a href="all_news.php">News archive</a>'
menu2[2]='<a href="press.php?id=2">Recent coverage</a>'
menu2[3]='<a href="press.php?id=3">Image gallery</a>'
//menu2[4]='<a href="press.php?id=4">Video gallery</a>'
menu2[4]='<a href="press.php?id=5">Awards and achievements</a>'
menu2[5]='<a href="press.php?id=6">Directory of experts</a>'
menu2[6]='<a href="subscribe.php">Subscribe to our newsletter</a>'
//menu2[7]='<a href="#">Relocation to Greenwich</a>'
//menu2[8]='<a href="#">Corporate Information</a>'

//Contents for menu 3 events
var menu3=new Array()
menu3[0]='<a href="events.php?id=1">Open Days</a>'
menu3[1]='<a href="events.php?id=6">Overseas Events</a>'
menu3[2]='<a href="events.php?id=4">Convocation</a>'
menu3[3]='<a href="events.php?id=5">Student exhibitions</a>'
<!-- menu3[4]='<a href="http://www.cumuluslondon2009.com/" target="_blank">Cumulus London 2009</a>' -->

//Contents for menu 4 showcase
var menu4=new Array()
menu4[0]='<b>&nbsp;Galleries</b>'
menu4[1]='<a href="showcase.php?id=1">Video</a>'
menu4[2]='<a href="showcase.php?id=2">Slideshow</a>'
//menu4[3]='<a href="showcase.php?id=3">Audio</a>'


//Contents for menu 5 courses
var menu5=new Array()
menu5[0]='<a href="courses.php?id=27">Find a course</a>'
menu5[1]='<a href="courses.php?category=pre-degree">Pre-degree</a>'
menu5[2]='<a href="courses.php?category=undergraduate">Undergraduate</a>'
menu5[3]='<a href="courses.php?category=postgraduate">Postgraduate</a>'
menu5[4]='<a href="courses.php?id=48">Short courses</a>'
menu5[5]='<a href="courses.php?id=26">Course directory</a>'
//menu5[6]='<a href="#">Teaching staff</a>'
//menu5[7]='<a href="#">Skillset Academy</a>'

//Contents for menu 6 prospective students
var menu6=new Array()

menu6[0]='<a href="prospective.php?id=1">How to apply</a>'
menu6[1]='<a href="prospective.php?id=2">Portfolios &amp; interviews</a>'
menu6[2]='<a href="life.php?id=2">Money matters</a>'
menu6[3]='<a href="prospective.php?id=4">Accommodation &amp; Services</a>'
menu6[4]='<a href="about.php?id=4">Relocation to Greenwich</a>'
menu6[5]='<a href="prospective.php?id=5">Visit us</a>'
menu6[6]='<a href="prospective.php?id=6">Students\' testimonies</a>'
menu6[7]='<a href="prospective.php?id=7">Prospectus</a>'
menu6[8]='<a href="current.php?id=1">Calendar</a>'
//menu6[9]='<a href="prospective.php?id=8">FAQs</a>'

//Contents for menu 7 international students
var menu7=new Array()
menu7[0]='<a href="international.php?id=1">International homepage</a>'
menu7[1]='<a href="international.php?id=2">How to apply</a>'
menu7[2]='<a href="international.php?id=3">Student profiles</a>'
menu7[3]='<a href="international.php?id=4">Money matters</a>'
menu7[4]='<a href="prospective.php?id=4">Accommodation &amp; Services</a>'
menu7[5]='<a href="international.php?id=6">Agent zone</a>'
menu7[6]='<a href="international.php?id=7">Overseas events and news</a>'
menu7[7]='<a href="prospective.php?id=7">Prospectus</a>'
menu7[8]='<a href="international_enquiries.php">Contact the International office</a>'

//Contents for menu 8 current students
var menu8=new Array()
menu8[0]='<a href="current.php?id=1">Calendar</a>'
menu8[1]='<a href="events.php?id=4">Convocation 2009</a>'
menu8[2]='<a href="life.php?id=5">Employability</a>'
menu8[3]='<a href="http://learn.rave.ac.uk/moodle/">Learn @ Rave</a>'
menu8[4]='<a href="http://blogs.rave.ac.uk/blojsom/blog/">Blogs</a>'
menu8[5]='<a href="http://forums.rave.ac.uk/jive/index.jspa">Forums</a>'
menu8[6]='<a href="http://confluence.rave.ac.uk/confluence/dashboard.action">Wiki</a>'
menu8[7]='<a href="http://intranet.rave.ac.uk/">Intranet</a>'

//Contents for menu 9 life @ rave
var menu9=new Array()
menu9[0]='<a href="prospective.php?id=4">Accommodation &amp; Services</a>'
menu9[1]='<a href="life.php?id=2">Money matters</a>'
menu9[2]='<a href="life.php?id=3">Student Services</a>'
menu9[3]='<a href="life.php?id=4">Learning resources</a>'
menu9[4]='<a href="life.php?id=5">Employability</a>'
//menu9[5]='<a href="life.php?id=6">Studient Union</a>'

//Contents for menu 10 alumni
var menu10=new Array()

menu10[0]='<a href="alumni.php?id=1">Stay connected</a>'
//menu10[1]='<a href="alumni.php?id=3">Benefits</a>'
menu10[1]='<a href="alumni.php?id=9">Support us</a>'
menu10[2]='<a href="alumni.php?id=10">How to give</a>'
menu10[3]='<a href="alumni.php?id=12">Supporters</a>'

//Contents for menu 11 enterpise and innovation
var menu11=new Array()
menu11[0]='<a href="business.php?id=1">Services</a>'
menu11[1]='<a href="business.php?id=11">CDT - ERDF</a>'
menu11[2]='<a href="business.php?id=2">News</a>'
menu11[3]='<a href="business.php?id=3">The team</a>'
menu11[4]='<a href="business.php?id=4">Contact us</a>'

//Contents for menu 12 relocation 2010
var menu12=new Array()
menu12[0]='<a href="relocation.php?id=1">Our new campus</a>'
menu12[1]='<a href="prospective.php?id=4">Accommodation 2010</a>'
menu12[2]='<a href="relocation.php?id=2">View building progress</a>'
menu12[3]='<a href="relocation.php?id=3">NEWS e-newsletter</a>'
menu12[4]='<a href="relocation.php?id=4">Flythrough animations</a>'
		
var menuwidth='190px' //default menu width
var menubgcolor='white'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_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="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(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 showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().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? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().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 populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
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 dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu