/* -------------------------------------------------------------- 
| Refer to layout.js in lib/js for full function information

| function 
	createPanel(panelID, height, panelClass, icon, title, headerClass, headerRightContent, headerRightContentClass, panelContent, panelContentClass, startVisibility)
		ex. -	createPanel('testPanel', 90, null, null, 'A Panel', null, "<a href='#'>More Info</a>", null, "This is some dummy info", null)
		ex. - createPanel('mapZoom', null, null, null, 'Map Zoom', null, null, null,null, 'hidden')
		ex. - createPanel(); // Only do this to test
		-Note - by default, the panel is shown. If the panel is susposed to be hidden by default, pass in "hidden" to startVisibility
| function 
	createPicklist(parentPanelID, picklistID, picklistTitle, picklistArray, picklistFunction, picklistClass);
		ex. - createPicklist( 'mapZoom', 'county2', 'Zoom to County', counties, 'zoomToExtent(\"county\", \"mapZoom\" , \"va\")', null );
			-This example uses the zoomToExtent(queryType, picklistID, imistatecode) function
| function
	createPlantPicklists(parentPanelID, plantCNameArray, plantSNameArray, picklistClass)
		ex. - createPlantPicklists('dummyPanel', commonNames, speciesNames);
		-This function creates two picklists for the lists of plants - common and scientific.  Can be done manually, but easier in one call.
			-Note - If the picklist is created manually, the plant common name picklist must have an ID of plantCName  and there must also be a plant scientific name picklist with an ID of plantSName

|function
	createButton(parentPanelID, buttonID, buttonClass, buttonValue, buttonFunction)
		ex - createButton('testPanel','testButton', null, 'Click me...please', 'alert(\"Thanks\");'
		ex - Create report button based on picklist
				createButton('query', 'atlasButton', null, 'View Atlas for Selected Species', 'viewAtlas(\"http://www.biol.vt.edu/digital_atlas/index.php?do=plant&plant=\");');
		ex - Create a report button not based on picklist
------------------------------------------------------------------*/
function loadLayout() {
/*Set the state name in the title - Don't change this*/
	$('imiStateNameContainer').innerHTML = imiStateFullName
	document.title = imiStateFullName + " Invasive Species";
	
/*Create Panels*/
	/*Map Zoom*/	
	createPanel('mapZoom', 90, null, null, 'Map Zoom', null, "", null, "", null, 'hidden');
	createPicklist('mapZoom', 'zoomCounty', 'Zoom to County', loadCounties(), 'zoomToExtent(\"county\", \"zoomCounty\");' , null);
	
	/*Query*/
	createPanel('query', 160, null, null, 'Query', null, "<a href='#' onclick='showAll();'>Show All Points</a><br /><a href='#' onclick='unselectWeeds();'>Unselect Point</a>", null, "", null);
		/*create the picklists for the common and scientific list of plants*/
		createPlantPicklists('query');
		createButton('query', 'atlasButton', null, 'View Atlas for Selected Species', 'viewAtlas(\"http://www.biol.vt.edu/digital_atlas/index.php?do=plant&plant=\");');
}
