/*
 * Vymena obrazku s udanim jen jeho jmena s preload
 * format obrazku OVER: name.ext, OUT: nameo.ext
 * $Id: functions.js,v 1.2 2007/11/13 15:48:38 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 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, set ) {
	mo = new getObj( menu );
	if ( mo != 'undefined' ) {
		if (set == 'on') {
			mo.style.display = 'block';
			return true;
		}
		if (set == 'off') {
			mo.style.display = 'none';
			return true;
		}
		if ( mo.style.display == 'none' ) {
			mo.style.display = 'block';
		} else {
			mo.style.display = 'none';
		}
		return true;
	}
	return false;
}

