	function qhFigureOut(theForm) {
//		alert(buttonState);
		
		if (buttonState == 'preview') {
			previewComment(theForm);
		}
		else if (buttonState == 'cancel') {
			cancelPost();
		}
		else if (buttonState == 'post') {
			submitQhForm(theForm);
		}
	}
	
	// it's how we post a comment!
	function submitQhForm(theForm) {
	
//		alert(buttonState + " " + previewingComment);
	
		// stop the "enter in the subject" bug
		if (buttonState == "post" && !previewingComment
		 		|| buttonState == "post" && previewingComment && !canPost) {
			previewComment(theForm);
			return false;
		}
		

		var theForm = document.forms['rateForm'];	
		theForm.action = "postQuickHitComment.do";
		theForm.elements['replyParentCommentId'].value = commentId;

		if (commentId == 0) {
			theForm.elements['diaryId'].value = diaryId;	
		}
		else {
			theForm.elements['commentId'].value = commentId;	

		}
		
		theForm.elements['replyDiaryId'].value = diaryId;	
		theForm.elements['submitType'].value = "post";	
		
		// alert("yo" + theForm.elements['submitType']);
		theForm.method = "POST";
		theForm.submit();
	}
