//Delete via AJAX
function delete_c(cid, uidno, pword, redir)
{
	if(confirm("Are you sure you want to delete this creation?"))
	{
		var opt = {
		method:'post', 
		postBody:'m=delc&password=' + pword + '&id=' + cid + '&uid=' + uidno,
		onSuccess: function(t) { handle_delete_c("0", cid, redir); }
		}
		new Ajax.Request('ajax.php', opt);
	}
}

//Either redirect to the inbox, or remove the table row of that PM
function handle_delete_c(t, cid, redir)
{
	if(t.responseText == "0")
	{
		alert("Your Creation could not be deleted!  This may be a systems error, so please try again.");
	}
	else
	{
		if(redir)
		{
			window.location = 'mycreations.php';
		}
		else
		{
			new Effect.Fade('cid_' + cid);
		}
	}
}
