// JavaScript Document

function openWindow(link, winName, x, y) { 
	if(x>screen.width) {
		x = screen.width;
	}
	if(y>screen.height-200) {
		y = screen.height-200;
	}
	var horni = (screen.height / 2) - (y / 2);
	var levy = (screen.width / 2) - (x / 2);
	//document.write('screen.width:'+screen.width+'/screen.height:'+screen.height+'/x:'+x+'/y:'+y+'/levy:'+levy+'/horni:'+horni);

	var retValue=true;
	if (myTWin!=null && !myTWin.closed) {
		myTWin.focus();
		myTWin.location.href=link.href;
	} else {
		myTWin=window.open(link.href,winName,'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width='+x+', height='+y+', top='+horni+', left='+levy+'');
		if (myTWin==null || typeof(myTWin)=="undefined") {
			retValue=false;
		} else { 
			link.target=winName; 
			myTWin.focus(); 
		} 
	} 
	return retValue; 
}
function openWindow(href, nazev) {

	return seznam = window.open(href, nazev, 'toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes, width='+screen.width+', height='+screen.height+', top=0, left=0');

}
