// Bak2Top v1.3
// by MaxxBlade
// http://www.maxxblade.co.uk

var btts = 100;
var bttx = 320;
var btty = 60;
var bttc='<img src="img/navrh.gif" border="0" />';

function winWid()
{
	return (ns4||ns6) ? window.innerWidth : document.body.clientWidth;
}
function winHei()
{
	return (ns4||ns6) ? window.innerHeight : document.body.clientHeight;
}
function winOfy()
{
	return (ns4||ns6) ? window.pageYOffset : document.body.scrollTop;
}
function mtoplink()
{
	with(eval(bttll)){
		left = (winOfy() > 0) ? /*winWid() - bttx*/ bla : -500;
		top = (winOfy() > 0) ? winHei() - btty + winOfy() : -500;
	}
	setTimeout('mtoplink()',btts);
}
function toplink()
{
	rt = (!ns4) ? '<div id="bttl" style="position:absolute;">' : '<layer name="bttl">';
	rt += (!ns4) ? '<a style="cursor: '+hand+'" onclick' : '<a href"'; rt+='="JavaScript:scrollTo(0,0)">';
	rt += bttc;
	rt += (!ns4) ? '</a></div>' : '</a></layer>';
	document.write(rt);
	mtoplink();
}

var bla = 30; // odmik od levega roba strani (skupaj 780 px)

var ns4 = (document.layers) ? 1 : 0;
var ie4 = (document.all) ? 1 : 0;
var ns6 = (document.getElementById && !document.all) ? 1 : 0;
var hand = (ie4) ? 'hand' : 'pointer';
if (ie4)	bttll = "document.getElementById('bttl').style";
if (ns4) bttll = "document.layers['bttl']";
	if (ns6) bttll = "document.getElementById('bttl').style";
bttll = "document.getElementById('bttl').style";
toplink();
