function show(nr,x,y) {
	if ((nr > -2) && (window.aktywne > 0) && (nr < 11)) {
										objekt2 = document.getElementById("subm"+window.aktywne);
										objekt2.style.visibility = 'hidden';
										window.aktywne = 0;
									}
	if ((nr == -2) && (window.aktywne > 10)) {
										objekt2 = document.getElementById("subm"+window.aktywne);
										objekt2.style.visibility = 'hidden';
										window.aktywne = Math.floor(window.aktywne / 10);
									}

	if (nr > -1) {
				objekt = document.getElementById("subm" + nr);
			   if(document.all) {
					objekt.style.posLeft = 230;
						if (nr >10) objekt.style.posLeft = 230 + 138;
					objekt.style.posTop = y - 90;
								     } else {
					szer = document.getElementById('calosc').clientWidth;
					szer = ((1280 - szer) / 2);
					if (szer % 2 != 0) szer = Math.floor(szer) + 1;
					if ((x - szer < 233) && (x < 500)) szer = x - 233;
					if ((x - szer < 371) && (x > 500)) szer = x - 371;
					objekt.style.left = x - (szer + 3);
					objekt.style.top = y;
								  	 }
//				document.form2.dodaj.value = 'aktywne = ' + window.aktywne;
				objekt.style.visibility = 'visible';
				window.aktywne = nr;
			}
}


function hide(nr,x1) {
	objekt = document.getElementById("subm" + nr);
	objekt.style.visibility = 'hidden';
		if (nr > 10) {
							nr_temp = Math.floor(nr / 10);
							objekt = document.getElementById("subm" + nr_temp);
							objekt.style.visibility = 'hidden';
						 }
	window.aktywne = 0;
}


function hidelewa(nr, poz) {
		objekt = document.getElementById("subm" + nr);
		if (poz < 200) {
								objekt.style.visibility = 'hidden';
								window.aktywne = 0;
							  }
}


function checkS(e){ 
// capture the mouse position 
    var posx = 0; 
    var posy = 0; 
    if (!e) var e = window.event; 
    if (e.pageX || e.pageY) 
    { 
        posx = e.pageX; 
        posy = e.pageY; 
    } 
    else if (e.clientX || e.clientY) 
    { 
        posx = e.clientX; 
        posy = e.clientY; 
    }
return posx;
}

function Show2(id)
{ 
	winwidth = 400;
	winheight = 400;
	xpoz = screen.width/2 - winwidth/2;
	ypoz = screen.height/2 - winheight/2;
	Nowe=null;
	Nowe=window.open("pokaz.php?id="+id, "","toolbar=no,menubar=no,location=no,personalbar=no, scrollbars=yes,status=no,directories=no,resizable=yes,height="+winheight+",width="+winwidth+",left="+xpoz+",top="+ypoz);
	Nowe.focus();
}

function Szczegoly(id) {
	winwidth = 800;
	winheight = 600;
	xpoz = screen.width/2 - winwidth/2;
	ypoz = screen.height/2 - winheight/2;
	Nowe=null;
	Nowe=window.open("szczegoly.php?id="+id, "","toolbar=no,menubar=no,location=no,personalbar=no, scrollbars=yes,status=no,directories=no,resizable=yes,height="+winheight+",width="+winwidth+",left="+xpoz+",top="+ypoz);
	Nowe.focus();
}

var bo_ns_id = 0;



function startIeFix(){

  if(isIE()){

    document.write('<div id="bo_ns_id_' + bo_ns_id + '"><!-- ');

  }

}



function endIeFix(){

  if(isIE()){

    document.write('</div>');

    var theObject = document.getElementById("bo_ns_id_" + bo_ns_id++);

    var theCode = theObject.innerHTML;

    theCode = theCode.substring(4 ,9+theCode.indexOf("</object>"))

    document.write(theCode);

  }

}



