function wopen(url, name, height, width, str1) {
       var str = "height=" + height + ",innerHeight=" + height;
       str += ",width=" + width + ",innerWidth=" + width;
	   
	   str += ", "+str1;
	   
	   
       if (window.screen) {
         var ah = screen.availHeight - 30;
         var aw = screen.availWidth - 10;

         var xc = (aw - width) / 2;
         var yc = (ah - height) / 2;

         str += ",left=" + xc + ",screenX=" + xc;
         str += ",top=" + yc + ",screenY=" + yc;
       }
       var win=window.open(url, name, str);
	   win.focus();
	   return win;
}
function ukazStyl(element,cssVlastnost){
	if(document.defaultView) hodnota=window.document.defaultView.getComputedStyle(element,null).getPropertyValue(cssVlastnost); // Mozilla
	else if(element.currentStyle) hodnota=eval("element.currentStyle." + cssVlastnost); // IE

return hodnota;
}

function imgOFF(obj, objLink, linkObj) {
	obj.style.visibility = 'hidden';
	if ( objLink != '' ) {
		objLink.style.textDecoration = 'underline';
	}
	linkObj.className = linkObj.id+'Hover';
}
function imgON(obj, objLink, linkObj) {
	obj.style.visibility = 'visible';
	if ( objLink != '' ) {
		objLink.style.textDecoration = 'none';
	}
	linkObj.className = linkObj.id;
}
//----------------------+
// Scrolovanie novinkiek
//----------------------+
var novinky;
var timed;
var scrollDirection;
var speed = 1;
function doScroll() {
	if ( scrollDirection == 'up' ) {
		novinky.scrollTop-= speed;
	} else {
		novinky.scrollTop+= speed;
	}
}
function stopScroll() {
	clearInterval(timed);
}
function scrollUp(speedSet) {
	speed = speedSet;
	novinky = document.getElementById('novinkyObsah');
	scrollDirection = 'up';
	if ( timed ) {
		clearInterval(timed);
	}
	timed = setInterval(doScroll, 1);
}
function scrollDown(speedSet) {
	speed = speedSet;
	novinky = document.getElementById('novinkyObsah');
	scrollDirection = 'down';
	if ( timed ) {
		clearInterval(timed);
	}
	timed = setInterval(doScroll, 1);
}
//-------------------+
// Rolovanie aktualit
//-------------------+
var aktuality;
var slideTimed;
var delay = 50;
var slideStepSet = 1;
var slideStep;
var objWidth;
var space = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+
			'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
function init() {
	slideStep = slideStepSet;                         
	aktuality = document.getElementById('aktualityText');
	objWidth = ukazStyl(aktuality, 'width');   
	objWidth = objWidth.replace('px', '');
	slideTimed = setInterval(slideText, delay);
}
function slideText() {
	if ( aktuality.scrollLeft >= aktuality.scrollWidth-objWidth ) {

		aktuality.innerHTML+= space+aktuality.innerHTML;
	}
	aktuality.scrollLeft+= slideStep;
}
function slideTextPause() {
	slideStep = 0;
}
function slideTextPlay() {
	slideStep = slideStepSet;
}
