/*
	map.form.js
	
	functions for form manipulation and submittal
	
*/

// DEFINE FORM CLASS
formClass = function() {}; // empty class constructor


//*****************************************************************************
// BEGIN FORM METHODS
//*****************************************************************************


//*****************************************************************************
// FORMSUBMIT
//*****************************************************************************

formClass.prototype.formSubmit = function(formID) {
	try {		 
		theForm = document.getElementById(formID);
		theForm.submit();
	} catch (e) {
	 alert("map.form Error\n\nThe function map.form.formSubmit() could not find the form \"" + formID + "\"");
	}

}
//END FORMSUBMIT
//*****************************************************************************


//*****************************************************************************
// FORMACTION
//*****************************************************************************

formClass.prototype.formAction = function(formID,formAction) {
	try {
		theForm = document.getElementById(formID);
		theForm.action = formAction;
		theForm.submit();
	} catch (exception) {
	  alert("map.form Error\n\nThe function map.form.formAction() could not find the form \"" + formID + "\"");
	}
}
// END FORMACTION
//*****************************************************************************


// END FORM METHODS
//*****************************************************************************


//*****************************************************************************
// ADD FORM CLASS TO MAPCLASS
//*****************************************************************************
mapClass.prototype.form = new formClass();

