function logoCentering()
{

	var rbcLogo = document.getElementById("rbcSystemIdentifierLogo");

	if ( rbcLogo.parentNode.className == "image" )
	{

		var elImg = rbcLogo.firstChild;

		if (elImg && elImg.offsetHeight == 0)
		{
			Event.observe(window, 'load', function (e)
				{
					setTimeout(logoCentering, 1000);
				}

			);
			return false;
		}

		offsetTop = parseInt(( 128 - elImg.offsetHeight ) / 2 );
		if ( offsetTop > 0 )
		{
			rbcLogo.parentNode.style.overflow = "visible";
			rbcLogo.firstChild.style.position = "relative";
			rbcLogo.firstChild.style.top = offsetTop + "px";
		}
	}
}

function getElementsByClassName(classname, node)  {
    if(!node) node = document.getElementsByTagName("body")[0];
    var a = [];
    var re = new RegExp('\\b' + classname + '\\b');
    var els = node.getElementsByTagName("*");
    for(var i=0,j=els.length; i<j; i++)
        if(re.test(els[i].className))a.push(els[i]);
    return a;
}

function showPopup(url) {
  var image = new Image();
  image.src = url;

  newwindow=window.open(url,'name','height='+image.height+',width='+image.width+',top=200,left=300,resizable');
  if (window.focus) {newwindow.focus()}
}

window.onload = function(){
  var loc = window.location.href;
  
  document.getElementById('sitemap').className = 'menu';
  document.getElementById('start').className = 'menu';
  document.getElementById('rss').className = 'menu';  
  
  if(loc.match('sitemap')){
    document.getElementById('sitemap').className = 'menu actual';
  } else if(loc.match('rss')){
    document.getElementById('rss').className = 'menu actual';
  } else if(loc == 'http://toneryplzen.pcoweb.cz/'){
    document.getElementById('start').className = 'menu actual';
  }  
}
