function MinusQuant(id, quantity){
	obj = document.getElementById('BasketCart_quant_' + id);
	
	if (obj.value <= quantity){
		obj.value = '0';
	}else{
		obj.value = parseInt(obj.value) - quantity;
	}
}
function PlusQuant(id, quantity){
	obj = document.getElementById('BasketCart_quant_' + id);

	obj.value = parseInt(obj.value) + quantity;
}

function RoundUp(min_q, qty) {
	//alert("min_q = " + min_q + "\nqty = " + qty)
	if (qty <= min_q){
		qty = min_q;
	}else{
		ost = 0;
		ost = qty%min_q;
		if(ost > 0){
				delta_r = qty/min_q;
				new_value = (parseInt(delta_r)+1)*min_q;
				qty = new_value;
		}
	}
	//alert(qty);
	return qty;		
}

function RoundUp2(gkey, min_q, l){
	var obj = document.getElementById('BasketCart_quant_' + gkey);
	var qty = obj.value;
	if (qty <= min_q && qty != 0){
		qty = min_q;
	}else if (qty == 0 && qty != min_q){
		qty = 0;
	}else{
		ost = 0;
		ost = qty%min_q;
		if(ost > 0){
				delta_r = qty/min_q;
				new_value = (parseInt(delta_r)+1)*min_q;
				qty = new_value;
		}
	}
	obj.value = qty;
}
//RoundUp2({$gkey}, {$cur_good.QuantityInBox_value}, 'yes')
