// Begin Main Menu Code
/****************************************************************
* 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 (BIA)
var menu1=new Array()
menu1[0]='<a href="../bia/bia.php">What is a BIA?</a>'
menu1[1]='<a href="../bia/history.php">BIA History</a>'
menu1[2]='<a href="../bia/board.php">Board of Directors</a>'
menu1[3]='<a href="../bia/logos.php">Download Logos</a>'

// Contents for menu 2 (Revitalization Plan)
var menu2=new Array()
menu2[0]='<a href="../rev_study/rev_plan.php">Revitalization Plan</a>'
menu2[1]='<a href="../rev_study/history.php">History</a>'
menu2[2]='<a href="../rev_study/implementation.php">Implementation</a>'
menu2[3]='<a href="../rev_study/programs.php">Programs</a>'
menu2[4]='<a href="../rev_study/part_fund.php">Partners, Funders, &amp; Donors</a>'
menu2[5]='<a href="../rev_study/community.php">Community Involvement</a>'

// Contents for menu 3 (Business Development)
var menu3=new Array()
menu3[0]='<a href="../business_development/bus_dev.php">Attracting Businesses</a>'
menu3[1]='<a href="../business_development/vacant_space.php">Vacant Space</a>'
menu3[2]='<a href="../business_development/resources.php">Resources</a>'

// Contents for menu 6 (Contact Us)
var menu6=new Array()
menu6[0]='<a href="../contact/contact.php">Contact Us</a>'
//menu6[1]='<a href="../contact/our_team.php">Our Team</a>'
//menu6[2]='<a href="../contact/map.php">Find Us</a>'

// Contents for menu 7 (Retail)
var menu7=new Array()
menu7[0]='<a href="bus_dir.php?category=Antiques and Collectibles">Antiques &amp; Collectibles</a>'
menu7[1]='<a href="bus_dir.php?category=Appliances">Appliances</a>'
menu7[2]='<a href="bus_dir.php?category=Bars and Taverns">Bars &amp; Taverns</a>'
menu7[3]='<a href="bus_dir.php?category=Books and Videos">Books &amp; Videos</a>'
menu7[4]='<a href="bus_dir.php?category=Convenience">Convenience</a>'
menu7[5]='<a href="bus_dir.php?category=Electronics">Electronics</a>'
menu7[6]='<a href="bus_dir.php?category=Furniture">Furniture</a>'
menu7[7]='<a href="bus_dir.php?category=Grocery Stores">Grocery Stores</a>'
menu7[8]='<a href="bus_dir.php?category=Hobbies and Comicbooks">Hobbies &amp; Comicbooks</a>'
menu7[9]='<a href="bus_dir.php?category=Home Improvement">Home Improvement</a>'
menu7[10]='<a href="bus_dir.php?category=Jewellery">Jewellery</a>'
menu7[11]='<a href="bus_dir.php?category=Kitchen Supplies">Kitchen Supplies</a>'
menu7[12]='<a href="bus_dir.php?category=Ladies Wear">Ladies Wear</a>'
menu7[13]='<a href="bus_dir.php?category=Pharmacies">Pharmacies</a>'
menu7[14]='<a href="bus_dir.php?category=Restaurants">Restaurants</a>'
menu7[15]='<a href="bus_dir.php?category=Sports and Leisure">Sports &amp; Leisure</a>'

// Contents for menu 8 (Services)
var menu8=new Array()
menu8[0]='<a href="bus_dir.php?category=Advertising and Promotion">Advertising &amp; Promotion</a>'
menu8[1]='<a href="bus_dir.php?category=Automotive">Automotive</a>'
menu8[2]='<a href="bus_dir.php?category=Business">Business</a>'
menu8[3]='<a href="bus_dir.php?category=Computer Service">Computer Service</a>'
menu8[4]='<a href="bus_dir.php?category=Contractors">Contractors</a>'
menu8[5]='<a href="bus_dir.php?category=Dentists">Dentists</a>'
menu8[6]='<a href="bus_dir.php?category=Entertainment">Entertainment</a>'
menu8[7]='<a href="bus_dir.php?category=Financial">Financial</a>'
menu8[8]='<a href="bus_dir.php?category=Furniture Restoration and Upholstery">Furniture Restoration &amp; Upholstery</a>'
menu8[9]='<a href="bus_dir.php?category=Hair Care">Hair Care</a>'
menu8[10]='<a href="bus_dir.php?category=Laundry">Laundry</a>'
menu8[11]='<a href="bus_dir.php?category=New Age">New Age</a>'
menu8[12]='<a href="bus_dir.php?category=Other">Other</a>'
menu8[13]='<a href="bus_dir.php?category=Paralegal Services">Paralegal Services</a>'
menu8[14]='<a href="bus_dir.php?category=Pawnbrokers">Pawnbrokers</a>'
menu8[15]='<a href="bus_dir.php?category=Pet Care">Pet Care</a>'
menu8[16]='<a href="bus_dir.php?category=Postal Outlet">Postal Outlet</a>'
menu8[17]='<a href="bus_dir.php?category=Printers">Printers</a>'
menu8[18]='<a href="bus_dir.php?category=Recording Studios">Recording Studios</a>'
menu8[19]='<a href="bus_dir.php?category=Reflexology">Reflexology</a>'
menu8[20]='<a href="bus_dir.php?category=Social Services">Social Services</a>'
menu8[21]='<a href="bus_dir.php?category=Taxi Service">Taxi Service</a>'
menu8[22]='<a href="bus_dir.php?category=Welding">Welding</a>'

var menuwidth='165px'			// default menu width
var menubgcolor='#ffffff'		// menu bgcolor
var disappeardelay=1000		// 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
var mapflag=0

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) {
	if (what.parentNode&&typeof what.parentNode.tagName!=='undefined'&&what.parentNode.tagName.toLowerCase()=='map') {
		mapflag=1;
		var ocoords=what.coords.split(',')
		var totaloffset=(offsettype=="left")? ocoords[0]*1 : ocoords[3]*1;
		var mapIm=what.parentNode.parentNode.getElementsByTagName('img')
		for (var i_tem = 0; i_tem < mapIm.length; i_tem++)
		if (mapIm[i_tem].getAttribute('usemap', 0)&&mapIm[i_tem].getAttribute('usemap', 0).replace(/^.*(#.*)/g,'$1')=='#'+what.parentNode.name)
		var parentEl=mapIm[i_tem];
	} else {
		mapflag=0;
		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")-1+"px"
		var oHeight=mapflag? 0 : obj.offsetHeight+46
		dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+oHeight+"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
// End Main Menu Code *******************************************


// Begin switchContent Code to Show/Hide News & Onstage Details *
function switchContent(obj) {
	var el = document.getElementById(obj);
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	} else {
		el.style.display = '';
	}
}
// End toggle Code for Show/Hide News and Onstage Details *******