function hide () {for (i = 0; i < arguments.length; i++) {var e = $(arguments[i]); if (e) e.style.display = "none";}}
function show () {for (i = 0; i < arguments.length; i++) {var e = $(arguments[i]); if (e) e.style.display = "";}}



function clearTitle(box) {
    box.value = "";
    box.style.color = "black";
    box.onfocus = null;
}

function reply(id) {show("reply"+id); $("commentreply" + id).focus();}
function editcomment(id) {hide("display"+id, "little"+id); show("edit"+id); $("commentedit"+id).focus()}

function chkcomment(id) {
    ta = $("comment" + id);
    //err = $("err" + id);
    //if (err.innerHTML != "") {err.innerHTML = "";}
    if (ta == null) {return false;}
    if (ta.style.color == "gray" || ta.value == "") {
        //err.innerHTML = "enter a comment";
        ta.focus();
        return false;
    } else if (ta.value.length > 10000) {
        //err.innerHTML = "comment is too long";
        ta.focus();
        return false;
    } else {
        //if (err.innerHTML != "") err.innerHTML = ""
    }
    if (ta.value == "enter a comment here") { return false; }
    return true;
}