// GIS otevrit mapu
var doc_mapa = null;
var path = "http://mapy.kr-kralovehradecky.cz/gis/isapi.dll?MU=INTERNET&LANG=CS-CZ&MAP=";
var url = '';

function openMapa (strMapa, strObec) {
//alert (strMapa + ' /// ' + strObec);
	width=screen.width -180;
	height=screen.height-150;
	if (( strMapa ) && ( strObec )) {
		url = path + strMapa + strObec; 
	}  
	else if ((strMapa) && (strObec == '')){
		url = path + strMapa; 
	} else {
		alert ( 'Prosím, vyberte mapu!' );
	}
	if (url) {
		if (( doc_mapa == null) || (doc_mapa.closed)){
			doc_mapa=window.open('','mapa','toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes,resize=yes,width='+width+',height='+height+',top=100,left=175');
			doc_mapa.focus();
			//doc_mapa.document.location = url;
			doc_mapa.window.location.href = url;
		} else {
			doc_mapa.focus();
			doc_mapa.window.location.href = url;
		}
	}
}


function getCenterW(width) {
	return parseInt( eval( (screen.width-parseInt(width))/2 ) );
}
function getCenterH(height) {
	return parseInt( eval( (screen.height-parseInt(height))/2 ) );
}
