function SprawdzanieCeny(cena)
{
cena = Math.round(cena * 100) / 100;
cena = cena.toString();
pos = cena.indexOf('.');
if(pos > 0)
{
cena = cena.replace('.', ',');
}
pos = cena.indexOf(',');
if(pos > 0)
{
if(cena.length == pos + 2)
{
cena = cena + '0';
}
}
return cena;
}

function OtworzURL(url, zmienne, odp_id)
{
var http;
http = GetXmlHttpObject();
http.open("POST", url, true);
http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
if(odp_id != null && odp_id != '')
{
http.onreadystatechange = function PobieranieOdpowiedzi()
{
if(http.readyState == 4)
{
if(odp_id != null && odp_id != '')
{
document.getElementById(odp_id).innerHTML = http.responseText;
}
}
}
}
http.send(zmienne);
}

function GetXmlHttpObject()
{
if(window.XMLHttpRequest)
{
return new XMLHttpRequest();
}
if(window.ActiveXObject)
{
return new ActiveXObject("Microsoft.XMLHTTP");
}
return null;
}
