<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function Show_Hide() { 
	  var args,visSTR;
	  args = Show_Hide.arguments;
	  if (navigator.appName == 'Netscape' && document.layers != null) { // detekce prohlizce
         document.layers['main'].document.layers[args[0]].visibility = args[1]; //pro vnorene layers
	    }
		else {
	  	     visSTR = 'hidden';
	     if (args[1] == 'show') visSTR = 'visible';
	     document.all[args[0]].style.visibility = visSTR;
	    }
}

function nahled(id,w,h) {
 window.open("/engine/malynahled.asp?soubor="+id,"Qpay","width="+w+",height="+h+",toolbar=0,directories=0,menubar=0,status=0,resizable=0,location=0,scrollbars=0,copyhistory=0");
}

function registerIN() {
 parent.leftFrame.location = '/engine/menu_obs.asp';
 //parent.leftFrame.location.reload();
 parent.topFrame.location.reload();
}

function showW() {
 if (navigator.appName.indexOf("Microsoft") > -1) {
 t = parent.mainFrame.document.body.scrollTop;
 tt = parent.mainFrame.document.all['work'].style.top;
 parent.mainFrame.document.all['work'].style.top=parseInt(t)+parseInt(tt)+111;
 parent.mainFrame.document.all['work'].style.visibility = 'visible';
 }
 parent.mainFrame.document.selproj.submit();
}

function report(rid) {
 
 if (document.selproj != null) {
    if (document.selproj.oddate != null)  {
	 p = '/analyzer/report'+rid+'.obs?menuvis='+document.selproj.menuvis.value+'&oddate='+document.selproj.oddate.value+'&todate='+document.selproj.todate.value }
    else {
         p = '/analyzer/report'+rid+'.obs?menuvis='+document.selproj.menuvis.value }
 }
 else {
   p = '/analyzer/report'+rid+'.obs';
 }
 preloader();
 document.location = p;

}

function kalendar(par)
      {
 window.open("/engine/kalendar.obs?kam="+par,"kalender","width=151,height=187,toolbar=0,directories=0,menubar=0,status=0,resizable=0,location=0,scrollbars=0,copyhistory=0,left=300,top=250");
}

function vepis_datum(par,coden) {
if (par=='od') 
 {
  document.selproj.oddate.value=coden;
 }
 else
 {
 document.selproj.todate.value=coden;
 }
}

function order(co, desc) {
 document.selproj.order.value=co;
 document.selproj.desc.value=desc;
document.selproj.submit();
}
function goback(kolik) {
 document.selproj.posun.value=parseInt(document.selproj.posun.value)-parseInt(kolik);
 document.selproj.submit();
}
function goforw(kolik) {
 document.selproj.posun.value=parseInt(document.selproj.posun.value)+parseInt(kolik);
 document.selproj.submit(); 
}

function zmena() {
 document.selproj.posun.value='0';
 preloader();
 document.selproj.submit(); 
}

function kategorie()
{
 window.open("/engine/kategorie.obs","kategorie","width=301,height=530,toolbar=0,directories=0,menubar=0,status=0,resizable=0,location=0,scrollbars=0,copyhistory=0,left=300,top=250");
}

function priprava()
{
 window.open("/engine/pripravujese.obs","kategorie","width=300,height=230,toolbar=0,directories=0,menubar=0,status=0,resizable=0,location=0,scrollbars=0,copyhistory=0,left=300,top=250");
}

function rephelp(id)
{
 window.open("/engine/rephelp.asp?id="+id,id,"width=600,height=250,toolbar=0,directories=0,menubar=0,status=0,resizable=0,location=0,scrollbars=0,copyhistory=0,left=300,top=250");
}

function keyhelp(id)
{
 window.open("/engine/keywin.asp?id="+id,id,"width=600,height=250,toolbar=0,directories=0,menubar=0,status=0,resizable=0,location=0,scrollbars=0,copyhistory=0,left=300,top=250");
}


function ikona(ids)
{
 window.open("/engine/geticon.asp?IDS="+ids,"ikona","width=600,height=650,toolbar=0,directories=0,menubar=0,status=0,resizable=1,location=0,scrollbars=0,copyhistory=0,left=300,top=150");
}

function set_kat(id, nazev) {
 document.serverform.idk.value=id;
 document.serverform.kategorie.value=nazev;
}

function set_icon(ids,idk) {
 if (ids != -1) {
 parent.location='/engine/webserver.obs?IDS='+ids+'&idikony='+idk;
 }
}

function VIDdetails(VID,SID)
{
 window.open("/engine/VID.asp?VID="+VID+"&SID="+SID,VID,"width=600,height=600,toolbar=0,directories=0,menubar=0,status=1,resizable=1,location=0,scrollbars=0,copyhistory=0,left=300,top=250");
}

 function redir(wh,fr) {
 	parent.frames[fr].location.replace(wh);
 }
 
