function flash()
{
  if((useFlash)&&(navigator.appName!='Netscape'))
  {
    document.write("<div id='flashsite' style='height:118px;'>");
    document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'");
    document.write("codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0'");
    document.write("width='620' height='118'>");
    document.write("<param name=movie value='../common/pages/img/flash_homolka2.swf'>");
    document.write("<param name=quality value=high>");
    document.write("<embed src='../common/pages/img/flash_homolka2.swf' quality=high");
    document.write("pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'");
    document.write("type='application/x-shockwave-flash' width='620' height='118'>");
    document.write(" </embed> ");
    document.write("</object>");
    document.write("</div>");
  }
}
function flash_en()
{
  if((useFlash)&&(navigator.appName!='Netscape'))
  {
    document.write("<div id='flashsite' style='height:118px;'>");
    document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'");
    document.write("codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0'");
    document.write("width='620' height='118'>");
    document.write("<param name=movie value='../common/pages/img/flash_homolka_en.swf'>");
    document.write("<param name=quality value=high>");
    document.write("<embed src='../common/pages/img/flash_homolka_en.swf' quality=high");
    document.write("pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'");
    document.write("type='application/x-shockwave-flash' width='620' height='118'>");
    document.write(" </embed> ");
    document.write("</object>");
    document.write("</div>");
  }
}
function getSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return [myWidth, myHeight];
}
function detail(path,f,w,h)
{
   url = path+"../common/pages/obrazek.php?file="+f+"&w="+w+"&h="+h ;
   var roz = getSize();
   var l = (roz[0]-w)/2;
   var t = (roz[1]-h)/2;
  okno = window.open(url,'okno','toolbar=0,menubar=0,location=no,directories=no,scrollbars=yes,resizable=1,status=no,left='+l+',top='+t+',width='+w+',height='+h);
}
function detail_en(path,f,w,h)
{
   url = path+"../common/pages/obrazek_en.php?file="+f+"&w="+w+"&h="+h ;
   var roz = getSize();
   var l = (roz[0]-w)/2;
   var t = (roz[1]-h)/2;
  okno = window.open(url,'okno','toolbar=0,menubar=0,location=no,directories=no,scrollbars=yes,resizable=1,status=no,left='+l+',top='+t+',width='+w+',height='+h);
}
function open_single(p_id)
{
   url = "../../common/pages/page.php?p_id="+p_id ;
   var roz = getSize();
   var w = roz[0];
   var h = roz[1];
   okno = window.open(url,'okno','toolbar=1,menubar=1,location=no,directories=no,scrollbars=yes,resizable=1,status=yes,left=0,top=0,width='+w+',height='+h);
}
function open_single2(p_id)
{
   url = "../common/pages/page.php?p_id="+p_id ;
   var roz = getSize();
   var w = roz[0];
   var h = roz[1];
   okno = window.open(url,'okno','toolbar=1,menubar=1,location=no,directories=no,scrollbars=yes,resizable=1,status=yes,left=0,top=0,width='+w+',height='+h);
}

function init() 
{
	if(document.getElementById)
	{
		tck = document.getElementById("novinky-roll");
		step = 1;		// o kolko pixelov sa budu hlasky posuvat - default 2
		speed = 60;		// v akych intervaloch sa budu posuvat - default 10
		delay = 100;	// cas na ktory sa sprava zastavi - default 1000
		news = new Array();
		
		if(tck)
		{
			for (i = 0; i < tck.getElementsByTagName("div").length; i++) 
			{
				aT = tck.getElementsByTagName("div")[i];
				if (aT.className == "novinky-inner") 
				{
					news[0] = aT;
					aT.style.top = 0;//tck.offsetHeight;
				}
			}
			rollNews();
		}
	}
}
function rollNews()
{
	news[0].style.top = parseInt(news[0].style.top) - step + "px";
	if (parseInt(news[0].style.top) == tck.offsetHeight % step) 
	{
		tick = setTimeout("rollNews()",delay);
	}
	else 
	{
		if (parseInt(news[0].style.top) < (0-news[0].offsetHeight)) 
		{
			news[0].style.top = parseInt(tck.offsetHeight) + "px";
		}
		tick = setTimeout("rollNews()",speed);
	}
}
