//CONTENTS OF MENU 1
	var village_matters=new Array()
		village_matters[0]='<a href="http://www.jonesville.org/jonesville_village_matters/jonesville_welcome_statement.asp">Welcome Statement</a>'
		village_matters[1]='<a href="http://www.jonesville.org/jonesville_village_matters/jonesville_announcements.asp">Announcements</a>'
		village_matters[2]='<a href="http://www.jonesville.org/jonesville_village_matters/jonesville_council_corner.asp">Council Corner</a>'
		village_matters[3]='<a href="http://www.jonesville.org/jonesville_village_matters/jonesville_about.asp">About Jonesville</a>'
		village_matters[4]='<a href="http://blog.jonesville.org/">Manager\'s Blog</a>'
		village_matters[5]='<a href="http://www.facebook.com/wall.php?id=901380600&banter_id=509600216&show_all#/profile.php?id=1339413202" target="_blank">Jonesville Facebook Page</a>'
//CONTENTS OF MENU 2
	var officials=new Array()
		officials[0]='<a href="http://www.jonesville.org/jonesville_officials/jonesville_village_council.asp">Village Council</a>'
		officials[1]='<a href="http://www.jonesville.org/jonesville_officials/jonesville_public_notices_hearings.asp">Public Notices/Hearings</a>'
		officials[2]='<a href="http://www.jonesville.org/jonesville_officials/jonesville_dda_downtown_development_authority.asp">DDA</a>'
		officials[3]='<a href="http://www.jonesville.org/jonesville_officials/jonesville_ldfa_local_development_financing_authority.asp">LDFA</a>'
		officials[4]='<a href="http://www.jonesville.org/jonesville_officials/jonesville_planning_commission.asp">Planning Commission</a>'
		officials[5]='<a href="http://www.municode.com/resources/gateway.asp?pid=12244&sid=22" target="_blank">Code of Ordinances</a>'
		officials[6]='<a href="http://www.jonesville.org/jonesville_officials/files/jonesville_village_fayette_township_michigan_zoning_ordinance_0708.pdf" target="_blank">Zoning Ordinance</a>'
		officials[7]='<a href="http://www.legislature.mi.gov/(S(xwujfbr5zkqsmp45v5y0cf45))/mileg.aspx?page=getobject&objectname=mcl-Act-3-of-1895&query=on" target="_blank">General Law Village Act</a>'
		officials[8]='<a href="http://www.jonesville.org/jonesville_officials/jonesville_audit_report.asp">Audit Report</a>'
//CONTENTS OF MENU 3
	var departments=new Array()
		departments[0]='<a href="http://www.jonesville.org/jonesville_departments/jonesville_village_hall.asp">Village Hall</a>'
		departments[1]='<a href="http://www.jonesville.org/jonesville_departments/jonesville_police_department.asp">Police Department</a>'
		departments[2]='<a href="http://www.jonesville.org/jonesville_departments/jonesville_fire_department.asp">Fire Department</a>'
		departments[3]='<a href="http://www.jonesville.org/jonesville_departments/jonesville_dpw_department_public_works.asp">Department of Public Works</a>'
		departments[4]='<a href="http://www.jonesville.org/jonesville_departments/jonesville_waste_water.asp">Water & Wastewater Treatment</a>'
		departments[5]='<a href="http://www.jonesville.org/jonesville_departments/jonesville_parks_recreation.asp">Parks & Recreation</a>'
		departments[6]='<a href="http://www.jonesville.org/jonesville_departments/jonesville_village_services.asp">Village Services</a>'
		departments[7]='<a href="https://remote.jonesville.org/exchweb/bin/auth/owalogon.asp?url=https://remote.jonesville.org/exchange/&reason=1" target="_blank">Employee Email Access</a>'
//CONTENTS OF MENU 4
	var business_industry=new Array()
		business_industry[0]='<a href="http://www.jonesville.org/jonesville_business_industry/jonesville_available_real_estate.asp">Available Real Estate</a>'
		business_industry[1]='<a href="http://www.jonesville.org/jonesville_business_industry/jonesville_commercial.asp">Commercial</a>'
		business_industry[2]='<a href="http://www.jonesville.org/jonesville_business_industry/jonesville_industrial.asp">Industrial</a>'
		business_industry[3]='<a href="http://www.jonesville.org/jonesville_business_industry/jonesville_industrial_park.asp">Industrial Park</a>'
		business_industry[4]='<a href="http://www.michigan.gov/business/" target="_blank">Michigan Business One Stop</a>'
		business_industry[5]='<a href="http://www.hillsdaleedp.org/" target="_blank">Hillsdale County EDP</a>'
		business_industry[6]='<a href="http://www.hillsdalecountychamber.com/" target="_blank">Hillsdale County Chamber of Commerce</a>'
		business_industry[7]='<a href="http://www.misbtdc.org/" target="_blank">Small Business Development (MI-SBTDC)</a>'
		business_industry[8]='<a href="http://www.jonesville.org/jonesville_business_industry/jonesville_business_association.asp">Jonesville Business Association</a>'
		business_industry[9]='<a href="http://www.jonesville.org/jonesville_business_industry/files/eSPOT.pdf" target="_blank">eSpot - Everything for Entrepreneurs!</a>'
//CONTENTS OF MENU 5
	var community=new Array()
		community[0]='<a href="http://calendar.jonesville.org/">Events Calendar</a>'
		community[1]='<a href="http://www.jonesville.org/jonesville_community/jonesville_map.asp">Map</a>'
		community[2]='<a href="http://photogallery.jonesville.org/">Photo Gallery</a>'
		community[3]='<a href="http://www.jonesville.org/jonesville_community/jonesville_marketing.asp">Marketing</a>'
		community[4]='<a href="http://www.jonesvilleschools.org/" target="_blank">Schools</a>'
		community[5]='<a href="http://www.jonesville.org/jonesville_community/jonesville_worship.asp">Churches</a>'
		community[6]='<a href="http://www.jonesville.org/jonesville_community/jonesville_service_groups.asp">Service Groups</a>'
		community[7]='<a href="http://www.jonesvilleriverfest.org/" target="_blank">Riverfest</a>'
		community[8]='<a href="http://www.us12heritagetrail.org/" target="_blank">US12 Heritage Trail</a>'
		community[9]='<a href="http://www.hillsdalecounty.info/" target="_blank">HillsdaleCounty.info</a>'
		community[10]='<a href="http://www.jonesville.org/jonesville_community/jonesville_sauk_theater.asp">Sauk Theater</a>'
		community[11]='<a href="http://www.woodlands.lib.mi.us/jonesville/jonesville.html" target="_blank">District Library</a>'
		community[12]='<a href="http://www.mel.org/" target="_blank">Michigan eLibrary</a>'
		community[13]='<a href="http://www.centralmichigan211.org/" target="_blank">211</a>'

//DEFAULT MENU WIDTH, IF NOT SPECIFIED WHEN CALLED
	var menuwidth='225px'
//MENU BGCOLOR, IF NOT SPECIFIED IN CSS
	var menubgcolor='lightyellow'
//MENU DISAPPEAR SPEED onMouseout (IN MILISECONDS)
	var disappeardelay=250
//HIDE MENU WHEN USER CLICKS?
	var hidemenu_onclick="yes"

/////No further editting 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="-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=-12
	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-18 : 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")-40+"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
