  function ajax_monitoring(){
    ajax({          
          url: "ajax.php",
          type: "html",
          method: "GET",
          data: "akce=pocet_online_hracu",
          onSuccess: function(html){
            id('pocet_online_hracu').innerHTML = html;
          }
         } 
    );

    ajax({          
          url: "statistika_servery.html",
          type: "html",
          method: "GET",
          data: "akce=self",
          onSuccess: function(html){
            id('statistika_servery').innerHTML = html;
          }
         } 
    );
    
    ajax({          
          url: "ajax_online.html",
          type: "html",
          method: "GET",
          data: "akce=self",
          onSuccess: function(html){
            
          }
         } 
    );
   
    
    setTimeout(function(){
      ajax_monitoring(); 
    }, 30000);
  }


addEvent(window, "load", function() {

/* ajax  */

setTimeout(function(){
    ajax_monitoring(); 
  }, 30000);


/* naviz */

if(id("naviz")){
  var items = tag("li", id("naviz"));
  var contents = className("version_content", id("rcol"));
  for(var x = 0; x < items.length; x++){
    items[x].onclick = function(){
      for(var i = 0; i < items.length; i++){
        removeClass(items[i], "act");
        hide(contents[i]);
      }
      loop_busy = true;
      addClass(id(this.id), "act");
      show(id(this.id + "_content"));
    }
  }
}

if(id("navizx")){
  var loop_busy = false;
  var naviz_li = tag("li", id("naviz"));
  var naviz_index = 1;
  var version_content_length = className("version_content").length;
  setTimeout(function(){
    looping(); 
  }, 5000);
  
  function looping() {
    if(loop_busy == false){
      for(var x = 0; x < naviz_li.length; x++){
        removeClass(naviz_li[x], "act");
      }

      for(var x = 0; x < version_content_length; x++){
        hide(className("version_content")[x]);
      }    
    
    
      var naviz_li_id = naviz_li[naviz_index].id; 
      addClass(id(naviz_li_id), "act");
      show(id(naviz_li_id + "_content"));
      if(naviz_index < 2){
        naviz_index++;
      } else {
        naviz_index = 0;
      }
      setTimeout(function(){
        looping();
      }, 5000); 
    }
  }
}
/**/
  
if(id("search")){ 
  if(id("search").value == "") {
    id("search").value = "Hledaný výraz...";
  }
  id("search").onclick = function() {
    if(id("search").value == "Hledaný výraz...") {
      id("search").value = "";
    }
  };
  id("search").onfocus = function() {
    if(id("search").value == "Hledaný výraz...") {
      id("search").value = "";
    }
  };
  id("search").onblur = function() {
    if(id("search").value == "") {
      id("search").value = "Hledaný výraz...";
    }
  };
}  
  
if(id("f_user")){ 
  if(id("f_user").value == "") {
    id("f_user").value = "Login";
  }
  id("f_user").onclick = function() {
    if(id("f_user").value == "Login") {
      id("f_user").value = "";
    }
  };
  id("f_user").onfocus = function() {
    if(id("f_user").value == "Login") {
      id("f_user").value = "";
    }
  };
  id("f_user").onblur = function() {
    if(id("f_user").value == "") {
      id("f_user").value = "Login";
    }
  };
}  
  
if(id("f_pass")){ 
  if(id("f_pass").value == "") {
    id("f_pass").value = "pass";
  }
  id("f_pass").onclick = function() {
    if(id("f_pass").value == "pass") {
      id("f_pass").value = "";
    }
  };
  id("f_pass").onfocus = function() {
    if(id("f_pass").value == "pass") {
      id("f_pass").value = "";
    }
  };
  id("f_pass").onblur = function() {
    if(id("f_pass").value == "") {
      id("f_pass").value = "pass";
    }
  };
}  

        /* lang */

if(className("lang")[0]){
  var lang_a = tag("a", className("lang")[0]);
  for(var x = 0; x < lang_a.length; x++){
    lang_a[x].onmouseover = function(){
      addClass(this, "hover");
    };
    lang_a[x].onmouseout = function(){
      removeClass(this, "hover");    
    };    
  }
}
        /* nav */

if(id("nav")){
  var level_0_ul = tag("ul", id("nav"))[0];
  var level_1_ul = tag("ul", level_0_ul);
  var level_0_a = className("level_0", id("nav"));
  for(var x = 0; x < level_0_a.length; x++){
      level_0_a[x].onmouseover = function(){
        for(z = 0; z < level_0_a.length; z++){
          removeClass(level_0_a[z], "act");
        }
        addClass(this, "act")
        for(z = 0; z < level_1_ul.length; z++){
          hide(level_1_ul[z]);
        }
        if(tag("ul", this.parentNode)[0]){
          show(tag("ul", this.parentNode)[0]);
        }
      };
      level_0_a[x].onmouseout = function(){
        removeClass(this, "hover");    
      };    
    }
  
}


});

function Go(url) {
	wasOpen = false;
	win = window.open(url);
return false;
}