// JavaScript Document
var defaultMsg = "Enter your comments here...";

	function resetCommentValue() {
		
		var comment = document.getElementById('comments')
		if (comment.value.length == 0) {
			comment.value = defaultMsg;			
		}	
	}
	
	function checkCommentValue(v) {	
		var commentField = document.getElementById('comments')
		if (v==defaultMsg) {
				commentField.value = '';
		}
	}
	
	function hardReset() {
			var comment = document.getElementById('comments')
			comment.value = defaultMsg;			

	}
	
	function postComment(reportID,ownerID) {	
		
		var comment = document.getElementById('comments').value
		if (comment != defaultMsg) {
			var postdata = "frmAction=postComment"+ unescape('%26') +"Comments=" + escape(comment) + unescape('%26') + "ReportID=" + reportID + unescape('%26') + "Owner=" + ownerID
			AJAXRequest("POST","/includes/ajaxResponse.asp",postdata,true,"newCommentHolder","")				
			//document.getElementById('post').disabled = true;
			//document.getElementById('post').value = "Posting...";
			hardReset()
			return true;
			
		} else {
			return false;
			}
		}