   <!--
       browserName = navigator.appName;
       browserVer = parseInt(navigator.appVersion);
       if ((browserName == "Netscape" && browserVer >= 3) || (browserName == "Microsoft Internet Explorer" && browserVer >=4)) {
           browserOK = "yes";
           }
       else {
           browserOK = "no";
           }

       if (browserOK == "yes")

		{
clearalleysOn = new Image;
clearalleysOn.src = "../gif/clearalleys1.jpg";
clearalleysOff = new Image;
clearalleysOff.src = "../gif/clearalleys.jpg";
}
{
depotrecyclingOn = new Image;
depotrecyclingOn.src = "../gif/depotrecycling1.gif";
depotrecyclingOff = new Image;
depotrecyclingOff.src = "../gif/depotrecycling.gif";
}
{
medicalwasteOn = new Image;
medicalwasteOn.src = "../gif/medicalwaste1.gif";
medicalwasteOff = new Image;
medicalwasteOff.src = "../gif/medicalwaste.gif";
}
{
hazardouswasteOn = new Image;
hazardouswasteOn.src = "../gif/hazardouswaste2.gif";
hazardouswasteOff = new Image;
hazardouswasteOff.src = "../gif/hazardouswaste2a.gif";
}
{
	calendarsOn = new Image;
	calendarsOn.src = "../gif/calendars1.gif";
	calendarsOff = new Image;
	calendarsOff.src = "../gif/calendars.gif";
}
{
dropboxrentalOn = new Image;
dropboxrentalOn.src = "../gif/dropboxrental1.gif";
dropboxrentalOff = new Image;
dropboxrentalOff.src = "../gif/dropboxrental.gif";
}
{
transfersiteOn = new Image;
transfersiteOn.src = "../gif/transfersite1.gif";
transfersiteOff = new Image;
transfersiteOff.src = "../gif/transfersite.gif";
}
		{
compostOn = new Image;
compostOn.src = "../gif/compost1.gif";
compostOff = new Image;
compostOff.src = "../gif/compost.gif";
}
		{
specialeventOn = new Image;
specialeventOn.src = "../gif/specialevent1.gif";
specialeventOff = new Image;
specialeventOff.src = "../gif/specialevent.gif";
}
	   {
pressroomOn = new Image;
pressroomOn.src = "../gif/pressroom1.gif";
pressroomOff = new Image;
pressroomOff.src = "../gif/pressroom.gif";
}
{
	servicechangebOn = new Image;
	servicechangebOn.src = "../gif/servicechangeb1.gif";
	servicechangebOff = new Image;
	servicechangebOff.src = "../gif/servicechangeb.gif";
}
	   {
	curbsideservices2On = new Image;
	curbsideservices2On.src = "../gif/curbsideservices21.gif";
	curbsideservices2Off = new Image;
	curbsideservices2Off.src = "../gif/curbsideservices2.gif";
}
{
	mfservices2On = new Image;
	mfservices2On.src = "../gif/mfservices21.gif";
	mfservices2Off = new Image;
	mfservices2Off.src = "../gif/mfservices2.gif";
}
{
	missedcollectionbOn = new Image;
	missedcollectionbOn.src = "../gif/missedcollection1b.gif";
	missedcollectionbOff = new Image;
	missedcollectionbOff.src = "../gif/missedcollectionb.gif";
}
{
	commercial2On = new Image;
	commercial2On.src = "../gif/commercial21.gif";
	commercial2Off = new Image;
	commercial2Off.src = "../gif/commercial2.gif";
}

{
selfhaul2On = new Image;
selfhaul2On.src = "../gif/selfhaul21.gif";
selfhaul2Off = new Image;
selfhaul2Off.src = "../gif/selfhaul2.gif";
}
{
selfhaulOn = new Image;
selfhaulOn.src = "../gif/selfhaul1.gif";
selfhaulOff = new Image;
selfhaulOff.src = "../gif/selfhaul.gif";
}
	   
	   {
cdlgroupOn = new Image;
cdlgroupOn.src = "../gif/cdlgroup1.jpg";
cdlgroupOff = new Image;
cdlgroupOff.src = "../gif/cdlgroup.jpg";
}
{
commercialgroupOn = new Image;
commercialgroupOn.src = "../gif/commercialgroup1.gif";
commercialgroupOff = new Image;
commercialgroupOff.src = "../gif/commercialgroup.gif";
}
{
cascaderecyclingOn = new Image;
cascaderecyclingOn.src = "../gif/cascaderecycling1.gif";
cascaderecyclingOff = new Image;
cascaderecyclingOff.src = "../gif/cascaderecycling.gif";
}
{
landfillOn = new Image;
landfillOn.src = "../gif/landfill1.gif";
landfillOff = new Image;
landfillOff.src = "../gif/landfill.gif";
}
	   

