function lesson_delete(lesson_id, lesson_link)
{
	if (confirm('Are you sure you want to delete the Lesson?'))
        {
                $.post("/lessons/del",
                { lesson_id: lesson_id },
                function(data) {
                    if (data == "LOGINREQUIRED") alert("Login is required.");
                    else if (data == "INVALIDLESSONID") alert("Invalid lesson ID.");
                    else if (data == "DOESNTEXIST") alert("Lesson doesn't exist.");
                    else if (data == "DOESNTBELONG") alert("Lesson doesn't belong to you.");
                    else $(lesson_link.parentNode.parentNode.parentNode.parentNode.parentNode).fadeOut("slow");
                }
                );
        } return false;
}
