var ClientVersion;
var Loaded    = 0;
var IExplorer = 0;
var xMargin   = 10;
var yMargin   = 10;

function GoToTop() {
	if (Loaded == 0) { return; }
	if (IExplorer) {
		x = document.body.clientWidth - idGoToTop.width - xMargin;
		y = document.body.clientHeight - idGoToTop.height - yMargin;

		x += document.body.scrollLeft;
		y += document.body.scrollTop;

		idGoToTop.style.pixelTop = y;
		idGoToTop.style.pixelLeft = x;
	}
}

function OnLoadEvent() {
	ClientVersion = parseInt(navigator.appVersion);
	if (navigator.appName == "Microsoft Internet Explorer") {
		IExplorer = 1;
		if (navigator.userAgent.indexOf ("MSIE 5") != -1) {
			ClientVersion = 5;
		}
	}
	if (ClientVersion >= 4) {
		window.setInterval("GoToTop()", 200);
	}
}

window.onload=OnLoadEvent;
Loaded = 1;


function CurTime() {
	tCtrl = document.all["time"];
	today   = new Date();
	hours   = today.getHours();
	minutes = today.getMinutes();
	seconds = today.getSeconds();
	timeVal = "- " + hours;
	timeVal += ((minutes < 10) ? ":0" : ":") + minutes;
	timeVal += ((seconds < 10) ? ":0" : ":") + seconds;
	tCtrl.innerText = timeVal;
	window.setTimeout("CurTime();",1000);
}

function active(meno) {
	document[meno].src = "pics/button_blank_a.gif";
}
function inactive(meno) {
	document[meno].src = "pics/button_blank_i.gif";
}
function preload(){
	var a = new Image();
	//var b = new Image();
    //var c = new Image();
	//var d = new Image();
	//var e = new Image();
	//var f = new Image();
	//var g = new Image();
	a.src="pics/button_blank_a.gif";
	//b.src="./imgs/button_gb_a.gif";
	//c.src="./imgs/button_oznamy_a.gif";
	//d.src="./imgs/button_fara_a.gif";
	//e.src="./imgs/button_historia_a.gif";
	//f.src="./imgs/button_google_web_a.gif";
	//g.src="./imgs/button_google_image_a.gif";
}

/*
var mymessage = "Sorry, no right-click available ";
function disableRightClick(btnClick)
  {
    if (navigator.appName == "Netscape" && btnClick.which == 3)
    {
      alert(mymessage);
      return false;
    }
    if (navigator.appName =="Microsoft Internet Explorer" && event.button == 2)
    {
      alert(mymessage);
      return false;
    }
    if (navigator.appName =="Opera")
    {
     // alert(mymessage);
     // return right;
    }
  }

document.onmousedown = disableRightClick;
*/
