function flagThis(associatedType,associatedID,listID,userID,flagDivID){
	var ajax = getXMLHttpRequestObject();
	if(ajax) {
		ajax.open('POST', 'http://www.10to1.com/flagThis.php');
		ajax.onreadystatechange = function() {
			handleFlag(ajax,flagDivID);
		}
		var values = 'associatedType='+ encodeURIComponent(associatedType) +'&associatedID='+ encodeURIComponent(associatedID) +'&listID='+ encodeURIComponent(listID) +'&userID='+ encodeURIComponent(userID);
		ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		ajax.send(values);
	}
}
function handleFlag(ajax,flagDivID) {
	if(ajax.readyState == 4) {
		if((ajax.status == 200) || (ajax.status == 304)) {
			/* I wasn't sure what to do if a list, item, comment, or reply was deleted, so just to make things simple, I am changing the flag image and the delete changes will show next time the page is reloaded.  This means things may be added to the database after an item is deleted, but I couldn't figure out a better way to do it. So, I wrote a "Where Not Exists" script to deletes items where a list doesn't exist, etc. */
			var flagSpace= document.getElementById(flagDivID);
			flagSpace.innerHTML='<font class="blue12">Flagged</font>';
		}
	}
}
