

function openCenter(url, name, width, height, parametr)                  //otevre nove okno a vycentruje jej na obrazovce
	
	{
		
var res="scrollbars=no";



if (window.screen.availWidth <= (width+50)) {width = (window.screen.availWidth - 100); var res="scrollbars=yes";}
if (window.screen.availHeight <= (height+50)) {height = (window.screen.availHeight - 150); var res="scrollbars=yes";}



if (window.screen) 

   {
    var CenterX = (screen.availWidth - width) / 2;		// vypocet centra obrazovky
    var CenterY = (screen.availHeight - height) / 2;		
   }  


var outputW = ", width=" + width + ",innerWidth=" + width;		// vytvoreni HTML codu
var outputH = ", height=" + height + ",innerhHight=" + height;
var position = ",left=" + CenterX + ",top=" + CenterY + ",screenX=" + CenterX + ",screenY=" + CenterY;



var str = "toolbar=no, location=no, directories=no, status=no, menubar=no, " + res + ", resizable=no, copyhistory=no" + outputH + outputW + position;


return window.open(url, name, str);

}  
  

function openNewWindowMax () 

{
	
var CenterX = 0;
var CenterY = 0;

var width = window.screen.availWidth;
var height = window.screen.availHeight;
	
var outputW = ", width=" + width + ",innerWidth=" + width;		// vytvoreni HTML codu
var outputH = ", height=" + height + ",innerhHight=" + height;
var position = ",left=" + CenterX + ",top=" + CenterY + ",screenX=" + CenterX + ",screenY=" + CenterY;

var str = "toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, " + res + ", resizable=yes, copyhistory=yes" + outputH + outputW + position;

    return window.open('http://localhost/', 'name', str);
}

function inform()
{
alert('You have closed the gallery window!!!');
}


function focusOpener() {
    
    
    this.window.close();
        
    
   
}
    	


