/* prikaže tekst pri ikonah v orodni vrstici */
function showIconText(id, total)
{
	var el;
            for (i=total;i>0;i--)
            {
           		el = document.getElementById('divToolbarText' + i);
              if (el != null)
    					{
		                 if (i!=id)
                      {
                      	el.style.display = 'none';
                      }
                      else 
                      {
                      el.style.display = 'inline';
                      }
           		}
           	}
}

function hideIconText(id)
{
            document.getElementById('divToolbarText' + id).style.display = 'none';
}

/* na vrh strani */
var b2tx=80, b2ty=86;

function b2x()
{
	return ((moz) ? window.innerWidth - 20 : document.body.clientWidth) - b2tx;
}

function b2y()
{
	return ((moz) ? window.innerHeight : document.body.clientHeight) + b2o() - b2ty;
}

function b2o()
{
	return (moz) ? window.pageYOffset : document.body.scrollTop;
}

function b2t()
{
	with(document.getElementById('toppage').style)
	{
		left = ((b2o() < 80) ? - 500 : /*b2x()*/ /*poravnava levo*/ 780) + 'px';
		top = ((b2o() < 80) ? - 500 : b2y()) + 0 + 'px';
	}
		setTimeout('b2t()',99);
}

/* tiskanje */
var strQueryString;
strQueryString = '';

function printframe()
{
  parent.frame_print_bottom.focus();
  parent.frame_print_bottom.print();
}

function printpreview()
{
  var scrnwdth = 0;
  var scrnhght = 0;
  var wdth = 640;
  var hght = 450;
  var lft;
  var tp;
  if((window.screen) && (screen.width) && (screen.height)) {scrnwdth = screen.width; scrnhght = screen.height;}
  if(scrnwdth != 0) lft = (scrnwdth - wdth)/2;
  if(scrnhght != 0) tp = (scrnhght - hght)/2;
  var prn = null;
  prn = window.open('tiskanje_frameset.html', 'prnwnd', 'width=' + wdth + ',height=' + hght + ',left=' + lft + ',top=' + tp + ',screenX=' + lft + ',screenY=' + tp + ',menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes');
  if (prn.blur) prn.focus();
}


function DoLogout(url, message)
{
   if (!confirm(message))
    return 
   else
     window.location=url;
}