function wstaw(nazwa) {
  i++;
 var tekst = document.createTextNode(nazwa +i+': '); 
 var input = document.createElement('input');input.setAttribute('type', 'text');input.setAttribute('name', 'p'+i);
 var div1 =document.createElement('p');
 div1.style.width = "120px";
 div1.style.height = "0px";
 div1.style.position="relative";
 div1.style.left="50px";
 div1.style.top="0px";
 div1.style.margin="0px";
 div1.style.fontSize="12px";
 div1.style.fontFamily="verdana";
 div1.appendChild(tekst);

 var div2 =document.createElement('p');
 div2.style.width = "100px";
 div2.style.height = "30px";
 div2.style.position="relative";
 div2.style.margin="0px";
 div2.style.left="210px";
 div2.style.top="-20px";
 div1.style.fontSize="12px";
 div1.style.fontFamily="verdana";
 div2.appendChild(input);

 document.getElementById('pola').appendChild(div1);
 document.getElementById('pola').appendChild(div2);


}

function firma()
{
 while(element=document.formularz.getElementsByTagName('p')[0]) {
 element.parentNode.removeChild(element);}
 wstaw("Imię"); 
 wstaw("Nazwisko");
 wstaw("Nazwa firmy"); 
 wstaw("Nazwisko");


}


function prywatna()
{
  while(element=document.formularz.getElementsByTagName('p')[0]) {
    element.parentNode.removeChild(element);}
wstaw("Imię:"); 
wstaw("Nazwisko:");
wstaw("Ulica:"); 
wstaw("Nr domu:");
wstaw("Nr mieszkania:"); 
wstaw("Kod pocztowy:");
wstaw("Miejscowość:"); 
wstaw("Województwo:");
wstaw("E-mail:");
wstaw("Telefon stacjonarny:");
wstaw("Telefon komórkowy:");
}
/*
function podglad(url, x, y) {
 okno = window.open("", "o", "width="+x+", height="+y+", left=100, top=25,"
   + " innerwidth="+x+", innerheight="+y+", location=0,directories=0,"
   + " scrollbars=0, menubar=0, toolbar=0, status=0, resizable=1");
 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>Powiększenie</title><style type="text/css"><!--');
 okno.document.writeln('body {margin:0px; padding:0px; background:white;}');
 okno.document.writeln('img {display:block; border:0px;vertical-align:center}');
 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 podglad(url, x, y) {
 okno = window.open("", "o", "width="+x+", height="+y+", left=100, top=25,"
   + " innerwidth="+x+", innerheight="+y+", location=0,directories=0,"
   + " scrollbars=0, menubar=0, toolbar=0, status=0, resizable=1");
 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>Powiększenie</title><style type="text/css"><!--');
 okno.document.writeln('body {margin:0px; padding:0px; background:#DEDEDE url('+url+') 50% 50% fixed no-repeat;}');
 okno.document.writeln('--></style></head><body>');
 //okno.document.writeln('<a href="javascript:self.close()"><img ');
okno.document.writeln('</body></html>');
 okno.document.close();
 okno.focus();
}







