function Active(what,color) {
	if(!document.layers) {
		what.style.backgroundColor='#'+color;
	}
}


function NotActive(what,color) {
	if(!document.layers) {
		what.style.backgroundColor='#'+color;
	}
}

function SetCosts(quantity) {
	shipping_costs = eval('document.zamowienie.shipping_costs_quantity_' + quantity + '.value');
	document.zamowienie.shipping_cost.value = shipping_costs;
	document.zamowienie.to_pay.value = round2(parseFloat(shipping_costs) + parseFloat(quantity * document.zamowienie.price.value));
}

function round2(toRound) {
	var temp = Math.round(toRound*100);
	var temp_str = "" + temp;
	var temp_len = temp_str.length;
	var toReturn = temp_str.substring(0, temp_len - 2) + "." + temp_str.substring(temp_len - 2, temp_len);
   if (toReturn == ".0") {
		toReturn = "0.00";
	}
	return toReturn;
}

