function Del(){
	return confirm("Chcete data opravdu smazat?");
	}
function DelAll(){
	q=confirm("POZOR! Bude se mazat skupina dat!");
	if(q) q=Del();
	return q;
	}

function openWIN(target,x,y) {

	var left = 10;
	var top = 10;

	// check dest screen size
	if (x > (self.window.screen.availWidth - left))
		x = self.window.screen.availWidth - left;
	if (y > (self.window.screen.availHeight - top))
		y = self.window.screen.availHeight - top;

	popWin=window.open('',target,'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width='+x+',height='+y+',left='+left+',top='+top);
	popWin.focus();
}

function openWinURL(url,target,x,y) {

	var left = 10;
	var top = 10;

	// check dest screen size
	if (x > (self.window.screen.availWidth - left))
		x = self.window.screen.availWidth - left;
	if (y > (self.window.screen.availHeight - top))
		y = self.window.screen.availHeight - top;

	popWin=window.open(url,target,'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width='+x+',height='+y+',left='+left+',top='+top);
	popWin.focus();
}

// ----- Otevreni noveho okna ve stredu obrazovky -----
function openWINcenter(page,target,dx,dy){
	x=(screen.width-dx)/2;
	y=(screen.height-dy)/2;
	openWINxy(page,target,dx,dy,x,y);
}

// ----- Otevreni noveho okna na pozici [x,y] -----
function openWINxy(page,target,dx,dy,x,y){
	popWin=window.open(page,target,'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width='+dx+',height='+dy+',left='+x+',top='+y);
	popWin.focus();
}

// DHTML
function getObj(id) {
	return document.getElementById(id);
}

function getContent(url, target) {
	return getRequest(url, target);
}

// ----- Zobrazi/skryje objekt -----
function display_swap(id) {
	obj = getObj(id);
	if (obj!='undefined' && obj!=null) {
		if (obj.style.display == 'none') {
			obj.style.display = 'block';
		} else {
			obj.style.display = 'none';
		}
	}
}