//Pop-it menu- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use
//Heavily Modified by Eric Sanner 9/27/02

//holds the window width
var windowWidth

/*tells whether or not to use relativly absolute positioning for the left of the popup
if this is set to true, the value that is passed to the main popup function for
the value of left becomes a percentage from the left border of the cell to
display the left corner of the box.  The reason it is a percentage instead of
a value away from the edge is so the box still lines up where you want it to
when the cell shrinks or expands.
	NOTE: If this is true, then you must put values in the cellWidthsP array
*/
var relAbsolute = false

/*tells the mode of positioning to use.
When relAbsolute is set to true the possible values are:
leftAbs: Absolute pos from the left edge of the cell you are in
leftRel: Relative pos (based on a percentage of the width of the cell) from the left edge
centerAbs: Absolute pos from the center of the cell.

if relAbsolute is set to false the possible values are:
none: Positions from the upper left corner of the screen
centerAbs: Positions the left and top of the menu based on the center of the screen
	NOTE: You must set the cellWidthsP to an array of length 1 with value 1 (ie 100%)
    	this way the getCells function measures the center of the screen.  Then
        you can use negative values for left to position based on the center of the
        screen
*/
var mode = "centerAbs"

//percentage values of the tables from the html code
var cellWidthsP = new Array("1")

//actual calcualted values (Do NOT fill in with values)
var cellWidthsA = new Array()

//holds the menu data
var linkset=new Array()

//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT

//About RSO
linkset[0]='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/aboutrso.php\'">About RSO</div>'
linkset[0]+='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/theconductor.php\'">The Conductor</div>'
linkset[0]+='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/theorchestra.php\'">The Orchestra</div>'
linkset[0]+='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/theboard.php\'">The Board</div>'
linkset[0]+='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/thestaff.php\'">RSO Staff</div>'
linkset[0]+='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/contactinformation.php\'">Contact Us</div>'
linkset[0]+='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/locationdirections.php\'">Location & Directions</div>'

//Season Schedule
linkset[1]='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/seasonschedule.php\'">Season Schedule</div>'
linkset[1]+='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/specialevents.php\'">Special Events</div>'
linkset[1]+='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/community.php\'">Community Outreach</div>'
linkset[1]+='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/ticketsandsponsorship.php\'">Tickets & Sponsorships</div>'

//Outreach and Education
linkset[2]='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/communityoutreach.php\'">Outreach & Education</div>'
linkset[2]+='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/news.php\'">News</div>'
linkset[2]+='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/otherarts.php\'">Other Arts</div>'
linkset[2]+='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/links.php\'">Links</div>'

//Tickets and Sponsors
linkset[3]='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/ticketsandsponsorship.php\'">Tickets & Sponsors</div>'
linkset[3]+='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/seasontickets.php\'">Season Tickets</div>'
linkset[3]+='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/singleconcerttickets.php\'">Single Concert Tickets</div>'
linkset[3]+='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/grouprates.php\'">Group Rates</div>'
linkset[3]+='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/givingtorso.php\'">Giving to the RSO</div>'
linkset[3]+='<div style="width: 100%; font-family: Verdana, sans-serif; font-size: 10px; background-color: #5d2026; color: #f1e7e0; padding-left: 10px;" onMouseOver="this.style.backgroundColor=\'#874a33\';this.style.cursor=\'pointer\'" onMouseOut="this.style.backgroundColor=\'#5d2026\'" onClick="window.location.href=\'../Index/seasonsponsors.php\'">Season Sponsors</div>'


////No need to edit beyond here

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all
var ns4=document.layers

