/*
 * Vymena obrazku s udanim jen jeho jmena s preload
 * format obrazku OVER: name.ext, OUT: nameo.ext
 * $Id: functions.js,v 1.1.1.1 2007/05/10 05:34:25 pavel Exp $
 */
 

function Del() {
	return confirm("Chcete data opravdu smazat?");
	}

function DelAll() {
	q=confirm("POZOR! \nBudou nenavratne smazana data!");
	if(q) q=Del();
	return q;
	}

function test_and_openWIN(url,target,x,y) {	
	if(!window.openedWin || !window.openedWin.name) {
		window.openedWin = window.open(url,target,'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width='+x+',height='+y+',left=30,top=30');
	}
	window.openedWin.focus();
}


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

function Activate() {
	return confirm("Povolit?");
}

function DeActivate() {
	return confirm("Zakazat?");
}

function getObj(name)
{
 if (document.getElementById) {
   return document.getElementById(name);
 } else
		if (document.all) {
			return document.all[name];
		} else
			if (document.layers) {
				return document.layers[name];
			} else return false;
}

function swapMenu( menu ) {
	mo = new getObj( menu );
	if ( mo != 'undefined' ) {
		if ( mo.style.display == 'none' ) {
			mo.style.display = 'block';
		} else {
			mo.style.display = 'none';
		}
		return true;
	}
	return false;
}
