/*---------------------------------------------------------------------------------------------------------------------------------------*/
/* Global Config */
/*---------------------------------------------------------------------------------------------------------------------------------------*/
/*These things probably won't change*/
var weedsvar = '';
var weedData = new Array; //for the data about weeds
var windowOpen = 0;
var maxWeedResults = 70; //load from a config file
var plantNumId = '0000';
var features;
var numWeedsInt = 0;
var map;
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
OpenLayers.ProxyHost = '/cgi-bin/proxy.cgi?url=';

var host = 'http://hermes.freac.fsu.edu';
var baseRequestFolderURL = 'http://hermes.freac.fsu.edu/requests/'

/*These change for each map*/
var EPSG = 'EPSG:26912' //Projection
var imiStateCode = 'az' //Statecode
var imiStateFullName = 'Arizona' //State Name

/*set to [{'plid':'plantSNameSelect', 'filter':'scientific'}] if there is no agency*/
var filters = [{'plid':'plantSNameSelect', 'filter':'scientific'}]
var listToClear = null; //set to null if there is no agency

/*set up the name of the scientific and common list*/
var sciname = "sci_name"; //species_na
var comname = "com_name";  //common_na

/*Set the field to use for the atlas links.  Will usually be either plantid_number or usda_sybmol*/
var atlasField = "usda_symbol";
/*---------------------------------------------------------------------------------------------------------------------------------------*/
/* Map Config */
/*---------------------------------------------------------------------------------------------------------------------------------------*/
function loadMapConfig()
{	
	/*Controls - if null, use default controls.*/
		/*Otherwise, pass in the desired controls as strings 
			ex - var controls = 'nav, zi, zo'; */
	var controls = null;

	/*Bounds - [mixx,miny,maxx,maxy]*/
	var bounds = [140000, 3460000, 685000, 4100000];
	
	/*Number of zoom levels - default 10*/
	var numZoomLevels = 10;
	
	/*WMS Server URL - set the WMS server URL*/
	var wmsServerURL = 'http://bsm07.freac.fsu.edu:8080/wmsconnector/com.esri.wms.Esrimap?servicename=iMI_AZ2&'
	
	/*Overview Map - If includeOverview is 'no' or null / undefined, the overview map will not be included*/
	var includeOverview = 'yes'; //Show the overview map
	
	/*Scalebar - If includeScalebar is 'no' or null / undefined, the scalebar will not be included*/
	var includeScalebar = 'yes'; //Show the scalebar
	
	/*Load the map with the above settings*/
	loadMap(controls, bounds, numZoomLevels, wmsServerURL, includeOverview, includeScalebar);
}

/*---------------------------------------------------------------------------------------------------------------------------------------*/
/* Array Config */
/*---------------------------------------------------------------------------------------------------------------------------------------*/
/*Each array is created in a function and the return value is the array itself. createLayout.js calls the function and uses the returned array*/
function loadCounties(){
	var counties = new Array();
	counties[0] = 'by County'
	counties[1] = 'APACHE'
	counties[2] = 'COCHISE'
	counties[3] = 'COCONINO'
	counties[4] = 'GILA'
	counties[5] = 'GRAHAM'
	counties[6] = 'GREENLEE'
	counties[7] = 'LA PAZ'
	counties[8] = 'MARICOPA'
	counties[9] = 'MOHAVE'
	counties[10] = 'NAVAJO'
	counties[11] = 'PIMA'
	counties[12] = 'PINAL'
	counties[13] = 'SANTA CRUZ'
	counties[14] = 'YAVAPAI'
	counties[15] = 'YUMA'
	return counties;
}

