function ATnet_Forms_RaiseEvent(formName, eventName, parameters){
	FormElement = $("#"+formName)
	FormObject = ATnet_Forms_GetForm(formName);
	
	FormElement.append('<input type="hidden" name="RaisedEvent" value="'+eventName+'">');
	FormElement.append('<input type="hidden" name="FormName" value="'+formName+'">');
	FormElement.append('<input type="hidden" name="RaisedEventParameters" value="'+parameters+'">');
	
	$(FormObject).trigger('submit');
}

function ATnet_Forms_GetForm(formName){
	MatchingElements = $("#"+formName);
	if (MatchingElements.length==1){
		return MatchingElements[0];
	} else {
		throw "The requested form with id="+formName+" was not found";
	}
}