function wstaw(form_texarea, poczatek, koniec)
{
   //IE support
   if (document.selection)
   {
      form_texarea.focus();
      sel = document.selection.createRange();
      sel.text = poczatek+sel.text+koniec;
   }
   //MOZILLA/NETSCAPE support
   else if(form_texarea.selectionStart || form_texarea.selectionStart == 0)
   {
      var startPos = form_texarea.selectionStart;
      var endPos = form_texarea.selectionEnd;
      form_texarea.value = form_texarea.value.substring(0, startPos)+ poczatek+form_texarea.value.substring(startPos,endPos)+koniec+form_texarea.value.substring(endPos, form_texarea.value.length);
   }
   else
   {
      form_texarea.value += myValue;
   }
}
function generuj(){
    document.getElementById('podglad').innerHTML = document.getElementById('kod').value.replace(/\n/g, "<br>");
  }

function big(lyr) {
   document.all[lyr].style.height='200px'; 
   }

   function small(lyr) {
   document.all[lyr].style.height='20px';
   }

   function start() {
   document.all.Layer1.style.height='20px';
   document.all.Layer2.style.height='20px';
   document.all.Layer3.style.height='20px'; 
   }
  function potwierdzenie(adres) {
  strona = adres;
  var sprawdz = window.confirm("Na pewno usun±ć?");
  if (sprawdz == true) {
  document.location.href = strona;
  return true;
  }
  else if (sprawdz == false) {
  window.alert("Akcja anulowana!")
  return false;
  }
}
function pokaz()
{
  var akapit = document.getElementById("pogoda");
  if(akapit.style.display == "none"){
    akapit.style.display = "block";
	document.getElementById('pogoda_button').innerHTML = "Pogoda na dzi¶ (ukryj)";
  }
  else{
    akapit.style.display = "none";
	document.getElementById('pogoda_button').innerHTML = "Pogoda na dzi¶ (pokaż)";
  }
}

