function show_change_supervisor(){

	$("#change_supervisor").showModalBox();
	
	$("#modal_cancel").click(function(){
		$("#change_supervisor").removeModalBox();
		return false;
	});
	
	
	
	$("#modal_change").click(function(){
		var text = $("#frm_change_supervisor").serializeArray();
		$("#change_supervisor button").attr("disabled", "true");
		$.ajax({type	: "POST",
			url 	: "./change_supervisor.php",
			data	: text,
			dataType: 'json',
			timeout : 59000,
			success	: callback_,
			error	: err_
		   });	
		return false;
	});
	
	
	
	
	
	function callback_(data, status){
		//alert(data);
		
		if(data['errorcode'] == "success"){
			// alert("saved");
			supervisor_email = $("#txt_supervisor").val();
			$("#supervisor_email").attr("href", "mailto:" + supervisor_email);
			$("#supervisor_email").text(supervisor_email);
			$("#change_supervisor button").removeAttr("disabled");
			$("#change_supervisor").removeModalBox();
		}else{
			var msg = "Sorry there was a problem. Please try again \nPossible Error:\n" + data['errormsg'];
			alert(msg);
			$("#change_supervisor button").removeAttr("disabled");
		}
	}
	
	function err_(xhr, reason, ex){
		alert(reason);
		$("#change_supervisor button").removeAttr("disabled");
	}
	
	e.preventDefault();
	return false;
}