{
curbsideservicesOn = new Image;
curbsideservicesOn.src = "../gif/curbsideservices1.gif";
curbsideservicesOff = new Image;
curbsideservicesOff.src = "../gif/curbsideservices.gif";
}
{
weatherdelaysOn = new Image;
weatherdelaysOn.src = "../gif/weatherdelays1.gif";
weatherdelaysOff = new Image;
weatherdelaysOff.src = "../gif/weatherdelays.gif";
}
{
blockedcontainersOn = new Image;
blockedcontainersOn.src = "../gif/blockedcontainers1.gif";
blockedcontainersOff = new Image;
blockedcontainersOff.src = "../gif/blockedcontainers.gif";
}
{
	holidaysOn = new Image;
	holidaysOn.src = "../gif/holidays1.gif";
	holidaysOff = new Image;
	holidaysOff.src = "../gif/holidays.gif";
}
{
commercialOn = new Image;
commercialOn.src = "../gif/commercial1.gif";
commercialOff = new Image;
commercialOff.src = "../gif/commercial.gif";
}
{
commercialbOn = new Image;
commercialbOn.src = "../gif/commercial1b.gif";
commercialbOff = new Image;
commercialbOff.src = "../gif/commercialb.gif";
}
{
commercialhomeOn = new Image;
commercialhomeOn.src = "../gif/commercialhome1.gif";
commercialhomeOff = new Image;
commercialhomeOff.src = "../gif/commercialhome.gif";
}
{
comaccountserviceOn = new Image;
comaccountserviceOn.src = "../gif/comaccountservice1.gif";
comaccountserviceOff = new Image;
comaccountserviceOff.src = "../gif/comaccountservice.gif";
}
{
serviceformOn = new Image;
serviceformOn.src = "../gif/serviceform1.gif";
serviceformOff = new Image;
serviceformOff.src = "../gif/serviceform.gif";
}
{
comstartserviceOn = new Image;
comstartserviceOn.src = "../gif/aptstartservice1.gif";
comstartserviceOff = new Image;
comstartserviceOff.src = "../gif/aptstartservice.gif";
}
{
comchangeserviceOn = new Image;
comchangeserviceOn.src = "../gif/aptchangeservice1.gif";
comchangeserviceOff = new Image;
comchangeserviceOff.src = "../gif/aptchangeservice.gif";
}
{
comreplaceOn = new Image;
comreplaceOn.src = "../gif/aptreplace1.gif";
comreplaceOff = new Image;
comreplaceOff.src = "../gif/aptreplace.gif";
}
{
comcancelserviceOn = new Image;
comcancelserviceOn.src = "../gif/aptcancelservice1.gif";
comcancelserviceOff = new Image;
comcancelserviceOff.src = "../gif/aptcancelservice.gif";
}
{
comgarbageOn = new Image;
comgarbageOn.src = "../gif/comgarbage1.gif";
comgarbageOff = new Image;
comgarbageOff.src = "../gif/comgarbage.gif";
}
{
comcontaineroptionsOn = new Image;
comcontaineroptionsOn.src = "../gif/comcontaineroptions1.gif";
comcontaineroptionsOff = new Image;
comcontaineroptionsOff.src = "../gif/comcontaineroptions.gif";
}
{
	tempgarbageOn = new Image;
	tempgarbageOn.src = "../gif/tempgarbage1.gif";
	tempgarbageOff = new Image;
	tempgarbageOff.src = "../gif/tempgarbage.gif";
}
{
notingarbageOn = new Image;
notingarbageOn.src = "../gif/notingarbage1.gif";
notingarbageOff = new Image;
notingarbageOff.src = "../gif/notingarbage.gif";
}
{
comnotingarbageOn = new Image;
comnotingarbageOn.src = "../gif/comnotingarbage1.gif";
comnotingarbageOff = new Image;
comnotingarbageOff.src = "../gif/comnotingarbage.gif";
}
{
comhazardousOn = new Image;
comhazardousOn.src = "../gif/comhazardous1.gif";
comhazardousOff = new Image;
comhazardousOff.src = "../gif/comhazardous.gif";
}
{
hazardouswasteaOn = new Image;
hazardouswasteaOn.src = "../gif/hazardouswaste1a.gif";
hazardouswasteaOff = new Image;
hazardouswasteaOff.src = "../gif/hazardouswastea.gif";
}
{
comextragarbageOn = new Image;
comextragarbageOn.src = "../gif/comextragarbage1.gif";
comextragarbageOff = new Image;
comextragarbageOff.src = "../gif/comextragarbage.gif";
}
{
combulkygarbageOn = new Image;
combulkygarbageOn.src = "../gif/combulkygarbage1.gif";
combulkygarbageOff = new Image;
combulkygarbageOff.src = "../gif/combulkygarbage.gif";
}
{
comwheredoesitgogOn = new Image;
comwheredoesitgogOn.src = "../gif/comwheredoesitgog1.gif";
comwheredoesitgogOff = new Image;
comwheredoesitgogOff.src = "../gif/comwheredoesitgog.gif";
}

