function DodajKsiega()
{
  dane01 = document.getElementById('nazwa').value;
  dane02 = document.getElementById('rok').value;
  dane03 = document.getElementById('wpis').value;
  dane04 = document.getElementById('email').value;

  bnWyslij = document.getElementById('btnWyslij');
  bnWyslij.disable=true;

//ustaw typ
  url = "ksiega.php?nazwa=" +  dane01;
  url += "&co=dodaj";
  url += "&rok=" +  dane02;
  url += "&wpis=" +  dane03;
  url += "&email=" +  dane04;

  url=encodeURI(url);
//------- stworz obiekt
  startGETRequest(url,  onCompleteK, onEndK);
}

function onEndK(){
bnWyslij = document.getElementById('btnWyslij');
bnWyslij.disable=false;
}

function onCompleteK(text, xml)
{  
//  var komunikat = document.getElementById('komunikat');
  //zwroc komunikat i podziel go aby sprawdzic czy poprawny czy błąd
  d = text.split(":");


  if(d[0] == "error"){
//		pole = document.getElementById(d[1]);
//		if (d[1]) pole.className= "inputE"; else pole.className= "input";
		document.getElementById('komunikat').innerHTML= d[1];
    }
	else {
		//wyczysc pole komunikatu
		  document.getElementById('komunikat').innerHTML= "";
	  //zwroc wiadomość po poprawnym przebiegu działania
		  document.getElementById('pulpit').innerHTML= d[1];
	}

}