
function panorama(id,szer, wys ) {
	okno = window.open(id, "pano", "scrollbars=auto,resizable=no,status=no,height="+wys+",width="+szer);	
}

function openPictureWindow_Fever(imageName,imageWidth,imageHeight,alt,posLeft,posTop) {
	var scroll='no';
	var bgColor='#FFFFFF';
	var maxX=780;
	var maxY=640;
	if (maxX>window.screen.width) maxX=Math.ceil(window.screen.width*0.8);
	if (maxY>window.screen.height) maxY=Math.ceil(window.screen.height*0.8);
	var popupWidth=imageWidth;
	var popupHeight=imageHeight;
	if (popupWidth>maxX||popupHeight>maxY) {
	   if (popupWidth>maxX) {
	      if (imageHeight<maxY) popupHeight=eval(popupHeight)+20;
              popupWidth=maxX;
	   }
	   if (popupHeight>maxY) {
	      if (imageWidth<maxX) popupWidth=eval(popupWidth)+20;
              popupHeight=maxY;
	   }
	   scroll='auto';
	}
	var posLeft = Math.ceil( (window.screen.width-popupWidth) / 2 );
	var posTop = Math.ceil( (window.screen.height-popupHeight) / 2);

        var config="width="+popupWidth+",height="+popupHeight+",left="+posLeft+",top="+posTop+",scrollbars="+scroll;

	newWindow = window.open("","newWindow",config);
	newWindow.document.open();
	newWindow.document.write('<html><head><title>'+escape(alt)+'</title></head><body scroll="auto" bgcolor="'+bgColor+'" style="margin:0px;" onBlur="self.close()">');
	newWindow.document.write('<div align="center"><img src="'+imageName+'" width="'+imageWidth+'" height="'+imageHeight+'" alt="'+(alt)+'" /></div>');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

function openSite(Address) {  
  RandomInteger = Math.random() * 1000000000;
  WindowName = Math.ceil(RandomInteger);
  WindowName = WindowName.toString();
  window.open(Address,WindowName);
}

function OtworzOkno (obrazek, nazwa, tytul, szer, wys ) {
	okno = window.open("", nazwa, "scrollbars=auto,resizable=no,status=no,height="+wys+",width="+szer);	
	okno.document.write("<html><head><title>"+tytul+"</title></head>");
	okno.document.write("<body topmargin=0 leftmargin=0>");
	okno.document.write("<p><img border=0 src="+obrazek+" width="+szer+" height="+wys+"></p>");
	okno.document.write("</body></html>");
	okno.document.close();
	okno.focus();
}