function changeClass(Elem, myClass) {
	var elem;
	if(document.getElementById) {
		var elem = document.getElementById(Elem);
	} else if (document.all){
		var elem = document.all[Elem];
	}
	elem.className = myClass;
}
//************* pokazuje/ukrywa div
function blocking(nr)
{
 if (document.getElementById) //<-- Netscape 5 and Explorer 5
 {
  current = (document.getElementById(nr).style.display == 'block') ? 'none' : 'block';
  document.getElementById(nr).style.display = current;
 }
 else if (document.all) //<-- Explorer 4
 {
  current = (document.all[nr].style.display == 'block') ? 'none' : 'block'
  document.all[nr].style.display = current;
 }
 else alert ('Ten link nie działa w Twojej przeglądarce.');
}
//************ Zapytanie o usuniecie

     function ConfirmDelete(pytanie,url){
	   if(confirm(pytanie))
	      window.location.href = url;
	 }

//********************************************
//Wstawia teks w miejsce kursowa w input myField.
function insertAtCursor(myField, myValue) 
{
   //IE support
   if (document.selection) 
   {
      myField.focus();
      sel = document.selection.createRange();
      sel.text = myValue;
   }//MOZILLA/NETSCAPE support
   else if (myField.selectionStart || myField.selectionStart == '0') 
           {
             var startPos = myField.selectionStart;
             var endPos = myField.selectionEnd;
             myField.value = myField.value.substring(0, startPos)+ myValue + myField.value.substring(endPos, myField.value.length);
           } else 
		   {
               myField.value += myValue;
           }
   myField.focus();
}
function changeBG(id,Color)
{
  document.getElementById(id).style.background = Color;
}
//****** FUNKCJA ZAOKRĄGLA LICZBĘ DO DWÓCH MIEJSC PO PRZECINKU
function zaokr(liczba) 
{
  liczba = parseFloat(liczba) * 100;
  var wynik = Math.round(liczba)/100;
  return wynik;
}

