Billings = {};
Billings.currentPage = 1;
Billings.currentCommand = 0;

Billings.openBilling = function(billing_id)
{
	new Ajax.Request(
	"backoffice/ajax/billings/getInfos.php",
	{
		"method" : "post",
		"parameters" : {
			"ms" : new Date(),
			"billingId" : billing_id
		},
		onSuccess : function(xhr) {
			window.open("backoffice/facture/"+xhr.responseJSON.hash+".pdf","facture_"+xhr.responseJSON.hash);
		}
	});
}
