function todo() {
  alert('Požadovaná funkce není v této verzi k dispozici.');
}

var Utils = new function() {
  
	this.getWindowWidth = function() {
		if (window.innerWidth) {
		  return window.innerWidth;
		} else if (document.body.parentElement.clientWidth != 0) {
		  return document.body.parentElement.clientWidth;
		} else {
			return document.body.clientWidth;
		}
	}

	this.getWindowHeight = function() {
		if (window.innerHeight) {
		  return window.innerHeight;
		} else if (document.body.parentElement.clientHeight != 0) {
		  return document.body.parentElement.clientHeight;
		} else {
			return document.body.clientHeight;
		}
	}

  this.getLeftForCenter = function(objectWidth) {
    return (Utils.getWindowWidth() - objectWidth) / 2;
  }
  
  this.getTopForCenter = function(objectHeight) {
    return (Utils.getWindowHeight() - objectHeight) / 2;
  }

  this.getObjectById = function(id)
  {
    if (document.getElementById)
      var returnVar = document.getElementById(id);
    else if (document.all)
      var returnVar = document.all[id];
    else if (document.layers)
      var returnVar = document.layers[id];
    return returnVar;
  }

  //Returns the version of Windows Internet Explorer or a -1
  //(indicating the use of another browser).
  this.getIEVersion = function() {
	  var rv = -1; // Return value assumes failure.
	  if (navigator.appName == 'Microsoft Internet Explorer')
	  {
		  var ua = navigator.userAgent;
		  var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
		  if (re.exec(ua) != null)
			  rv = parseFloat( RegExp.$1 );
	  }
	  return rv;
  }

	this.addEvent = function(obj, evType, fn) {
		if (obj.addEventListener) { 
			obj.addEventListener(evType, fn, false); 
			return true; 
		} else if (obj.attachEvent){ 
			var r = obj.attachEvent("on"+evType, fn); 
			return r; 
		} else { 
			return false; 
		} 
	}
}

var WaitMessage = new function() {
  this.box;
  this.timeout;
  
  this.initialize = function() {
    this.box = document.getElementById('waitMessageBox');
    this.box.style.top = ((Utils.getWindowHeight() - 50) / 3) + 'px';
    this.box.style.left = ((Utils.getWindowWidth() - 200) / 2) + 'px';
  }
  
  this.show = function() {
    this.timeout = setTimeout('WaitMessage.box.style.visibility="visible";', 500);
  }
  
  this.hide = function() {
    clearTimeout(this.timeout);
    this.box.style.visibility = 'hidden';
  }
}


