function podglad_zdjecia(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("<html>");				
	okno.document.writeln("<head>");				
	okno.document.writeln("</head>");				
	okno.document.writeln("<body style='margin:0'>");				
	okno.document.writeln("<a href='javascript:window.close();'><img border=0 src="+url+"></a>");				
	okno.document.writeln("</body>");				
	okno.document.writeln("</html>");				
	okno.document.close();				
	okno.focus();				
}				

function tworz_okno(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(url);				
	okno.document.close();				
	okno.focus();				
}				

  function otworz(sciezka, w,h, okno)
  {
	  if(window.screen){
			aw=screen.availWidth;
			ah=screen.availHeight;
		}
		else{
			aw=640;
			ah=450;
		}
		
		ustawienia=
		"left=" + (aw-w)/2 + ","
		+"top=" + (ah-h)/2 + ","
		+"screenX=" + (aw-w)/2 + ","
		+"screenY=" + (ah-h)/2 + ","
		+"width=" + w + ","
		+"height=" + h + ","
		+"innerWidth=" + w + ","
		+"innerHeight=" + h + ","
		+"toolbar=no,"
		+"location=no,"
		+"directories=no,"
		+"status=yes,"
		+"menubar=no,"
		+"scrollbars=no,"
		+"resizable=no";		
		
		open(sciezka, okno, ustawienia);
	}

	
function t(tresc,v,e,t, typ){
  if (window.scrollX>=0) { // przesuniêcie i wymiar okna dla Netscape, Firefox
    przesY = window.scrollY;
  } else { // dla IE, Opery
    przesY = document.body.scrollTop
  }
  
	d=document; 
	if (typeof window.innerWidth!='undefined') { 
		var winWidth = window.innerWidth; 
		var winHeight = window.innerHeight; 
	} else { 
		if (d.documentElement && typeof d.documentElement.clientWidth!='undefined' && d.documentElement.clientWidth!=0) { 
		var winWidth = d.documentElement.clientWidth 
		var winHeight = d.documentElement.clientHeight 
		} else { 
  			if (d.body && typeof d.body.clientWidth!='undefined') { 
		  		var winWidth = d.body.clientWidth 
				var winHeight = d.body.clientHeight 
			} 
		} 
	}
	
  if(!document.createElement)return
  t=document.createElement("div")
  t.move=function(e){
    e=e||event
    
    wys = t.clientHeight+22;
    
    if (e.clientY+wys > winHeight)
    wys = -(wys)+22;
    else
    wys = 22;

    t.style.left=e.clientX+15+"px"
    t.style.top=e.clientY+przesY+wys+"px"
  }
  t.hide=function(x){
    if(x=document.getElementById(typ)) document.body.removeChild(x)
  }
  t.move(e);
  t.id=typ
  t.innerHTML=tresc
  document.body.appendChild(t)
  v.onmouseout=t.hide
  v.onmousemove=t.move
}

function o(t, typ){
  if (x=document.getElementById('tooltip')) document.body.removeChild(x);
}
