var drpnav = new Array();
var drplink = new Array();
var drpTimer;
var heightTimer;
var heightCount = 0;
var activeLink;
var clickType;


drpnav[0] = "Addiction &amp; Mental Health,Aging Services,Clinics,Disability Services,Disease Prevention,Early Childhood Services,Food Safety,Health Equity,Health News,HIV &amp; STD Services"
drpnav[1] = "Community Court,Corrections,District Attorney,Domestic Violence,Jury Duty,Juvenile Services,Parole &amp; Probation,Sex Offenders,Sheriff,Victim Services"
drpnav[2] = "Board Meeting Agenda,Budget,Elections,Elected Officials,Jobs,Ordinances,Taxes"
drpnav[3] = "Go to Webmail"


function hideAllDrp(drpdivID)
{
	for (y = 0; y < drpnav.length; y++)
	{
		if (y != drpdivID)
		{
		document.getElementById('drpdiv' + y).style.display='none';
		document.getElementById('drpdiv' + y).style.height='auto';
		document.getElementById('drp' + y).style.background='none';
	}
	}	
	
	clearInterval(parent.heightTimer);
	
}

function displayDrp(drpdivID)
{
	clearTimer();
	hideAllDrp(drpdivID);
	
	
	
	document.getElementById('drp' + drpdivID).style.background='url(../skins/mouse_over.png)';
	
	var divDisplay = getStyle(document.getElementById('drpdiv' + drpdivID),"Display");
	
	
	document.getElementById('drpdiv' + drpdivID).style.display='block';
	
	//var divHeight = getStyle(document.getElementById('drpdiv' + drpdivID),"Height");
	
	
	//divHeight = divHeight.substring(0,divHeight.length - 2);
	
	
	
}

function animateHeight(drpdivID,divHeight)
{
    if (heightCount < divHeight)
	{
		heightCount+=15;
		document.getElementById('drpdiv' + drpdivID).style.height=heightCount+'px';
	}
	else
	{
		clearInterval(parent.heightTimer);
		document.getElementById('drpdiv' + drpdivID).style.height='auto';
		
	}
}

function clearTimer()
{
	if (parent.drpTimer)
	{
		 clearTimeout(drpTimer);
	}
}


function hideDrp(drpdivID)
{
	document.getElementById('drpdiv' + drpdivID).style.display='none';
	document.getElementById('drpdiv' + drpdivID).style.height='auto';
	document.getElementById('drp' + drpdivID).style.background='none';
	
	
	
}

function delayDrp(drpdivID)
{
	parent.drpTimer = setTimeout("hideDrp('" + drpdivID + "')",500);
	
	
}


function macFFstyle()
{
var css = "";



var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);
var codeName = navigator.appCodeName;
var platformName = navigator.platform;

//alert(platformName);
//alert(codeName);


if ((platformName =='MacPPC' || platformName=='MacIntel') && codeName== 'Mozilla')
{
css+= "<style>";
css+= "a.drplink";
css+= "{";
css+= "font-weight:200;";
css+= "filter:alpha(opacity=100);";
css+= "-moz-opacity:1.0;";
css+= "opacity:1.0;";
css+= "background-color:#272727;";
css+= "padding-top:2px;";
css+= "}";
css+= "a.drplink:hover";
css+= "{";
css+= "filter:alpha(opacity=100);";
css+= "-moz-opacity:1.0;";
css+= "opacity:1.0;";
css+= "background-color:#0d0d0d;";
css+= "}";
css+= ".drpdiv ul li.spacer";
css+= "{";
css+= "filter:alpha(opacity=100);";
css+= "-moz-opacity:1.0;";
css+= "opacity:1.0;";
css+= "background-color:#272727;";
css+= "}";
css+= ".topnav a";
css+= "{";
css+= "font-weight:200;";
css+= "}";
css+= "</style>";

//alert(css)

return (css);

}
else
{
return ('');	
}


	
}

function getStyle(oElm, strCssRule){
	var strValue = "";
	if(document.defaultView && document.defaultView.getComputedStyle){
		strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule);
	}
	else if(oElm.currentStyle){
		strCssRule = strCssRule.replace(/-(w)/g, function (strMatch, p1){
			return p1.toUpperCase();
		});
		strValue = oElm.currentStyle[strCssRule];
	}
	return strValue;
}