function getID(id,doc)
{
	if (!doc) doc = document;
	if (document.all) return doc.all[id];
	else return doc.getElementById(id);
}
/* opens window and cancels the event if successfull */
function openAWin(path,width,height,ev) 
{
	if (!ev) ev = window.event;
	if (!ev) { alert("No event in openAWin"); return false; }
	if (!openWin(path,width,height)) return null;
	stopDefault(ev); stopBubble(ev);
	return false;
}

function openWin(path,width,height) {
    if(!width || !height) anewWin = window.open(path,'_blank','menubar=yes,toolbar=yes,location=yes,directories=yes,fullscreen=no,titlebar=yes,hotkeys=yes,status=yes,scrollbars=yes,resizable=yes');
	else anewWin = window.open(path,"stranky","width="+width+",height="+height+",toolbar=0,directories=0,menubar=0,status=0,scrollbars=yes,resizable=yes");
	return anewWin;
}
function stopBubble(e)
{
	if (e.stopPropagation) e.stopPropagation();
	else e.cancelBubble = true;
}
function stopDefault(e)
{
	if (e.preventDefault) e.preventDefault();
	else e.returnValue = false;
}

