function setFocus(id) {
	document.getElementById(id).focus();
}

function showDetail(obsah,width,height) {
	okno=window.open(obsah,'detail','scrollbars=yes,resizable=yes,resize=yes,width='+width+',height='+height+',screenX='+getCenterW(width)+',screenY='+getCenterH(height)+',top='+getCenterH(height)+',left='+getCenterW(width));
	okno.focus();
}

function getCenterW(width) {
	return parseInt( eval( (screen.width-parseInt(width))/2 ) );
}

function getCenterH(height) {
	return parseInt( eval( (screen.height-parseInt(height))/2 ) );
}

function gup( script,name ) {
	var result='';
	$('script').each(function(){
		var s=$(this).attr('src');
		if (s.indexOf(script)>=0) {
			name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
		  var regexS = "[\\?&]"+name+"=([^&#]*)";
		  var regex = new RegExp( regexS );
		  var results = regex.exec(s);
		  if( results != null )
		    result=results[1];
		}
	});
	return(result);
}

