function invokeActionForm(form, event, callbackFunction, ElementId, dataType) {
	invokeActionFormLink(form.attr("action"), event, form.serialize(), callbackFunction, dataType, ElementId);
}

function invokeActionFormLink(action, event, postDate, callbackFunction, dataType, ElementId) {
	if (event) {
		action += "?" + event + "=";
	}
	if (!dataType) {
		dataType = "html";
	}
	$.ajax({url:action, type:"POST", dataType:dataType, data:postDate, cache:false, success:function (html) {
			callbackFunction(html, ElementId);
		}
	});
}

function populateTextResult(html, ElementId) {
	if ($(escapeId(ElementId)).length <= 1) {
		getEscapeId(ElementId).replaceWith("" + html);
	}
}