{
comrecyclingOn = new Image;
comrecyclingOn.src = "../gif/comrecycling1.gif";
comrecyclingOff = new Image;
comrecyclingOff.src = "../gif/comrecycling.gif";
}
{
comrecycleandsaveOn = new Image;
comrecycleandsaveOn.src = "../gif/comrecycleandsave1.gif";
comrecycleandsaveOff = new Image;
comrecycleandsaveOff.src = "../gif/comrecycleandsave.gif";
}
{
comrecyclingynOn = new Image;
comrecyclingynOn.src = "../gif/comrecyclingyn1.gif";
comrecyclingynOff = new Image;
comrecyclingynOff.src = "../gif/comrecyclingyn.gif";
}
{
comextrarecyclingOn = new Image;
comextrarecyclingOn.src = "../gif/comextrarecycling1.gif";
comextrarecyclingOff = new Image;
comextrarecyclingOff.src = "../gif/comextrarecycling.gif";
}
{
comcomputersOn = new Image;
comcomputersOn.src = "../gif/comcomputers1.gif";
comcomputersOff = new Image;
comcomputersOff.src = "../gif/comcomputers.gif";
}
{
comfluorescentOn = new Image;
comfluorescentOn.src = "../gif/comfluorescent1.gif";
comfluorescentOff = new Image;
comfluorescentOff.src = "../gif/comfluorescent.gif";
}
{
buyrecycledOn = new Image;
buyrecycledOn.src = "../gif/buyrecycled1.gif";
buyrecycledOff = new Image;
buyrecycledOff.src = "../gif/buyrecycled.gif";
}
{
wastepreventionOn = new Image;
wastepreventionOn.src = "../gif/wasteprevention1.gif";
wastepreventionOff = new Image;
wastepreventionOff.src = "../gif/wasteprevention.gif";
}
{
comcompostingOn = new Image;
comcompostingOn.src = "../gif/comcomposting1.gif";
comcompostingOff = new Image;
comcompostingOff.src = "../gif/comcomposting.gif";
}
{
comsizingoptionsOn = new Image;
comsizingoptionsOn.src = "../gif/comsizingoptions1.gif";
comsizingoptionsOff = new Image;
comsizingoptionsOff.src = "../gif/comsizingoptions.gif";
}
{
comcostcomparisonOn = new Image;
comcostcomparisonOn.src = "../gif/comcostcomparison1.gif";
comcostcomparisonOff = new Image;
comcostcomparisonOff.src = "../gif/comcostcomparison.gif";
}
{
commanufacturespecsOn = new Image;
commanufacturespecsOn.src = "../gif/commanufacturespecs1.gif";
commanufacturespecsOff = new Image;
commanufacturespecsOff.src = "../gif/commanufacturespecs.gif";
}

{
comcompactorOn = new Image;
comcompactorOn.src = "../gif/comcompactor1.gif";
comcompactorOff = new Image;
comcompactorOff.src = "../gif/comcompactor.gif";
}

