// JavaScript Document /*邮件处理*/

function loading(XMLHttpRequest)
{
  $("#alert").append("<div><img src='pics/load.gif' /><div>");
}

 function act_empty()
 {
    alert("No action parameter!");
 }
 
 function send_mail(xid,act,client)
 {
	$("#alert").html('');
	if(act=='creat_book'){var act='send_book';}
	else if(act=='edit_book'){var act='revise_book';}
	else if(act=='release_rep'){var act='send_report';}
	else if(act=='chgresult'){var act='send_revise';}
    $.ajax({ url: 'send_mail.php',
					  type: 'post',
					  data:{act:act,xid:xid,client:client},
					  dataType:'json',
					  beforeSend:loading,
					  success: function(data)
					  {
							$("#alert").html(data);
					   }
			 	  });  	
 }