function $(id) {
   return document.getElementById(id);
}

function kopirovat() {
   document.execCommand("Copy");
}

function bookmarksite(title,url) {
   if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
   else if(window.opera && window.print) { // opera
	var elem = document.createElement("a");
	elem.setAttribute("href",url);
	elem.setAttribute("title",title);
	elem.setAttribute("rel","sidebar");
	elem.click();
   } else if(document.all) // ie
	window.external.AddFavorite(url, title);
}

function getAjax() {
   var ajaxDiv = $("loader");
   ajaxDiv.style.visibility = "visible";
   if (document.all) {
         ajaxDiv.innerHTML = '<img src="grafika/ajax-loader.gif" alt="ajax loading">';
   }
}

function setFocus() {
   var txt = $("url");
   if(txt!=null) {
      var val = txt.value;
      txt.value = "";
      if(document.all) {
         txt.focus();
      }
      txt.value = val;
      txt.focus();
   }
}

window.onload = function() {
   // anti autohits/autosurf & iframes
   if (top.location != self.location) {
      top.location = self.location.href;
   }
   if($("jsenable")) {
      $("jsenable").value = "1";
   }
   setFocus();
}