// JavaScript Document

/***********************************************

Modified version of AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
TL - 12-07-06
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<div onmouseover=swapImage(1)><a href="color_purple_tickets.php">Buy Tickets (Broadway)</a>'
menu1[1]='<a href="color_purple_tour.php">Buy Tickets (Tour)</a>'
menu1[2]='<a href="faq.php">FAQs</a></div>'


//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<div onmouseover=swapImage(2)><a href="the_color_purple_musical.php">Story Synopsis</a>'
menu2[1]='<a href="color_purple_history.php">The History</a>'
menu2[2]='<a href="about_the_production.php">About the Production</a>'
menu2[3]='<a href="color_purple_reviews.php">Critical Praise</a>'
menu2[4]='<a href="color_purple_casting.php">Casting</a></div>'

var menu3=new Array()
menu3[0]='<div onmouseover=swapImage(3)><a href="color_purple_cast.php">Meet the cast</a>'
menu3[1]='<a href="creative_team.php">The Creative Team</a>'
menu3[2]='<a href="real_people_real_voices.php">Real People, Real Voices</a>'


var menu4=new Array()
menu4[0]='<div onmouseover=swapImage(4)><a href="color_purple_news.php">Breaking News</a>'
menu4[1]='<a href="color_purple_news_archive.php">News Archive</a>'
menu4[2]='<a href="special_offers.php">Special Offers</a>'


var menu5=new Array()
menu5[0]='<div onmouseover=swapImage(5)><a href="color_purple_sights_and_sounds.php">Video Player</a>'
menu5[1]='<a href="color_purple_photos.php">Photo Gallery</a>'
menu5[2]='<a href="color_purple_ecards.php">Send an Ecard</a>'
menu5[3]='<a href="color_purple_music.php">Music</a>'
menu5[4]='<a href="color_purple_libretto.php">Libretto</a>'


function dropdownmenu(obj, e, menucontents, menuwidth, imagetitle,imagename){
	
MM_swapImage(imagetitle,'','http://colorpurple.com/images/' + imagename + '.gif',1);
	
}




function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
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,imagename){
if (ie4||ns6)
dropmenuobj.innerHTML='<div id=dropdownover >' + what.join("") + '</div>';
}


function delayhidemenu(){
MM_swapImgRestore();

}