function isIE(){

  // only for Win IE 6+

  // But not in Windows 98, Me, NT 4.0, 2000

  var strBrwsr= navigator.userAgent.toLowerCase();

  if(strBrwsr.indexOf("msie") > -1 && strBrwsr.indexOf("mac") < 0){

    if(parseInt(strBrwsr.charAt(strBrwsr.indexOf("msie")+5)) < 6){

      return false;

    }

    if(strBrwsr.indexOf("win98") > -1 ||

       strBrwsr.indexOf("win 9x 4.90") > -1 ||

       strBrwsr.indexOf("winnt4.0") > -1 ||

       strBrwsr.indexOf("windows nt 5.0") > -1)

    {

      return false;

    }

    return true;

  }else{

    return false;

  }

}



/* 

<script type="text/javascript">startIeFix();</script>

>> FLASH <<

<!-- --><script type="text/javascript">endIeFix();</script>

*/



Nowe=null; 

function Show(id) { 

winwidth = 400;

winheight = 400;

xpoz = screen.width/2 - winwidth/2;

ypoz = screen.height/2 - winheight/2;

Nowe=null;

Nowe=window.open("pokaz.php?id="+id, "","toolbar=no,menubar=no,location=no,personalbar=no, scrollbars=yes,status=no,directories=no,resizable=yes,height="+winheight+",width="+winwidth+",left="+xpoz+",top="+ypoz);

Nowe.focus();

}

Nowe=null; 

function Show2(id) { 

winwidth = 400;

winheight = 400;

xpoz = screen.width/2 - winwidth/2;

ypoz = screen.height/2 - winheight/2;

Nowe=null;

Nowe=window.open("pokaz.php?id="+id, "","toolbar=no,menubar=no,location=no,personalbar=no, scrollbars=yes,status=no,directories=no,resizable=yes,height="+winheight+",width="+winwidth+",left="+xpoz+",top="+ypoz);

Nowe.focus();

}



Nowe=null; 

function Okienko(id) { 

winwidth = 500;

winheight = 500;

xpoz = screen.width/2 - winwidth/2;

ypoz = screen.height/2 - winheight/2;

Nowe=null;

Nowe=window.open(id, "","toolbar=no,menubar=no,location=no,personalbar=no, scrollbars=yes,status=no,directories=no,resizable=yes,height="+winheight+",width="+winwidth+",left="+xpoz+",top="+ypoz);

Nowe.focus();

}

Nowe=null; 

function Weekend() { 

winwidth = 600;

winheight = 250;

xpoz = screen.width/2 - winwidth/2;

ypoz = screen.height/2 - winheight/2;

Nowe=null;

Nowe=window.open("maj.php", "","toolbar=no,menubar=no,location=no,personalbar=no, scrollbars=yes,status=no,directories=no,resizable=yes,height="+winheight+",width="+winwidth+",left="+xpoz+",top="+ypoz);

Nowe.focus();

}

Nowe=null; 

function Klima() { 

winwidth = 890;

winheight = 300;

xpoz = screen.width/2 - winwidth/2;

ypoz = screen.height/2 - winheight/2;

Nowe=null;

Nowe=window.open("klima.php", "","toolbar=no,menubar=no,location=no,personalbar=no, scrollbars=yes,status=no,directories=no,resizable=yes,height="+winheight+",width="+winwidth+",left="+xpoz+",top="+ypoz);

Nowe.focus();

}

Nowe=null; 

function Wolne() { 

winwidth = 500;

winheight = 120;

xpoz = screen.width/2 - winwidth/2;

ypoz = screen.height/2 - winheight/2;

Nowe=null;

Nowe=window.open("wolne.php", "","toolbar=no,menubar=no,location=no,personalbar=no, scrollbars=yes,status=no,directories=no,resizable=yes,height="+winheight+",width="+winwidth+",left="+xpoz+",top="+ypoz);

Nowe.focus();

}
window.nr2 = 0;
window.aktywne = 0;