function getMailboxQuotas()
{
	$.ajax({
		url: "/ajaxes/getUsedQuota/" +$(".mailboxquota").attr("rel")
	,	dataType: "json"
	,	cache: false
	,	success: function(data) {
			$(".mailboxquota").html(data.size +" / " +data.quota  +" (" +data.percentage +"%)");
		}
	});
}

function getDomainMailboxQuotas()
{
	$('.mailboxquota').each(function(i, val) {
		
		$.ajax({
			url: "/ajaxes/getUsedQuota/" +$(val).attr("rel")
		,	dataType: "json"
		,	cache: false
		,	success: function(data) {
				$(val).html(data.size +" / " +data.quota  +" (" +data.percentage +"%)");
			}
		});
		
	});
}

function getZarafaAdminStatus()
{
	$(".zarafa_admin").each(function(i, val) {

		$.ajax({
			url: "/ajaxes/getZarafaAdminStatus/" +$(val).attr("rel")
		,	dataType: "json"
		,	cache: false
		,	success: function(data) {
				if("1" == data.admin)
				{
					sImage = "<img src='/img/icons/16x16/administrator.png' style='position: relative; top: 4px;'/>";
					$(val).html(sImage);
				}
				else
				{
					$(val).html("");
				}
			}
		});

	});
}
