var MIN_TERM_SIZE = 2;


/*
 * is the search term kosher?
 */
function checkSearchTA() {

    var ta = document.getElementById('ta');

    if (ta.value.length == 0) {

        alert("Please enter a TA search term");
        return false;
    }

    else if (ta.value.length <= MIN_TERM_SIZE) {

        alert("Search terms may not be less than "+MIN_TERM_SIZE+" characters in length");
        return false;
    }

    return true;
}


/*
 * is the search term kosher?
 */
function checkSearchAnnot() {

    var annot = document.getElementById('annot');

    if (annot.value.length == 0) {

        alert("Please enter an annotation search term");
        return false;
    }

    else if (annot.value.length <= MIN_TERM_SIZE) {

        alert("Search terms may not be less than "+MIN_TERM_SIZE+" characters in length");
        return false;
    }

    return true;
}
