
function podglad(url, x, y, text) {
 okno = window.open("", "o", "width="+x+", height="+y+", left=150, top=50,"
   + " innerwidth="+x+", innerheight="+y+", location=0, directories=0,"
   + " scrollbars=0, menubar=0, toolbar=0, status=0, resizable=0");
 okno.document.open();
 okno.document.writeln('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"');
 okno.document.writeln('"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">');
 okno.document.writeln('<html xmlns="http://www.w3.org/1999/xhtml" ');
 okno.document.writeln('xml:lang="pl"><head><meta http-equiv="Content-type"');
 okno.document.writeln(' content="text/html; charset=iso-8859-2" />');
 okno.document.writeln('<title>'+text+'</title><style type="text/css"><!--');
 okno.document.writeln('body {margin:0px; padding:0px; background:white;}');
 okno.document.writeln('img {display:block; border:0px;}');
 okno.document.writeln('--></style></head><body>');
 okno.document.writeln('<a href="javascript:self.close()"><img ');
 okno.document.writeln('src="'+url+'" alt="Zamknij" /></a></body></html>');
 okno.document.close();
 okno.focus();
}


function strona(plik) {
  if (plik!='oferta' && plik!='kontakt') 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+".html", true);
    xml.send(null);
  }
  return false;
}


function stronaphp(id) {
	if ( id > 5 ) return false;
  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", "strona.php?id="+id, true);
    xml.send(null);
  }
  return false;
}