{
comcdlOn = new Image;
comcdlOn.src = "../gif/comcdl1.gif";
comcdlOff = new Image;
comcdlOff.src = "../gif/comcdl.gif";
}
{
	yardwasteOn = new Image;
	yardwasteOn.src = "../gif/yardwaste1.gif";
	yardwasteOff = new Image;
	yardwasteOff.src = "../gif/yardwaste.gif";
}
{
	yardfoodwasteOn = new Image;
	yardfoodwasteOn.src = "../gif/yardwastefood1.gif";
	yardfoodwasteOff = new Image;
	yardfoodwasteOff.src = "../gif/yardwastefood.gif";
}
{
	yardfoodwasteynOn = new Image;
	yardfoodwasteynOn.src = "../gif/yardwastefoodyn1.gif";
	yardfoodwasteynOff = new Image;
	yardfoodwasteynOff.src = "../gif/yardwastefoodyn.gif";
}
{
	yarddebrisOn = new Image;
	yarddebrisOn.src = "../gif/yarddebris1.gif";
	yarddebrisOff = new Image;
	yarddebrisOff.src = "../gif/yarddebris.gif";
}
{
comcdloptionsOn = new Image;
comcdloptionsOn.src = "../gif/comcdloptions1.gif";
comcdloptionsOff = new Image;
comcdloptionsOff.src = "../gif/comcdloptions.gif";
}
{
comleedinfoOn = new Image;
comleedinfoOn.src = "../gif/comleedinfo1.gif";
comleedinfoOff = new Image;
comleedinfoOff.src = "../gif/comleedinfo.gif";
}
{
comwheredoesitgocdlOn = new Image;
comwheredoesitgocdlOn.src = "../gif/comwheredoesitgocdl1.gif";
comwheredoesitgocdlOff = new Image;
comwheredoesitgocdlOff.src = "../gif/comwheredoesitgocdl.gif";
}

{
comratesOn = new Image;
comratesOn.src = "../gif/comrates1.gif";
comratesOff = new Image;
comratesOff.src = "../gif/comrates.gif";
}
{
combillingOn = new Image;
combillingOn.src = "../gif/combilling1.gif";
combillingOff = new Image;
combillingOff.src = "../gif/combilling.gif";
}

{
comrecyclingOn = new Image;
comrecyclingOn.src = "../gif/comrecycling1.gif";
comrecyclingOff = new Image;
comrecyclingOff.src = "../gif/comrecycling.gif";
}
{
comgarbageOn = new Image;
comgarbageOn.src = "../gif/comgarbage1.gif";
comgarbageOff = new Image;
comgarbageOff.src = "../gif/comgarbage.gif";
}
{
comrecyclesaveOn = new Image;
comrecyclesaveOn.src = "../gif/comrecyclesave1.gif";
comrecyclesaveOff = new Image;
comrecyclesaveOff.src = "../gif/comrecyclesave.gif";
}
{
comrolloffOn = new Image;
comrolloffOn.src = "../gif/comrolloff1.gif";
comrolloffOff = new Image;
comrolloffOff.src = "../gif/comrolloff.gif";
}
{
comconstructionOn = new Image;
comconstructionOn.src = "../gif/comconstruction1.gif";
comconstructionOff = new Image;
comconstructionOff.src = "../gif/comconstruction.gif";
}
{
comaccountOn = new Image;
comaccountOn.src = "../gif/comaccount1.gif";
comaccountOff = new Image;
comaccountOff.src = "../gif/comaccount.gif";
}
{
	ratesOn = new Image;
	ratesOn.src = "../gif/rates1.gif";
		ratesOff = new Image;
		ratesOff.src = "../gif/rates.gif";
}
{
	billingOn = new Image;
	billingOn.src = "../gif/billing1.gif";
		billingOff = new Image;
		billingOff.src = "../gif/billing.gif";
}
{
	payonlineOn = new Image;
	payonlineOn.src = "../gif/payonline1.gif";
		payonlineOff = new Image;
		payonlineOff.src = "../gif/payonline.gif";
}
{
mfservicesOn = new Image;
mfservicesOn.src = "../gif/mfservices1.gif";
mfservicesOff = new Image;
mfservicesOff.src = "../gif/mfservices.gif";
}
<!--- Base --->

{
	contactOn = new Image;
	contactOn.src = "../gif/contact1.gif";
	contactOff = new Image;
	contactOff.src = "../gif/contact.gif";
}
{
	koreanOn = new Image;
	koreanOn.src = "../gif/korean1.gif";
	koreanOff = new Image;
	koreanOff.src = "../gif/korean.gif";
}
{
	russianOn = new Image;
	russianOn.src = "../gif/russian1.gif";
	russianOff = new Image;
	russianOff.src = "../gif/russian.gif";
}
{
	spanishOn = new Image;
	spanishOn.src = "../gif/spanish1.gif";
	spanishOff = new Image;
	spanishOff.src = "../gif/spanish.gif";
}
{
	recycle800On = new Image;
	recycle800On.src = "../gif/recycle8001.gif";
	recycle800Off = new Image;
	recycle800Off.src = "../gif/recycle800.gif";
}
{
	whatdoiOn = new Image;
	whatdoiOn.src = "../gif/whatdoi1.gif";
	whatdoiOff = new Image;
	whatdoiOff.src = "../gif/whatdoi.gif";
}
{
	preventwasteOn = new Image;
	preventwasteOn.src = "../gif/preventwaste1.gif";
	preventwasteOff = new Image;
	preventwasteOff.src = "../gif/preventwaste.gif";
}
{
	forkidsOn = new Image;
	forkidsOn.src = "../gif/forkids1.gif";
	forkidsOff = new Image;
	forkidsOff.src = "../gif/forkids.gif";
}
{
	earthlinksOn = new Image;
	earthlinksOn.src = "../gif/earthlinks1.gif";
	earthlinksOff = new Image;
	earthlinksOff.src = "../gif/earthlinks.gif";
}
{
	aboutwmOn = new Image;
	aboutwmOn.src = "../gif/aboutwm1.gif";
	aboutwmOff = new Image;
	aboutwmOff.src = "../gif/aboutwm.gif";
}
{
	employmentOn = new Image;
	employmentOn.src = "../gif/employment1.gif";
	employmentOff = new Image;
	employmentOff.src = "../gif/employment.gif";
}
{
	cityhomeOn = new Image;
	cityhomeOn.src = "../gif/cityhome1.gif";
	cityhomeOff = new Image;
	cityhomeOff.src = "../gif/cityhome.gif";
}
{
	homeOn = new Image;
	homeOn.src = "../gif/home1.gif";
	homeOff = new Image;
	homeOff.src = "../gif/home.gif";
}
{
	statehomeOn = new Image;
	statehomeOn.src = "../gif/statehome1.gif";
	statehomeOff = new Image;
	statehomeOff.src = "../gif/statehome.gif";
}
{
	sitehomeOn = new Image;
	sitehomeOn.src = "../gif/sitehome1.gif";
	sitehomeOff = new Image;
	sitehomeOff.src = "../gif/sitehome.gif";
}


{
	cascaderecyclingOn = new Image;
	cascaderecyclingOn.src = "../gif/cascaderecycling1.gif";
	cascaderecyclingOff = new Image;
	cascaderecyclingOff.src = "../gif/cascaderecycling.gif";
}
{
	tourOn = new Image;
	tourOn.src = "../gif/tour1.gif";
	tourOff = new Image;
	tourOff.src = "../gif/tour.gif";
}
{
	profileOn = new Image;
	profileOn.src = "../gif/profile1.gif";
	profileOff = new Image;
	profileOff.src = "../gif/profile.gif";
}

{
	landfillOn = new Image;
	landfillOn.src = "../gif/landfill1.gif";
	landfillOff = new Image;
	landfillOff.src = "../gif/landfill.gif";
}
{
	wastebyrailOn = new Image;
	wastebyrailOn.src = "../gif/wastebyrail1.gif";
	wastebyrailOff = new Image;
	wastebyrailOff.src = "../gif/wastebyrail.gif";
}
       function imageOn(imgName) {
           if (browserOK == "yes") {
               imgOn = eval(imgName + "On.src");
               document.images[imgName].src = imgOn;
           }

       }
       function imageOff(imgName) {
           if (browserOK == "yes") {
               imgOff = eval(imgName + "Off.src");
               document.images[imgName].src = imgOff;
           }
       }
   //-->
   
<!--
// Tim Was Here, and again
var popWin = null																// use this when referring to pop-up window
var winCount = 0
var winName = "popWin"
	function openPopWin(winURL, winWidth, winHeight, winFeatures, winLeft, winTop){
		var d_winLeft = 420														// default, pixels from screen left to window left
		var d_winTop = 20														// default, pixels from screen top to window top
																				// winName = "popWin" + winCount++
																				// unique name for each pop-up window
		closePopWin()															// close any previously opened pop-up window
		if (openPopWin.arguments.length >= 4)									// any additional features? 
			winFeatures = "," + winFeatures
		else 
			winFeatures = "" 
			if (openPopWin.arguments.length == 6)								// location specified
				winFeatures += getLocation(winWidth, winHeight, winLeft, winTop)
			else
				winFeatures += getLocation(winWidth, winHeight, d_winLeft, d_winTop)
				popWin = window.open(winURL, winName, "width=" + winWidth
					+ ",height=" + winHeight + winFeatures)
  	}
	function closePopWin(){														// close pop-up window if it is open 
		if (navigator.appName != "Microsoft Internet Explorer" 
			|| parseInt(navigator.appVersion) >=4)								//	do not close if early IE
		if(popWin != null) if(!popWin.closed) popWin.close() 
	}
	function getLocation(winWidth, winHeight, winLeft, winTop){
		return ""
	}
//-->
																				// for Netscape 4+ and IE 4+
<!--
	function getLocation(winWidth, winHeight, winLeft, winTop){
		var winLocation = ""
		if (winLeft < 0)
			winLeft = screen.width - winWidth + winLeft
		if (winTop < 0)
			winTop = screen.height - winHeight + winTop
		if (winTop == "cen")
			winTop = (screen.height - winHeight)/2 - 20
		if (winLeft == "cen")
			winLeft = (screen.width - winWidth)/2
		if (winLeft>0 & winTop>0)
			winLocation =  ",screenX=" + winLeft + ",left=" + winLeft
				+ ",screenY=" + winTop + ",top=" + winTop
		else
			winLocation = ""
		return winLocation
	}
//-->
<!-- Begin
	function popUp(URL) {
		day = new Date();
		id = "OneWinPopupOnly";
		openPopWin(URL, 621, 480, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1', 140, 20);
																				// eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=621,height=480,left = 160,top = -300');");
	}
// End -->

<!-- Begin
	function popUp2(URL) {
		day = new Date();
		id = "OneWinPopupOnly";
		openPopWin(URL, 760, 480, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1', 36, 20);
																				// eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=621,height=480,left = 160,top = -300');");
	}
// End -->

var persistmenu="yes"															// "yes" or "no". Make sure each SPAN content contains an incrementing ID starting at 1 (id="sub1", id="sub2", etc)
var persisttype="sitewide"														// enter "sitewide" for menu to persist across site, "local" for this page only
	if (document.getElementById){												// DynamicDrive.com change
		document.write('<style type="text/css">\n')
		document.write('.submenu{display: none;}\n')
		document.write('</style>\n')
	}
	function SwitchMenu(obj){
    	if(document.getElementById){
	    var el = document.getElementById(obj);
    	var ar = document.getElementById(obj).getElementsByTagName("span");		// DynamicDrive.com change
        if(el.style.display != "block"){										// DynamicDrive.com change
            for (var i=0; i<ar.length; i++){
                if (ar[i].className=="submenu")									// DynamicDrive.com change
                ar[i].style.display = "none";
            }
            el.style.display = "block";
        }else{
            el.style.display = "none";
        }
    }
}
function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { 
        offset += search.length
        end = document.cookie.indexOf(";", offset);
        if (end == -1) end = document.cookie.length;
            returnvalue=unescape(document.cookie.substring(offset, end))
        }
    }
    return returnvalue;
}
function onloadfunction(){
if (persistmenu=="yes"){
    var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
    var cookievalue=get_cookie(cookiename)
    if (cookievalue!="")
        document.getElementById(cookievalue).style.display="block"
    }
}
function savemenustate(){
	var inc=1, blockid=""
	while (document.getElementById("sub"+inc)){
    	if (document.getElementById("sub"+inc).style.display=="block"){
        	blockid="sub"+inc
	        break
    	}
	    inc++
	}
	var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
	var cookievalue=(persisttype=="sitewide")? blockid+";path=/" : blockid
	document.cookie=cookiename+"="+cookievalue
}
if (window.addEventListener)
	window.addEventListener("load", onloadfunction, false)
else if (window.attachEvent)
	window.attachEvent("onload", onloadfunction)
else if (document.getElementById)
	window.onload=onloadfunction

if (persistmenu=="yes" && document.getElementById)
	window.onunload=savemenustate
