
function invi(flag,id)
  {
    var attrib = (flag) ? 'hidden' : 'visible';
    if (document.getElementById) //IE5 lub NN6
    {
      document.getElementById(id).style.visibility = attrib;
    }
    else if (document.layers) //NN4
    {
      var attrib = (flag) ? 'hide' : 'show';
      document.layers[id].visibility = attrib;
    }
  }



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.adres.value == "") {document.getElementById('adres_err').innerHTML = "wypełnij pole"; ok =  false;}
	else document.getElementById('adres_err').innerHTML = "";
		
	if(form.telefon.value == "") {document.getElementById('telefon_err').innerHTML = "wypełnij pole"; ok = false;}
	else document.getElementById('telefon_err').innerHTML = "";
	
	return ok;

 }

 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');
  }
 
 
 
 
// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=ffffff scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' onclick="window.close();" style="display:block"></body></html>');
close();		
}}




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 Menu(id, style, otworz, wysun, czasRozwin, czasZwin, czasOtworz, czasZamknij)
{
	if (typeof czasRozwin == 'undefined' || czasRozwin < 0) czasRozwin = 25;
	if (typeof czasZwin == 'undefined' || czasZwin < 0) czasZwin = 25;
	if (typeof czasOtworz == 'undefined' || czasOtworz < 0) czasOtworz = 250;
	if (typeof czasZamknij == 'undefined' || czasZamknij < 0) czasZamknij = 500;
	
	if (style)
	{
		style = style.replace(/(^\s+|(\s|;)+$)/g, '').split(/\s*;\s*/);
		for (var i = 0; i < style.length; i++)
		{
			style[i] = style[i].split(/\s*:\s*/);
			for (var j = 0, c, property = ''; j < style[i][0].length; j++)
			{
				c = style[i][0].charAt(j);
				property += c == '-' ? style[i][0].charAt(++j).toUpperCase() : c.toLowerCase();
			}
			eval('document.getElementById("' + id + '").style.' + property + ' = "' + style[i][1].replace(/"/g, '\\"') + '"');
		}
	}
	
	for (var i = 0; i < document.getElementById(id).getElementsByTagName('dt').length; i++)
	{
		var dd = new Array();
		var el = document.getElementById(id).getElementsByTagName('dt')[i].nextSibling;
		var nodeName;
		while (el && (nodeName = el.nodeName.toLowerCase()) != 'dt')
		{
			if (nodeName == 'dd')
			{
				el._dt = document.getElementById(id).getElementsByTagName('dt')[i];
				if (otworz)
				{
					el.onmouseover = function()
					{
						clearTimeout(this._dt._timoutID);
						this._dt._displayed = false;
						this._dt.onclick();
					}
					el.onmouseout = function()
					{
						clearTimeout(this._dt._timoutID);
						var dt = this._dt;
						this._dt._timoutID = setTimeout(function () { dt._displayed = true; dt.onclick(); }, czasZamknij);
					};
				}
				dd[dd.length] = el;
			}
			el = el.nextSibling;
		}
		document.getElementById(id).getElementsByTagName('dt')[i]._dd = dd;
		document.getElementById(id).getElementsByTagName('dt')[i]._timoutID = null;
		document.getElementById(id).getElementsByTagName('dt')[i]._displayed = false;
		document.getElementById(id).getElementsByTagName('dt')[i].onclick = function()
		{
			clearTimeout(this._timoutID);
			if (!this._displayed)
			{
				var el = this.parentNode.getElementsByTagName('dt')[0];
				while (el)
				{
					if (el.nodeName.toLowerCase() == 'dt' && el != this)
					{
						el._displayed = false;
						if (czasZwin) display(el, 0);
						else display(el);
					}
					el = el.nextSibling;
				}
			}
			this._displayed = !this._displayed;
			if (this._displayed && czasRozwin || !this._displayed && czasZwin) display(this, 0);
			else display(this);
		};
		if (otworz)
		{
			document.getElementById(id).getElementsByTagName('dt')[i].onmouseover = function()
			{
				clearTimeout(this._timoutID);
				var dt = this;
				this._timoutID = setTimeout(function () { dt._displayed = false; dt.onclick(); }, czasOtworz);
			};
			document.getElementById(id).getElementsByTagName('dt')[i].onmouseout = function()
			{
				clearTimeout(this._timoutID);
				var dt = this;
				this._timoutID = setTimeout(function () { dt._displayed = true; dt.onclick(); }, czasZamknij);
			};
		}
	}
	
	for (var i = 0; i < document.getElementById(id).getElementsByTagName('dd').length; i++)
	{
		with (document.getElementById(id).getElementsByTagName('dd')[i])
		{
			if (getElementsByTagName('a').length && getElementsByTagName('a')[0].href && unescape(getElementsByTagName('a')[0].href) == unescape(window.location.href)) className = (className ? className + ' ' : '') + 'active';
		}
	}
	
	start(document.getElementById(id).getElementsByTagName('dt')[0]);
	
	function start(dt)
	{
		var hide = true;
		var el = dt;
		while (el)
		{
			var nodeName = el.nodeName.toLowerCase();
			if (nodeName == 'dt')
			{
				dt = el;
				hide = true;
			}
			else if (nodeName == 'dd')
			{
				if (el.getElementsByTagName('a').length && el.getElementsByTagName('a')[0].href && unescape(el.getElementsByTagName('a')[0].href) == unescape(window.location.href))
				{
					dt._displayed = true;
					display(dt);
					hide = false;
					var el_parentNode = el.parentNode;
					while (el_parentNode != document.getElementById(id))
					{
						if (el_parentNode.nodeName.toLowerCase() == 'dd')
						{
							var el_sibling = el_parentNode.previousSibling;
							while (el_sibling)
							{
								if (el_sibling.nodeName.toLowerCase() == 'dt')
								{
									el_sibling._displayed = true;
									display(el_sibling)
									break;
								}
								el_sibling = el_sibling.previousSibling;
							}
						}
						el_parentNode = el_parentNode.parentNode;
					}
				}
				if (hide) el.style.display = 'none';
				start(el.getElementsByTagName('dt')[0]);
			}
			el = el.nextSibling;
		}
	}
	
	function display(dt, i)
	{
		if (typeof i == 'undefined')
		{
			for (var i = 0; i < dt._dd.length; i++)
			{
				dt._dd[i].style.display = dt._displayed ? 'block' : 'none';
			}
		}
		else if (i < dt._dd.length)
		{
			var dir = wysun ? !dt._displayed : dt._displayed;
			dt._dd[dir ? i : dt._dd.length - 1 - i].style.display = dt._displayed ? 'block' : 'none';
			dt._timoutID = setTimeout(function() { display(dt, i + 1); }, dt._displayed ? czasRozwin : czasZwin);
		}
	}
}


  
