function validate_form() {
	var valid = true;

    if (document.news_comment_form.comment_txt.value == "") {
        alert ("Bitte geben Sie eine Ueberschrift ein.");
        valid = false;
    }
	
    if (document.news_comment_form.comment_head.value == "") {
        alert ("Bitte geben Sie einen Text fuer den Kommentar ein.");
        valid = false;
    }

    return valid;
}

function count_comment_txt(e) {
	var max = 500;

	document.news_comment_form.input1.value = max;
    document.news_comment_form.comment_txt.focus();

	if (!e.which) keyCode = event.keyCode; // ie5+ op5+
        else keyCode = e.which; // nn6+

        if (document.news_comment_form.comment_txt.value.length<max+1)
            document.news_comment_form.input1.value = max-document.news_comment_form.comment_txt.value.length;
        else {
          document.news_comment_form.comment_txt.value = document.news_comment_form.comment_txt.value.substring(0,max);
          document.news_comment_form.input1.value = 0;
        }


}