function dodelat()
{
 window.open("/engine/pripravujese.asp","pripravujese","width=600,height=250,toolbar=0,directories=0,menubar=0,status=1,resizable=1,location=0,scrollbars=0,copyhistory=0,left=300,top=250");
}

function geticons(SID)
{
 window.open("/engine/geticons.obs?SID="+SID,"GETICON","width=640,height=450,toolbar=0,directories=0,menubar=0,status=1,resizable=1,location=0,scrollbars=0,copyhistory=0,left=300,top=250");
}

// MENU - START

var timer, i, menuId;

var dom = document.getElementById ? true : false;
var ie4 = ((document.all) && (!dom)) ? true : false;
var ns4 = document.layers ? true : false;
var opera = navigator.userAgent.indexOf('Opera') != -1 ? true : false;
var dhtml = dom ? true : ie4 ? true : ns4 ? true : false;

if (dhtml) document.write ('<style type="text/css">#scriptSupport {display: none;} #menuHolder {position: relative; visibility: hidden; z-index: 1;} #hiddenMenu1, #hiddenMenu2, #hiddenMenu3, #hiddenMenu4, #hiddenMenu5 {position: absolute; visibility: hidden;} #visibleMenu1 {position: absolute; left: 0px; top: 0px;} #visibleMenu2 {position: absolute; left: 172px; top: 0px;} #visibleMenu3 {position: absolute; left: 320px; top: 0px;} #visibleMenu4 {position: absolute; left: 465px; top: 0px;} #visibleMenu5 {position: absolute; left: 610px; top: 0px;} #hiddenMenu1 {left: 1px; top: 19px;} #hiddenMenu2 {left: 175px; top: 19px;} #hiddenMenu3 {left: 611px; top: 19px;}</style>');

function setVisibility(element,newVisibility)
{ 
  if (dhtml)
  {
    if (newVisibility == 'visible' & element == 'hiddenMenu3') if (document.selproj != null) document.selproj.sid.style.visibility="hidden";
    if (newVisibility == 'hidden' & element == 'hiddenMenu3') if (document.selproj != null) document.selproj.sid.style.visibility="visible";	
    if (dom) document.getElementById(element).style.visibility = newVisibility;
    else if (ie4) document.all[element].style.visibility = newVisibility;
    else if (ns4) eval('document.' + element + '.visibility = newVisibility');
  }
}


function preloader() 
{
if (document.getElementById("datawork") != null) {
t = document.body.scrollTop;
tt = document.getElementById("datawork").style.top;
document.getElementById("datawork").style.top=parseInt(t)+parseInt(tt)+115;
document.getElementById("datawork").style.visibility = 'visible';
}
}

function menu()
{
  if (dhtml)
  {
    if (opera) for (i = 1; i <= 3; i++) document.getElementById('hiddenMenu' + i).style.top = 20;
    if (ie4) for (i = 1; i <= 3; i++) document.all['hiddenMenu' + i].style.top = 18;
    setVisibility('menuHolder','visible');
  }
}

function showMenu(id)
{
 MM_swapImgRestore();
 MM_swapImage('Image'+id,'','../images/menu1_horni/'+id+'_on.gif',1)
  if (dhtml)
  {
    clearTimeout(timer);
    for (i = 1; i <= 3; i++) if (i != id) setVisibility((ns4 ? 'menuHolder.document.' : '') + 'hiddenMenu' + i,'hidden');
    setVisibility((ns4 ? 'menuHolder.document.' : '') + 'hiddenMenu' + id,'visible');
  }
}

function hideMenu(id)
{
  if (dhtml)
  {
    menuId = (ns4 ? 'menuHolder.document.' : '') + 'hiddenMenu' + id;
    timer = setTimeout("setVisibility(menuId,'hidden');MM_swapImgRestore()",50);
  }
}

function dontHideMenu()
{
  if (dhtml) clearTimeout(timer);
}

// MENU - END

function RepMenuClick(menuid) {
  if (document.getElementById('obr'+menuid).style.display == 'none') {
     v=0;
	 } else {
	  v=1;
 }
  if (v  == 0) {
    MM_swapImage('reptl'+menuid,'','../images/tlacitka/'+menuid+'_on.gif',1)
    document.getElementById('obr'+menuid).style.display='block';
	document.getElementById('mezera'+menuid).style.display='block';
 } else {
     MM_swapImage('reptl'+menuid,'','../images/tlacitka/'+menuid+'.gif',1)
    document.getElementById('obr'+menuid).style.display='none';
	document.getElementById('mezera'+menuid).style.display='none'; 
 }
 vis = ''
 for (i = 1; i <=7; i++) {
  if (i==7) {oddelovac=''} else {oddelovac=',' }
  if (document.getElementById('obr'+i).style.display == 'none') { vis = vis + 0 + oddelovac } else { vis = vis + 1 + oddelovac }
 }
if (document.selproj != null)  document.selproj.menuvis.value=vis;
}


//-->


