/* shows/hides the comments for a post
this may well be extended in further versions */
function zShowComments(cellid) { 
 var commentCell = document.getElementById("zComments" + cellid);
 if (commentCell.style.display == 'none') {
  commentCell.style.display = '';
 } else {
  commentCell.style.display = 'none';
 }
}

/* allows user to click on text next to a checkbox, and checkbox be 'clicked' too */
function zCheckBox(elementID){
//used for text next to checkboxes - click the text and the box is 'clicked' too
var checkBox = document.getElementById(elementID);
checkBox.click();
}

/* checks to see that a comment has been submitted. name is automatically set to anonymous if not there.*/
function zValidateForm(){
var check1 = document.getElementById("zCommentsBox");
if(!check1.value){
 alert("No comment written");
} else {
 document.forms.zCommentsForm.submit();
}
}
