function PostComment(divID, movieid) {
	if (XMLHttpRequestObject) {
		var obj = document.getElementById(divID);
		var comment = document.getElementById("comment").value;
		
		if (movieid == '' || comment == '') {
			alert("Please enter a comment before trying to post.");
			return false;
		} else {
		
			obj.innerHTML = "Entering Comment: <br/><img src=\"/images/animation/loading.gif\"><br/>Please Wait";
			
			// Must tell it that we are opening it in POST format
			XMLHttpRequestObject.open("POST", "/movies.php?do=postcomment&run=post", true);
			// Also tell if which content-type
			XMLHttpRequestObject.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			
			// Create a null function
			XMLHttpRequestObject.onreadystatechange = function() {
				// Check to make sure download is 100% ready
				// 200 to make sure download is ready
				if (XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200) {
					// Respond with error code / response in divid
						obj.innerHTML = XMLHttpRequestObject.responseText;
				}	
			}
			
			XMLHttpRequestObject.send("&comment=" + encodeURI(comment) + "&movieid=" + encodeURI(movieid));
		}
	}
}

function checkComment() {
	if (document.getElementById("comment").value == '') {
		alert("You must enter a comment before posting");
		return false;
	} else {
		return true;
	}
}