function txt_saveContent(contentId) {
    if (confirm("Do you want to save your changes?\n\nClick OK to save, Cancel to abort")) {
        var title = document.getElementById("txtTitle_" + contentId).value;
        updateTextArea("taITxt_" + contentId);
        var introText = document.getElementById("taITxt_" + contentId).value;
        updateTextArea("taFTxt_" + contentId);
        var fullText = document.getElementById("taFTxt_" + contentId).value;
        if (fullText.trim() == "<br>") fullText = "";
        if (title != "" && introText != "") {
            var ajaxRequest = initialiseAJAXRequest();
            var contentType = "application/x-www-form-urlencoded; charset=UTF-8";
            var processURL = "./modules/text/AJAX/saveContent.jsp";
            var returnError = "";
            ajaxRequest.onreadystatechange = function() {
                if (ajaxRequest.readyState == 4) {
                    if (ajaxRequest.status == 200) {
                        returnError = ajaxRequest.responseText;
                        if (returnError.length > 24) {
                            alert("Save ModuleContent Error : " + returnError);
                        } else {
                            txt_showContent(contentId, true, true);
                        }
                    } else if (ajaxRequest.status == 204) {
                        alert("Debug: error.");
                    }
                }
            };

            ajaxRequest.open("POST", processURL, true);
            ajaxRequest.setRequestHeader("Content-Type", contentType);
            ajaxRequest.send("contentId=" + contentId + "&titl=" + encodeURIComponent(title) + "&itxt=" + encodeURIComponent(introText) + "&ftxt=" + encodeURIComponent(fullText));
        } else {
            alert("Debug: missing title and intro text");
        }
    }
}