function mark_as_reviewed(followupdayid){

	review = $('#reviewed_' + followupdayid).is(":checked") ? 1 : 0;
				
	$.ajax({type	: "POST",
			url 	: "./coach_editfollowupday.php",
			data	: {'followupdayid' : followupdayid, 'coachhandled' : review},
			dataType: 'json',
			timeout : 59000,
			success	: callback_followup,
			error	: err_followup
		   });		

	
	
	
	function callback_followup(data, status){
		// alert(data);
		
		if(data['errorcode'] == "success"){
			if( review ){
				$('tr:has(input[id="reviewed_' + followupdayid +'"])').addClass("success");
			}else{
				$('tr:has(input[id="reviewed_' + followupdayid +'"])').removeClass("success");
			}
		//	$('tr:has(input[id="reviewed_' + followupdayid +'"])').css("background-color", "#95DBB8");
		}else{
			var msg = "Sorry there was a problem. Please try again \nPossible Error:\n" + data['errormsg'];
			alert(msg);
		}
	}
	
	function err_followup(xhr, reason, ex){
		alert(reason);
	}
	
	
	// I have absolutely no idea why this line was ever here. It seems like it should never have worked
	// and yet it looks like it is probably important. Put a big try/catch around it to prevent it from
	// erroring out, so that we don't have to remove it in case it is doing something sometimes...
	//
	// TODO: When we convert everything to jQuery (and therefore no longer have to wonder about whether
	// things like this are related to some Dojo voodoo), we can remove this and just return false.
	try
	{
	    e.preventDefault();
	}
	catch(ex){}


	return false;
}
