// Reply to a persons comment
// commentID is the ID of the comment that is being replied to. Used for chaning reply to repling
// commentIDreply is the ID of the comment taht the reply is to be hosted under (for replies that go over max layer limit)
// commentName  is the Name of the author of the comment that is being replied to
function replyComment(commentID, commentName) 
{
	hiddenValue = document.commentForm.replyCommentID.value;
	
	if(hiddenValue==0)
	// if hidden doesnt have a comment stored, change the clicked one to bols
	{
		new_text = "Comment in reply to: " + commentName;
		document.getElementById('commentReplyName').innerHTML=new_text;
		
		document.commentForm.replyCommentID.value=commentID;	//update new hidden value
		document.getElementById('reply' + commentID).innerHTML = "<span class='commentSubtitleReply'>Replying</span>";
	}
	else if(hiddenValue==commentID)
	// if hidden DOES have a comment stored and it is the same as what 
	// was clicked, toggle the stored one back to normal
	{
		new_text = "&nbsp;";
		document.getElementById('commentReplyName').innerHTML=new_text;
		
		document.commentForm.replyCommentID.value='0';	//update new hidden value
		document.getElementById('reply' + commentID).innerHTML = "Reply";
	}
	else
	// if hidden DOES have a comment stored, change the stored one back to normal
	// and sotre the new value
	{
		new_text = "Comment in reply to: " + commentName;
		document.getElementById('commentReplyName').innerHTML=new_text;
		
		document.commentForm.replyCommentID.value=commentID;	//update new hidden value
		document.getElementById('reply' + hiddenValue).innerHTML = "Reply";
		document.getElementById('reply' + commentID).innerHTML = "<span class='commentSubtitleReply'>Replying</span>";
	}
}
