/* -------------------------------------------------------------- 
/*Load Array*/
/*Loads plant lists, reports lists, etc*/
function loadArray(url){
	//url = "/cgi-bin/proxy.cgi?url=" + "http://"+host+"/requests/ny/plants/index";
	//url = "/requests/va/plants/index";
	//Old Way : Load python url, show select boxes with plant names
	/*New Way - Call Python, populate arrays*/
	var xmlhttp = newXHR();
	xmlhttp.open("GET",url,true);
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4){
			var theArray = xmlhttp.responseText
		}
	}
	xmlhttp.send(null);

	return theArray
}
/* -------------------------------------------------------------- 
/*		Map Manipulation / Map Specific Requests
/*
/*
/* --------------------------------------------------------------*/
function zoomToExtent(queryType, picklistID)
{
/*queryType - type of zoom - county, prism, etc*/
/*picklistID - ID of the picklist to be used*/
/*imistatecode - imi state code*/

    	var value = $(picklistID).value;
    	if(value=="-1")
    	{
		return;
	}
	/*Call for bounds and use them*/
	
	var url = baseRequestFolderURL + imiStateCode + "/extent?query=" + queryType + "&value=" + escape(value);
	url = "/cgi-bin/proxy.cgi?url=" + escape(url);
	var xmlhttp = newXHR();
	xmlhttp.open("GET",url,true);
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4){
			var data = xmlhttp.responseText;
			eval(data);
			//var extent = [minx,miny,maxx,maxy];"
			map.zoomToExtent(new OpenLayers.Bounds(extent[0],extent[1],extent[2],extent[3]));
		}
	}
	xmlhttp.send(null);
}

