document.title = "MapServer - Sweetwater County, Wyoming";

rwg.ms_query_url = rwg.ms_map_url = "http://" + location.host + "/mapserv-5.6/mapserv.exe?map=";
rwg.ms_map_url  += "MAP_04_MAIN";
rwg.ms_query_url+= "MAP_04_QUERY";

rwg.jpegLayers = {aerial09: true, aerial06: true, aerialGR: true, drg: true};
rwg.infoLayers = {ownership: true, precinct: true, wellheads: true};

rwg.fullExtent = new OpenLayers.Bounds(1606000, 175000, 2313000, 648000);
rwg.initialExtent = rwg.fullExtent;

var legend_config={"iconurl":"legend_icons","imgtype":".png","data":[{"type":"metagroup","id":"labels","layers_and_groups":[{"type":"layer","id":"lotnum","label":"Lot Numbers","icon_class":"lotnumber,0"},{"type":"layer","id":"streetnum","label":"Street Address Numbers"}],"label":"Labels:","element":"check"},{"type":"metagroup","id":"foreground","layers_and_groups":[{"type":"group","id":"roads","label":"Roads, Streets, Highways","layers":[{"type":"layer","id":"hwys","label":"Highway","icon_class":"hwys,3"},{"type":"layer","id":"cords","label":"County Road","icon_class":"cords,3"},{"type":"layer","id":"miscrds","label":"Other Roads","icon_class":"miscrds,0"},{"type":"layer","id":"railroad","label":"Railroad","icon_class":"railroad,0"}]},{"type":"layer","id":"cities","label":"Cities","icon_class":"cities,0"},{"type":"group","id":"ownership","label":"Ownership","layers":[{"type":"layer","id":"sublot","label":"Subdivision Lots","icon_class":"sublot,0"},{"type":"layer","id":"taxparcel","label":"Tax Parcel","icon_class":"taxparcel,0"}]},{"type":"layer","id":"subdiv","label":"Subdivisions","icon_class":"subdiv,0"},{"type":"group","id":"pls","label":"Public Land Survey","layers":[{"type":"layer","id":"township","label":"Township","icon_class":"township,0"},{"type":"layer","id":"section","label":"Section","maxscaledenom":100000,"icon_class":"section,0"}]},{"type":"layer","id":"water","label":"Rivers and Lakes","icon_class":"waterpline,0"},{"type":"layer","id":"gma","label":"Growth Management Area","icon_class":"gma,0"},{"type":"group","id":"wellheads","label":"Well Heads","layers":[{"type":"layer","id":"wellhead","label":"BP AMERICA","icon_class":"wellhead,0"},{"type":"layer","id":"wellhead","label":"ANADARKO E & P","icon_class":"wellhead,1"},{"type":"layer","id":"wellhead","label":"MERIT ENERGY CO","icon_class":"wellhead,2"},{"type":"layer","id":"wellhead","label":"WEXPRO CO","icon_class":"wellhead,3"},{"type":"layer","id":"wellhead","label":"CABOT OIL & GAS","icon_class":"wellhead,4"},{"type":"layer","id":"wellhead","label":"DEVON ENERGY CO","icon_class":"wellhead,5"},{"type":"layer","id":"wellhead","label":"ENCANA OIL AND GAS","icon_class":"wellhead,6"},{"type":"layer","id":"wellhead","label":"CHEVRON USA INC","icon_class":"wellhead,7"},{"type":"layer","id":"wellhead","label":"All Other Wells","icon_class":"wellhead,8"}]}],"label":"Foreground Layers:"},{"type":"metagroup","id":"greenriver","layers_and_groups":[{"type":"layer","id":"bldgGR","label":"Building Footprints","maxscaledenom":10000,"icon_class":"bldgGR,0"},{"type":"group","id":"contourGR","label":"Elevation Contours","layers":[{"type":"layer","id":"cntrGR","label":" 2 foot contours","icon_class":"cntrGR,0"},{"type":"layer","id":"cntrGR","label":"10 foot contours","icon_class":"cntrGR,1"}]},{"type":"layer","id":"fireGR","label":"Fire Zones","maxscaledenom":125000,"icon_class":"fireGR,0"},{"type":"layer","id":"mainStreetGR","label":"Main Street District","icon_class":"mainStreetGRthematic,0"},{"type":"layer","id":"historicGR","label":"Historic District","maxscaledenom":100000,"icon_class":"historicGR,0"},{"type":"group","id":"zoneOverlayGR","label":"Zoning Overlay Districts","layers":[{"type":"layer","id":"zoning_regions_overlay_district","label":"Planned Unit Development","icon_class":"zoning_regions_overlay_district,0"},{"type":"layer","id":"zoning_regions_overlay_district","label":"Bronze Belt Conservation","icon_class":"zoning_regions_overlay_district,1"},{"type":"layer","id":"zoning_regions_overlay_district","label":"Green Belt Conservation","icon_class":"zoning_regions_overlay_district,2"},{"type":"layer","id":"zoning_regions_overlay_district","label":"Contemporary Design Review Dist","icon_class":"zoning_regions_overlay_district,3"},{"type":"layer","id":"zoning_regions_overlay_district","label":"Traditional Design Review Dist","icon_class":"zoning_regions_overlay_district,4"},{"type":"layer","id":"zoning_regions_overlay_district","label":"Transitional Design Review Dist","icon_class":"zoning_regions_overlay_district,5"}]},{"type":"group","id":"zoningGR","label":"Zoning","layers":[{"type":"layer","id":"zoningGRthematic","label":"O Open Lands","icon_class":"zoningGRthematic,0"},{"type":"layer","id":"zoningGRthematic","label":"B-1 General Business","icon_class":"zoningGRthematic,1"},{"type":"layer","id":"zoningGRthematic","label":"B-2 Central Business","icon_class":"zoningGRthematic,2"},{"type":"layer","id":"zoningGRthematic","label":"I-1 Light Industrial","icon_class":"zoningGRthematic,3"},{"type":"layer","id":"zoningGRthematic","label":"I-2 Heavy Industrial","icon_class":"zoningGRthematic,4"},{"type":"layer","id":"zoningGRthematic","label":"PB Planned Neighborhood Business","icon_class":"zoningGRthematic,5"},{"type":"layer","id":"zoningGRthematic","label":"R-1 Single Family Residential","icon_class":"zoningGRthematic,6"},{"type":"layer","id":"zoningGRthematic","label":"R-2 Single Family Residential","icon_class":"zoningGRthematic,7"},{"type":"layer","id":"zoningGRthematic","label":"R-3 Single & Multi Family Residential","icon_class":"zoningGRthematic,8"},{"type":"layer","id":"zoningGRthematic","label":"R-4 Multi Family Residential","icon_class":"zoningGRthematic,9"},{"type":"layer","id":"zoningGRthematic","label":"MH Mobile Home District","icon_class":"zoningGRthematic,10"}]},{"type":"layer","id":"firmGR","label":"FEMA FIRM Flood Zone","maxscaledenom":100000,"icon_class":"firmGR,0"},{"type":"group","id":"publicGR","label":"Parks & Greenbelt","layers":[{"type":"layer","id":"parksGR","label":"Parks","icon_class":"parksGR,0"},{"type":"layer","id":"greenbeltGR","label":"Greenbelt Pathway","icon_class":"greenbeltGR,0"}]},{"type":"layer","id":"aerialGR","label":"2004 Green River Aerial Photo"}],"label":"City of Green River Layers:"},{"type":"metagroup","id":"background","layers_and_groups":[{"type":"layer","id":"aerial09","label":"2009 Aerial Photography"},{"type":"layer","id":"aerial06","label":"2006 Aerial Photography"},{"type":"group","id":"precinct","label":"Voter Precincts","layers":[{"type":"layer","id":"","label":"GRANGER","icon_class":",0"},{"type":"layer","id":"","label":"RS SOUTHSIDE","icon_class":",1"},{"type":"layer","id":"","label":"RS EDGAR STREET","icon_class":",2"},{"type":"layer","id":"","label":"RS PRAIRIE","icon_class":",3"},{"type":"layer","id":"","label":"RS DOWNTOWN","icon_class":",4"},{"type":"layer","id":"","label":"RS WYOMING STREET","icon_class":",5"},{"type":"layer","id":"","label":"RS \"A\" STREET","icon_class":",6"},{"type":"layer","id":"","label":"RS GOOKIN","icon_class":",7"},{"type":"layer","id":"","label":"BLAIRTOWN","icon_class":",8"},{"type":"layer","id":"","label":"RS COUNTRY CLUB","icon_class":",9"},{"type":"layer","id":"","label":"RS SOUTH COLLEGE HILL","icon_class":",10"},{"type":"layer","id":"","label":"RS FOOTHILL SOUTH","icon_class":",11"},{"type":"layer","id":"","label":"RS FOOTHILL NORTH","icon_class":",12"},{"type":"layer","id":"","label":"PURPLE SAGE","icon_class":",13"},{"type":"layer","id":"","label":"RS NORTH BELT ROUTE","icon_class":",14"},{"type":"layer","id":"","label":"RS CENTURY WEST","icon_class":",15"},{"type":"layer","id":"","label":"RS THE BLUFFS","icon_class":",16"},{"type":"layer","id":"","label":"ROCK SPRINGS SKYVIEW","icon_class":",17"},{"type":"layer","id":"","label":"MOUNTAINAIRE","icon_class":",18"},{"type":"layer","id":"","label":"HOSKINS","icon_class":",19"},{"type":"layer","id":"","label":"JAMESTOWN","icon_class":",20"},{"type":"layer","id":"","label":"GAENSSLEN RANCH","icon_class":",21"},{"type":"layer","id":"","label":"GR ORIGINAL TOWN","icon_class":",22"},{"type":"layer","id":"","label":"GR ASTLE AVENUE","icon_class":",23"},{"type":"layer","id":"","label":"GR INDIAN HILLS","icon_class":",24"},{"type":"layer","id":"","label":"GR STATE STREETS","icon_class":",25"},{"type":"layer","id":"","label":"GR NORTHWEST","icon_class":",26"},{"type":"layer","id":"","label":"GR PIONEER PARK","icon_class":",27"},{"type":"layer","id":"","label":"RELIANCE","icon_class":",28"},{"type":"layer","id":"","label":"WASHAM","icon_class":",29"},{"type":"layer","id":"","label":"SUPERIOR","icon_class":",30"},{"type":"layer","id":"","label":"FARSON\/EDEN","icon_class":",31"},{"type":"layer","id":"","label":"POINT OF ROCKS","icon_class":",32"},{"type":"layer","id":"","label":"WAMSUTTER","icon_class":",33"},{"type":"layer","id":"","label":"McKINNON","icon_class":",34"},{"type":"layer","id":"","label":"BAIROIL","icon_class":",35"}]},{"type":"group","id":"taxclass","label":"Tax Classes","layers":[{"type":"layer","id":"ownershipThematic","label":"BLM","icon_class":"ownershipThematic,0"},{"type":"layer","id":"ownershipThematic","label":"BOR","icon_class":"ownershipThematic,1"},{"type":"layer","id":"ownershipThematic","label":"G&F","icon_class":"ownershipThematic,2"},{"type":"layer","id":"ownershipThematic","label":"Local Gov","icon_class":"ownershipThematic,3"},{"type":"layer","id":"ownershipThematic","label":"RSGA","icon_class":"ownershipThematic,4"},{"type":"layer","id":"ownershipThematic","label":"STATE","icon_class":"ownershipThematic,5"},{"type":"layer","id":"ownershipThematic","label":"UINTA","icon_class":"ownershipThematic,6"},{"type":"layer","id":"ownershipThematic","label":"UP","icon_class":"ownershipThematic,7"},{"type":"layer","id":"ownershipThematic","label":"USFS","icon_class":"ownershipThematic,8"},{"type":"layer","id":"ownershipThematic","label":"OTHER","icon_class":"ownershipThematic,9"}]},{"type":"group","id":"drg","label":"USGS topos","layers":[]}],"label":"Background Layer:","element":"radio"}],"collapsed_nodes":["ownership","roads","pls","wellheads","taxclass","precinct","greenriver","contourGR","zoneOverlayGR","zoningGR","publicGR"],"checked_nodes":["ownership","roads","taxclass"]};

rwg.projection="EPSG:3732";

CSCS.list.EPSG3732 = "+title=NAD83 Wyoming West Central USft +proj=tmerc \
  +lat_0=40.5  +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 \
  +a=6378137.0 +b=6356752.3141403 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192"

CSCS.list.EPSG26912 = "+title=NAD 83 UTM Zone 12N meters +proj=utm +zone=12 +a=6378137.0 +b=6356752.3141403";

var csSP = new CSCS.CS(CSCS.list.EPSG3732);
var csUTM = new CSCS.CS(CSCS.list.EPSG26912);
var csLL = new CSCS.CS();