

// THIS FUNCTION USED FOR TOP NAV ROLLOVER MENUS

//Contents for topmenu 1 - About Us
var topmenu1=new Array()
topmenu1[0]='<a href="newsletters.aspx">Newsletter</a>'
topmenu1[1]='<a target="_blank" href="http://www.tothestage.com/Promotions.Page?ActiveID=1143">History</a>'
topmenu1[2]='<a href="evaclinics.aspx">News</a>'
topmenu1[3]='<a href="evaevents.aspx">Partners</a>'
topmenu1[4]='<a href="evapartners.aspx?ID=1">Corporate Info</a>'
topmenu1[5]='<a href="evanews.aspx">Foundation</a>'

//Contents for topmenu 2 - Artists
var topmenu2=new Array()
topmenu2[0]='<a href="DADArtists.aspx?ID=1">Classical</a>'
topmenu2[1]='<a href="DADArtists.aspx?ID=2">Jazz/Electric</a>'
topmenu2[2]='<a href="DADArtists.aspx?ID=3">Bluegrass</a>'

//Contents for topmenu 3 - The Stage
var topmenu3=new Array()
topmenu3[0]='<a href="http://www.tothestage.com/MediaLibrary.Page?ActiveID=1142" target="_blank">Media Library</a>'
topmenu3[1]='<a href="http://www.tothestage.com/Learn.Page?ActiveID=1211" target="_blank">Learn</a>'
topmenu3[2]='<a href="http://www.tothestage.com/Promotions.Page?ActiveID=1143" target="_blank">Promotions</a>'
topmenu3[3]='<a href="http://www.tothestage.com/Gear.Page?ActiveID=1148" target="_blank">Gear</a>'
topmenu3[4]='<a href="http://www.tothestage.com/Community.Page?ActiveID=1146" target="_blank">Community</a>'
topmenu3[5]='<a href="http://www.tothestage.com/TheStage.Page?ActiveID=1141" target="_blank">Perform</a>'
topmenu3[6]='<a href="http://www.tothestage.com/TheStage.Page?ActiveID=1141" target="_blank">Services</a>'

//Contents for topmenu 4 - Support
var topmenu4=new Array()
topmenu4[0]='<a href="evaartists.aspx?ID=1">FAQ</a>'
topmenu4[1]='<a href="evaartists.aspx?ID=2">Find a Dealer</a>'
topmenu4[2]='<a href="evaartists.aspx?ID=3">Link to Us</a>'
topmenu4[3]='<a href="evaartists.aspx?ID=4">Posters & Catalogs</a>'
topmenu4[4]='<a href="evaartists.aspx?ID=4">Contact Us</a>'
topmenu4[5]='<a href="evaartists.aspx?ID=4">Site Map</a>'

//Contents for topmenu 5 - Calendar
var topmenu5=new Array()
topmenu5[0]='<a href="evaartists.aspx?ID=1">Clinics</a>'
topmenu5[1]='<a href="evaartists.aspx?ID=2">Events</a>'

//Contents for topmenu 6 - Other Brands
var topmenu6=new Array()
topmenu6[0]='<a href="http://www.daddario.com" target="_blank">D&acute;Addario</a>'
topmenu6[1]='<a href="http://www.evansdrumheads.com" target="_blank">Evans</a>'
topmenu6[2]='<a href="http://www.planetwave.com" target="_blank">Planet Waves</a>'
topmenu6[3]='<a href="http://www.ricoreeds.com" target="_blank">Rico</a>'
topmenu6[4]='<a href="http://www.bowed.com" target="_blank">Bowed</a>'
topmenu6[5]='<a href="http://www.hqpercussion.com" target="_blank">HQ Percussion</a>'
topmenu6[6]='<a href="http://www.gbase.com" target="_blank">GBase.com</a>'
topmenu6[7]='<a href="http://www.daddariofoundation.org" target="_blank">D&acute;Addario Foundation</a>'
topmenu6[8]='<a href="http://www.thelessonroom.com" target="_blank">The Lesson Room</a>'


var menuwidth='172px' //default menu width
var disappeardelay=550  //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="topnavbox" style="visibility:hidden;width:'+menuwidth+';" 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=document.getElementById? document.getElementById("topnavbox") : topnavbox
		dropmenuobj.style.left=dropmenuobj.style.top="-500px" }
		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("topnavbox") : topnavbox
	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