function $(id)
   {
   return document.getElementById(id);
   }
   
function createXMLHttpRequest()
   {
   try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
   try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
   try { return new XMLHttpRequest(); } catch (e) {}
   alert("Brak obsługi XMLHttpRequest");
   return null;
   }

function right(e) {
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("Autor nie zgodził się na kopiowanie materiałów strony");
return false;
}
return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;

window.onload = function()
   {
   $("i_nazwa").onkeyup = function()
      {
      if ($("i_nazwa").value.length > 0)
         {
         $("nazwa").innerHTML = "Nazwa produktu:";
         }
      if ($("i_nazwa").value.length == 0)
         {
         $("nazwa").innerHTML = "<font color=red>Nazwa produktu:</font>";
         }
      }
   $("i_zdjecie").onkeyup = function()
      {
      if ($("i_zdjecie").value.length > 0)
         {
         $("zdjecie").innerHTML = "Zdjęcie:";
         }
      if ($("i_zdjecie").value.length == 0)
         {
         $("zdjecie").innerHTML = "<font color=red>Zdjęcie:</font>";
         }
      }
   $("i_cena").onkeyup = function()
      {
      if ($("i_cena").value.length > 0)
         {
         $("cena").innerHTML = "Cena (format 0.00 zł):";
         }
      if ($("i_cena").value.length == 0)
         {
         $("cena").innerHTML = "<font color=red>Cena (format 0.00 zł):</font>";
         }
      }
   $("i_text").onkeyup = function()
      {
      if ($("i_text").value.length > 0)
         {
         $("text").innerHTML = "Treść:";
         }
      if ($("i_text").value.length == 0)
         {
         $("text").innerHTML = "<font color=red>Treść:</font>";
         }
      }
   }

