function quick_mail() {
	var msg = $('quickmsg_form').serialize();
	new Ajax.Request('../mail.php?quickmsg&'+msg,{method: 'get'});
	
}
function show_mail() {
	$('quickmsg').appear( {duration: 0.5} )

	new Draggable('quickmsg');
	Form.Element.focus.delay(0.5,'quickmsg_title');
}

function reply(id) {
	var msg = $('reply_form').serialize();
	new Ajax.Request('../mail.php?reply&'+msg,{method: 'get',onCreate:function(request)
            {$('sending_msg').show();},onComplete:function(request){new Ajax.Updater('messages','../view_msg_ajax.php?id='+id,{method: 'get'});
$('sending_msg').hide();$('reply_txt').update('');}});
	
}

function delete_msg(id) {
	$(''+id).fade();
}

function delete_msg(msg_id,id) {
	if (confirm("Are you sure you want to delete this thread and all the messages in it ?")) {
	new Ajax.Request('mail.php?delete&msg_id='+msg_id,{method: 'get',onComplete:function(request){$(id).fade();new Ajax.Updater('inbox_messages','inbox_ajax.php');}});
	
	}
}
