
// Deletes an element from a sortable list
function deleteSortableListElement(cgi_file_and_params, element_id)
{
	var options = {onSuccess : removeSortableListElementFromDOM(element_id)};
	new Ajax.Request(cgi_file_and_params, options);
}

// Use this for a Ajax.Request 'onSuccess' option
// This will actually remove the element from the page
function removeSortableListElementFromDOM(element_id)
{
	Droppables.remove(element_id); 
	Element.remove(element_id);
}

// Updates the order of a list
function updateSortableListOrder(ul_id, cgi_file)
{
	var options = {
					method : 'post',
					parameters : Sortable.serialize(ul_id)
				  };
	new Ajax.Request(cgi_file, options);
}