function deleteComment(idx) {
        newURL = location.href;
        if (newURL.indexOf('?') == -1) {
                newURL = newURL + '?deleteComment=' + idx;
        }
        else {
                newURL = newURL + '&deleteComment=' + idx;
        }
        if (confirm('Are you certain you want to delete this Comment?')) {
                document.location = newURL;
        }
}

function deleteCommentSpam(idx) {
        newURL = location.href;
        if (newURL.indexOf('?') == -1) {
                newURL = newURL + '?spam=true&deleteComment=' + idx;
        }
        else {
                newURL = newURL + '&spam=true&deleteComment=' + idx;
        }
        if (confirm('Are you certain you want to report this user for spam and delete this comment?')) {
                document.location = newURL;
        }
}

function getComments(itemIdx, zone, offset) {
	$.ajax({
	type: "GET",
	url:'commentServer.php?itemIdx=' + itemIdx + '&zone=' + zone + '&offset=' + offset,
	success: function(response) {
		commentsDiv = document.getElementById('commentWrapper');
	commentsDiv.innerHTML = response;
	}
});
}