function getComments(itemId){

	var showComments = 'showComments' + itemId;

    var queryString = '?id=' + itemId;

	var ajaxRequest;  // The variable that makes Ajax possible!

	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Uh oh, we've run into a problem. Please refresh the page and try again.");
				return false;
			}
		}
	}

	// function to receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			if(ajaxRequest.responseText != ''){
			   var theComments = ajaxRequest.responseText;
            document.getElementById(showComments).innerHTML = theComments;
			} else {
			   document.getElementById(showComments).innerHTML = '<b>There are no comments for this item</b>';
			}
		}
	}

	if(queryString == "") {
		var ajaxDisplay = document.getElementById(showComments);
		ajaxDisplay.innerHTML = "<b><font color=\"red\">Uh oh, we've run into a problem. Please refresh the page and try again.</font></b>";
	} else {
   	ajaxRequest.open("GET", "http://www.mbrianmills.info/blog/get_comments.php" + queryString, true);
   	ajaxRequest.send(null); 
	}
	   
}

function hideComments(itemId){
   
   if(itemId == '') {
      var showComments = 'showComments';
   } else {
      var showComments = 'showComments' + itemId;
   }
   
   document.getElementById(showComments).innerHTML = '';
   
}