function Show(id)
{
  var item = null;

  if (document.getElementById) item = document.getElementById(id);
  else if (document.all) item = document.all[id];
  else if (document.layers) item = document.layers[id];

  if (item) if (item.style) item.style.display = "";
}

function Hide(id)
{
    var item = null;

  if (document.getElementById) item = document.getElementById(id);
  else if (document.all) item = document.all[id];
  else if (document.layers) item = document.layers[id];

  if (item) if (item.style) item.style.display = "none";
}

function ShowOrHide(id)
 {

  var item = null;
  if (document.getElementById) item = document.getElementById(id);
  else if (document.all) item = document.all[id];
  else if (document.layers) item = document.layers[id];
  if (!item){  }
   else if (item.style)
   {
    if (item.style.display == "none") item.style.display = "";
    else item.style.display = "none";
   }
   else
   {
    item.visibility = "show";
   }
}

function change_img(x,y) {
  document.images[x].src='./grafika/'+y+'.gif';
 }
 
function wyslij(f1,form)
{
    f1.disabled = true;
    document.forms[form].submit();
}

function insertext(text,area)
{
        if(area=="skrot"){document.forms[0].skrot.focus(); document.forms[0].skrot.value=document.forms[0].skrot.value +" "+ text; document.forms[0].skrot.focus() }
	else if(area=="pelny") {document.forms[0].pelny.focus(); document.forms[0].pelny.value=document.forms[0].pelny.value +" "+ text; document.forms[0].pelny.focus()}
}

function displayWindow (url, width, height) {
  var Win = window.open (
              url,
              "displayWindow",
              'width=' + width + ',height=' + height + ', resizable=0, scrollbars=yes, menubar=no'
            );
}

// Autorem skryptu jest: SŁAWOMIR KOKŁOWSKI
// www.kurshtml.boo.pl
// Jeśli chcesz wykorzystać ten skrypt na swojej stronie, nie usuwaj tego komentarza!

function flash(id, kolor, czas, kolor2, czas2)
{
  if (document.getElementById)
  {
    document.getElementById(id).style.color = kolor;
    setTimeout('flash("' +  id + '","' + kolor2 + '",' + czas2 + ',"' + kolor + '",' + czas + ')', czas);
  }
  else if (document.all)
  {
    document.all[id].style.color = kolor;
    setTimeout('flash("' +  id + '","' + kolor2 + '",' + czas2 + ',"' + kolor + '",' + czas + ')', czas);
  }
}


