function pokaz_okno(url, width, height)
{
        var win = window.open(url,'','width=' + width + ',height=' + height + ',resizable=no,scrollbars=yes,menubar=no' );

}

  function invi(flag)
  {
    var attrib = (flag) ? 'hidden' : 'visible';
    if (document.getElementById) //IE5 lub NN6
    {
      document.getElementById("menu_sub").style.visibility = attrib;
    }
    else if (document.layers) //NN4
    {
      var attrib = (flag) ? 'hide' : 'show';
      document.layers["menu_sub"].visibility = attrib;
    }
  }
  
  
  function pokaz_flash(name, w, h)
  {
		document.write('<object  style="z-index:-1;" type="application/x-shockwave-flash"\n');
		document.write(' data="'+name+'" width="'+w+'" height="'+h+'">\n');
		document.write('<param name="movie" value="'+name+'" />\n');
		document.write('<param name="wmode" value="transparent" />\n');
		document.write('</object>\n');
  }
  
  function flash_bez_transparenu(name, w, h)
  {
		document.write('<object  style="z-index:-1;" type="application/x-shockwave-flash"\n');
		document.write(' data="'+name+'" width="'+w+'" height="'+h+'">\n');
		document.write('<param name="movie" value="'+name+'" />\n');
		document.write('</object>\n');
  }
  
  function sprawdz_form()
 {
	ok = true;
	
	var form = document.form;

	if(form.imie.value == "") {document.getElementById('imie_err').innerHTML = "wypełnij pole"; ok = false;}
	else document.getElementById('imie_err').innerHTML = "";
	
	if(form.firma.value == "") {document.getElementById('firma_err').innerHTML = "wypełnij pole";ok = false;}
	else document.getElementById('firma_err').innerHTML = "";
		
	if(form.tel.value == "") {document.getElementById('tel_err').innerHTML = "wypełnij pole"; ok = false;}
	else document.getElementById('tel_err').innerHTML = "";
	
	if(form.email.value == "") {document.getElementById('email_err').innerHTML = "wypełnij pole"; ok = false;}
	else document.getElementById('email_err').innerHTML = "";
	
	if(form.panstwo.value == "") {document.getElementById('panstwo_err').innerHTML = "wypełnij pole"; ok = false;}
	else document.getElementById('panstwo_err').innerHTML = "";
	
	if(form.miasto.value == "") {document.getElementById('miasto_err').innerHTML = "wypełnij pole"; ok = false;}
	else document.getElementById('miasto_err').innerHTML = "";
	
	return ok;

 }
 
 function displayimg(url, tytul, width, height) {
        var win = window.open('','tytul','width=' + width + ',height=' + height + ',resizable=no,scrollbars=no,menubar=no' );
 

var frameString=""+
"<html>"+
"<head>"+
"<title>"+tytul+"</title>"+
"<body leftmargin=\"0\" rightmargin=\"0\" topmargin=\"0\" bottommargin=\"0\" marginheight=\"0\" marginwidth=\"0\"><div style=\"text-align:center;\"><a href=\"JavaScript:this.close();\"> <img src="+url+" border=\"0\"></a></div></body>"
"</html>"

	win.document.open();
    	win.document.write(frameString)
   	win.document.close()



}

 function displayimg_s(url, tytul, width, height) {
        var win = window.open('','tytul','width=' + width + ',height=' + height + ',resizable=no,scrollbars=yes,menubar=no' );
 

var frameString=""+
"<html>"+
"<head>"+
"<title>"+tytul+"</title>"+
"<body leftmargin=\"0\" rightmargin=\"0\" topmargin=\"0\" bottommargin=\"0\" marginheight=\"0\" marginwidth=\"0\"><div style=\"text-align:center;\"><a href=\"JavaScript:this.close();\"> <img src="+url+" border=\"0\"></a></div></body>"
"</html>"

	win.document.open();
    	win.document.write(frameString)
   	win.document.close()



}
