function bind_sum(xclass, id) {
	$('.' + xclass).bind('change keyup focus', function() {
		var total=0;
		$('.' + xclass).each(function() {
			var n=parseFloat(this.value);
			if(isNaN(n)) n=0;
			total += n;
		});
		$('#' + id).val(total);
	});
}

