function viewComments(mode, nbCommentsToShow) {
	var commentsDivChildren = document.getElementById("article_comments").childNodes;
	var j = 0;

	for(var i=0; i<commentsDivChildren.length; i++) {
		if(commentsDivChildren.item(i).className == "article_comment") {
			j++;
			switch(mode) {
				case "init":
					if(j > nbCommentsToShow) {
						commentsDivChildren.item(i).style.display = "none";
					}
					break;

				case "show":
					if(j > nbCommentsToShow) {
						if(commentsDivChildren.item(i).style.display == "block") {
							commentsDivChildren.item(i).style.display = "none";
						} else {
							commentsDivChildren.item(i).style.display = "block";
						}
					}
					break;
			}
		}
	}
}

function initCommentForm() {
	document.getElementById("commentform_name").onfocus = function() {
		document.getElementById("commentform_name").value = "";
	}

	document.getElementById("commentform_email").onfocus = function() {
		document.getElementById("commentform_email").value = "";
	}

	document.getElementById("commentform_message").onfocus = function() {
		document.getElementById("commentform_message").value = "";
	}
	
	document.getElementById("commentform_submit").onclick = function() {
		document.getElementById("commentform_submit").value = "Post Comment";
	}
}