function showmenu(e,which, left, top){

if (!document.all&&!document.getElementById&&!document.layers)
return

clearhidemenu()

menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : ""
menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj

if (ie4||ns6)
menuobj.innerHTML=which
else{
menuobj.document.write('<layer name=gui bgColor=#E6E6E6 width=165 onmouseover="clearhidemenu()" onmouseout="hidemenu()">'+which+'</layer>')
menuobj.document.close()
}

menuobj.contentwidth=(ie4||ns6)? menuobj.offsetWidth : menuobj.document.gui.document.width
menuobj.contentheight=(ie4||ns6)? menuobj.offsetHeight : menuobj.document.gui.document.height
eventX=ie4? event.clientX : ns6? e.clientX : e.x
eventY=ie4? event.clientY : ns6? e.clientY : e.y

//Find out how close the mouse is to the corner of the window
var rightedge=ie4? document.body.clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie4? document.body.clientHeight-eventY : window.innerHeight-eventY

if( left != 0 && top !=0 )
{
	if( relAbsolute )
    {
    	getWidths()
    	cell = getCell( e )
	    absPos = 0

	    for( i = 0; i < cell; i++ )
	        absPos += cellWidthsA[i]

        if( mode == "leftAbs" )
        	absPos += left
        else if( mode == "leftRel" )
        	absPos += (left / 100) * cellWidthsA[cell]
        else if( mode == "centerAbs" )
        	absPos += (cellWidthsA[cell] / 2) + left


	    absPos = Math.round( absPos )
        menuobj.thestyle.left = absPos
    }
    else
    {
    	if( mode == "centerAbs" )
        {
        	getWidths()
            menuobj.thestyle.left = (cellWidthsA[0] / 2) + left
        }
        else
	    	menuobj.thestyle.left = left
    }
}
else
{
//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.thestyle.left=ie4? document.body.scrollLeft+eventX-menuobj.contentwidth : ns6? window.pageXOffset+eventX-menuobj.contentwidth : eventX-menuobj.contentwidth
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX : ns6? window.pageXOffset+eventX : eventX
}

if( top > 0 )
menuobj.thestyle.top = top
else
{
//same concept with the vertical position
if (bottomedge<menuobj.contentheight)
menuobj.thestyle.top=ie4? document.body.scrollTop+eventY-menuobj.contentheight : ns6? window.pageYOffset+eventY-menuobj.contentheight : eventY-menuobj.contentheight
else
menuobj.thestyle.top=ie4? document.body.scrollTop+event.clientY : ns6? window.pageYOffset+eventY : eventY
}

menuobj.thestyle.visibility="visible"

return false
}

//This function calculates the widths of the cells based on the screen width
//and the percentage values that are provided in the cellWidthsP array.
function getWidths()
{
	N=window.navigator.appName.substring(0,8);

    if(N=="Microsof")
    	windowWidth=document.body.clientWidth
    if(N=="Netscape")
    	windowWidth=window.innerWidth

    for( i = 0; i < cellWidthsP.length; i++)
    {
        cellWidthsA[i] = windowWidth * cellWidthsP[i]
    }

}

//This function calculates the cell that you moused over
function getCell(event)
{
	overCell = -1
    cellCount = 0
    overX = 0

    //takes into account ie4+ & ns4 event differences from ns6+
    if( event.x )
    	overX = event.x
    else
    	overX = event.clientX


    for( i = 0; i < cellWidthsA.length; i++ )
    {
    	cellCount += cellWidthsA[i]
        if( cellCount >= overX && overCell == -1)
        	overCell = i
    }

    return overCell
}

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.thestyle.visibility=(ie4||ns6)? "hidden" : "hide"
}

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

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

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

function highlightmenu(e,state){
	if (document.all)
		source_el=event.srcElement
	else if (document.getElementById)
		source_el=e.target

    if (source_el.className=="menuitems")
	    source_el.id=(state=="on")? "mouseoverstyle" : ""
    else if (source_el.className=="menuitems1")
	    source_el.id=(state=="on")? "mouseoverstyle1" : ""
    else
    	while(source_el.id!="popmenu")
        {
	    	source_el=document.getElementById? source_el.parentNode : source_el.parentElement
		    if (source_el.className=="menuitems")
			    source_el.id=(state=="on")? "mouseoverstyle" : ""
		    else if (source_el.className=="menuitems1")
			    source_el.id=(state=="on")? "mouseoverstyle1" : ""
	    }
}

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