/***********************************************
* 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
***********************************************/

var feature="We apologize!  This feature is currently not available."

//Contents for menu a1, CONTACT INFO
var menua1=new Array()

//Contents for menu a2, FINANCIALS
var menua2=new Array()

menua2[0]='<a href="http://www.co.worcester.md.us/trs/debtiss.htm">Debt Issuance</a>'
menua2[1]='<a href="http://www.co.worcester.md.us/trs/stmtsaudits.htm">Statements/Audits</a>'
menua2[2]='<a href="http://www.co.worcester.md.us/trs/ufr.htm">Uniform Financial Reports</a>'

//Contents for menu a3, SERVICES

var menua3=new Array()

menua3[0]='<a href="http://taxes.co.worcester.md.us/CGI-BIN/lansaweb?webapp=RETAXW+webrtn=FNPROP+ml=LANSA:XHTML+partition=WCL+language=ENG">Account Inquiry</a>'
menua3[1]='<a href="http://www.co.worcester.md.us/trs/deedval.htm">Deed Validation</a>'
menua3[2]='<a href="http://www.co.worcester.md.us/trs/mosqcont.htm">Mosquito Control</a>'
menua3[3]='<a href="https://www.officialpayments.com/index.jsp">Pay Bill</a>'
menua3[4]='<a href="http://www.co.worcester.md.us/trs/vehiclereg.htm">Vehicle Registration</a>'


//Contents for menu a4, TAXES
var menua4=new Array()

menua4[0]='<a href="http://www.co.worcester.md.us/trs/buspersproptax.htm">Business Pers. Property</a>'
menua4[1]='<a href="http://www.co.worcester.md.us/trs/foodtax.htm">Food Tax</a>'
menua4[2]='<a href="http://www.co.worcester.md.us/trs/realproptax.htm">Real Property Tax</a>'
menua4[3]='<a href="http://www.co.worcester.md.us/trs/roomtax.htm">Room Tax</a>'
menua4[4]='<a href="http://www.co.worcester.md.us/trs/taxditch.htm">Tax Ditch</a>'
menua4[5]='<a href="http://taxes.co.worcester.md.us/CGI-BIN/lansaweb?webapp=RETAXW+webrtn=FNPROP+ml=LANSA:XHTML+partition=WCL+language=ENG">Taxes Online</a>'
menua4[6]='<a href="http://www.co.worcester.md.us/trs/taxsale.htm">Tax Sale</a>'
menua4[7]='<a href="http://www.co.worcester.md.us/trs/trlrparkexcise.htm">Trailer Park Excise Tax</a>'
menua4[8]='<a href="http://www.co.worcester.md.us/trs/transferrec.htm">Transfer/Recordation</a>'
	

//Contents for menu a5, UTILITIES ~where will these files exist, dpw or trs??
var menua5=new Array()

menua5[0]='<a href="http://www.co.worcester.md.us/pw/solidwaste.htm">Landfill</a>'
menua5[1]='<a href="http://www.co.worcester.md.us/pw/waterwastewater.htm">Water Wastewater</a>'


var menuwidth='15px' //default menu width
var menubgcolor='lightyellow'  //menu bgcolor
var disappeardelay=800//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="dropmenuadiv" 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=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 dropdownmenua(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenuadiv") : dropmenuadiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")

	if (clearbrowseredge(obj, "rightedge") > 200) {
	dropmenuobj.style.left=dropmenuobj.x-obj.offsetWidth+"px"
	}
	else {
	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))
delayhidemenua()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenua()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenua(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu
