Your "vop" object isn't in scope inside your "updateLayerVisibility" function, so this will fail:vop.setVisibleLayers(visible);
Since you've hard-coded the Id of your vop layer here:var vop = new esri.layers.ArcGISDynamicMapServiceLayer( "http://dswcapps.dcr.virginia.gov/ArcGIS/rest/services/dnh/vop/MapServer", { id: 'vop', opacity: 0.45 } );
....one quick way you could get a reference to the layer is to replace that broken line with: map.getLayer("vop").setVisibleLayers(visible);