function rss(id) {
  if (document.getElementById(id).style.display=="none") {
    document.getElementById(id).style.display="inline";
  } else {
    document.getElementById(id).style.display="none";
  }
}


function strona(plik) {
//  if (plik!='s1' && plik!='s2' && plik!='s3') return false; // zabezpieczenie
  var xml = null;
  var wynik = document.getElementById("wynik");
  wynik.innerHTML = "Trwa ładowanie strony";
 
	if (window.XMLHttpRequest) xml = new XMLHttpRequest();
	else if (window.ActiveXObject) xml = new ActiveXObject("Microsoft.XMLHTTP");
 
  if (xml) {
    xml.onreadystatechange = function() {
      if (xml.readyState==4) {
          wynik.innerHTML = xml.responseText;
      }
    }
    xml.open("GET", plik, true);
    xml.send(null);
  }
  return false;
}
strona('s1');


function wstaw(pole, przed, po) {
  if (document.selection) { // IE/Opera
    pole.focus();
    obszar      = document.selection.createRange();
    obszar.text = przed+obszar.text+po;
    obszar.select();
  } else if (pole.selectionStart>-1) { // FireFox
    start = pole.selectionStart;
    tekst = przed+pole.value.substring(start,pole.selectionEnd)+po;
    pole.value = pole.value.substring(0, start)
    + tekst + pole.value.substring(pole.selectionEnd, pole.value.length);
    pole.selectionStart = start+tekst.length;
    pole.selectionEnd   = pole.selectionStart;
  }
}

function flash(w, h, path)
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'">'
+'<param name="movie" value="'+path+'" />'
+'<param name="quality" value="high" />'
+'<param name="menu" value="0" />'
+'<embed src="'+path+'" width="'+w+'" height="'+h+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="0" wmode="transparent"></embed>'
+'</object>');
} 