function sendInvitation(params){
	$("#invite_form *").each(function(){$(this).removeClass("payment-error");});
	$.ajax({
		type: "POST",
		url: "index.php",
		data: params.serialize() + "&eID=tx_imagetaginvitations_eid",
		dataType: "json",
		success: function(result){
			if (result.status == 0) {
				$.each(result,function(idx,el){
					element = "#" + idx;
					if ($(element)) $(element).addClass("payment-error");
				});
			}
			else {
				$("#invite_form input[type=text]").each(function(){$(this).val("");});
				$("#invite_form textarea").each(function(){$(this).val("");});
			}

			$("#dialog_inv").dialog("destroy");
			$("#dialog_inv").html(result.message);

			$("#dialog_inv").dialog({
				modal: true,
				buttons: {
					Ok: function() {
						$(this).dialog("close");

					}
				}
			});

		}
	});
}


function showInviteForm() {
  $('#invite_form').dialog("destroy");
	$('#invite_form').dialog({
			autoOpen: true,
			height: 500,
			width: 570,
			modal: true,
			resizable: false,
			closeText: 'Schließen',
			buttons: { "Schließen": function() { $(this).dialog("close"); } }
	});

}