
window.onload = init

var domOK = Boolean(document.getElementById);

function init() {

}


function flashInit() {

  if (domOK && FlashInstalled()) {
    document.getElementById('menu').style.background='none';
  }
  
}
 
function FlashInstalled()
{
	result = false;

	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) {
		result = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
	}
	else if (document.all && (navigator.appVersion.indexOf("Mac")==-1))
	{
		// IE Windows only -- check for ActiveX control, have to hide code in eval from Netscape (doesn't like try)
		eval ('try {var xObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if (xObj)	result = true; xObj = null;	} catch (e)	{}');
	}

	return result;

}

function writeFlash() {
  if (domOK && FlashInstalled()) {
   // alert(r);
    document.getElementById('menu').style.background='none';
    document.write('<div id="flash">');
    document.write('<object width="770" height="144" id="movie" align="" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com	/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" >');
    document.write('<param name="movie" value="Hlavni3.swf?r='+ r +'">');
    document.write('<param name="wmode" VALUE="transparent">');
    document.write('<embed src="Hlavni3.swf?r='+ r +'" quality="high" width="770" height="144" name="movie" align="" type="application/x-shockwave-flash"	plug inspage="http://www.macromedia.com/go/getflashplayer"> ');
    document.write('</object> ');
    document.write('</div>');
  }

}


var smallWidth = 240;
var shownNum;

function showBig(num,width,height,pic) {

  var it = document.getElementById('a'+num);
  it.style.position="relative";
  it.style.zIndex="400";
  
  if (next = document.getElementById('a'+(parseInt(num)+1))) {
    next.style.zIndex=0;
  }
  
  if (next = document.getElementById('a'+(parseInt(num)+2))) {
    next.style.zIndex=0;
  }

  var item = it.getElementsByTagName('span')[0]; 
  item.style.position="absolute";
  item.style.display="block";
  item.style.zIndex="400";
  item.style.background="#fff url('u-images/"+pic+"') 0 0 no-repeat";
  item.style.width=width+"px";
  item.style.height=height+"px";
  
  item.style.left="-"+(width-smallWidth)+"px";
}


function hideBig(num2,width,height) {
  
  var it2 = document.getElementById('a'+num2);
  it2.style.zIndex="0";

  var item2 = it2.getElementsByTagName('span')[0];
  item2.style.display="inline";
  item2.style.background="none";
  item2.style.width=smallWidth+"px";
  item2.style.position="relative";
  item2.style.left="0"
  item2.style.height="auto";
  item2.style.zIndex="20";

}



