//The PHP script will write in links to pass the appropriate post number.
//Using this number, the script will either make the comments appear or
//disappear depending on their state, and will also change the image (plus
//or minus) to reflect the next action.
function showDiv(postNum, numComments) {
	divID = 'commentDiv'  + postNum;
	imgID = 'commentImg' + postNum;
	commentDiv = document.getElementById(divID + 0).style;
	theImage = document.getElementById(imgID);
	if (commentDiv.display == 'block')
	{
		var i;
		for (i = 0; i < numComments; i++)
		{
			commentDiv = document.getElementById(divID + i).style;
			commentDiv.display = 'none';
			theImage.setAttribute('src','/images/layout/plus.gif');
		}
	}
	else
	{
		var i;
		for (i = 0; i < numComments; i++)
		{
			commentDiv = document.getElementById(divID + i).style;
			commentDiv.display = 'block';
			theImage.setAttribute('src','/images/layout/minus.gif');
		}
	}
}