
/***********************************************
* 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 Dance Classes menu
var classes=new Array()
classes[0]='<table border="0"><tr><td rowspan="9"><img src="images/training_menu.jpg" width="100" height="175"></td><td height="10"><a href="classrooms.html">Classrooms<br></a></td></tr><tr><td height="10"><a href="2to6.html">2&nbsp;to&nbsp;6&nbsp;Year-Olds<br></a></td></tr><tr><td height="10"><a href="ballet-pointe.html">Ballet/Pointe<br></a></td></tr><tr><td height="10"><a href="jazz.html">Jazz<br></a></td></tr><tr><td height="10"><a href="tap.html" class="popup">Tap</a></td></tr><tr><td height="10"><a href="hiphop.html">Hip&nbsp;Hop</a></td></tr><tr><td height="10"><a href="irish.html">Irish&nbsp;Dance</a></td></tr><tr><td height="10"><a href="dancemovement.html">Special&nbsp;Needs</a></td></tr><tr><td height="10"><a href="yoga.html">Yoga</a></td></tr><tr><td height="10"></td><td><a href="djturntable.html">DJ&nbsp;Turntable</a></td></tr><tr><td></td><td><a href="cheerleadingdance.html">Cheer Dance</a></td></tr><tr><td></td><td height="10"><a href="breakdancing.html">Break&nbsp;Dancing</a></td></tr><tr><td height="10"></td><td height="10"><a href="dancerhythms.html">1-2 Year Old Dance&nbsp;Rhythms</a></td></tr><tr><td height="10"></td><td><a href="acrobatics.html">Acrobatics</a></td></tr><tr><td height="10"></td><td><a href="modern.html">Modern</a></td></tr><tr><td></td><td height="10"><a href="other.html">Other&nbsp;Classes</a></td></tr></table>'

//Contents for Inside CRS menu, and so on
var inside=new Array()
inside[0]='<table border="0"><tr height="12"><td rowspan="7"><img src="images/inside_menu.jpg" width="118" height="135"></td><td height="12"><a href="studiodirector.html">Studio&nbsp;Director</a></td></tr><tr height="12"><td height="12"><a href="recital.html">Annual&nbsp;Recital</a></td></tr><tr height="12"><td height="12"><a href="directions.html">Directions&nbsp;to&nbsp;Studio</a></td></tr><tr height="12"><td height="12"><a href="faq.html">FAQs</a></td></tr><tr height="12"><td height="12"><a href="enrollment.html">Enrollment</a></td></tr><tr height="12"><td height="12"><a href="contact.html" class="popup">Receive&nbsp;Information</a></td></tr><tr height="12"><td height="12"><a href="contact.html" class="popup">Contact&nbsp;CRS</a></td></tr></table>'

//Contents for Media menu, and so on
var media1=new Array()
media1[0]='<table border="0"><tr><td rowspan="3"><img src="images/media_menu.jpg" width="116" height="161"></td><td height="10"><a href="newsarticles.html">News&nbsp;Articles</a></td></tr><tr><td height="10"><a href="commercials.html">Commercials</a></td></tr><tr height="123"><td height="123"></td><td height="123"></td></tr></table>'

//Contents for Testimonials menu, and so on
var testimonials=new Array()
testimonials[0]='<table border="0"><tr><td rowspan="3"><img src="images/testimonials_menu.jpg" width="170" height="143"></td></tr></table>'

//Contents for Our Facility menu, and so on
var facility=new Array()
facility[0]='<table border="0"><tr><td rowspan="4"><img src="images/facility_menu.jpg" width="190" height="120"></td> <td height="10"><a href="newbuilding.html">Construction&nbsp;Photos</a></td></tr><tr> <td height="10"><a href="ourfacility_interior.html">Our&nbsp;Facility&nbsp;-&nbsp;Interior</a></td></tr><tr> <td height="10"><a href="comingsoon.html">Our&nbsp;Facility&nbsp;-&nbsp;Exterior</a></td></tr><tr height="63"> <td height="63"></td> <td height="63"></td></tr></table>'

//Contents for Seasonal Enrollment menu, and so on
var enroll=new Array()
enroll[0]='<table border="0"><tr><td rowspan="3"><img src="images/enroll_menu.jpg" width="250" height="117"></td></tr></table>'

//Contents for Home menu, and so on
var home=new Array()
home[0]='<table border="0"><tr><td height="10"><a href="../studio/index.php">Studio</a></td></tr><tr><td height="10"><a href="../youthballet/index.html">Ballet&nbsp;Company</a></td></tr><tr><td height="10"><a href="index.html">Dance&nbsp;Theater</a></td></tr><tr></tr></table>'

		
var menuwidth='300px' //default menu width
var menubgcolor='black'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editing 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=-2
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 windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
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

