/* ukaz obrazek */

function winH() {
   if (window.innerHeight)
      /* NN4 a kompatibilní prohlížeče */
      return window.innerHeight;
   else if
   (document.documentElement &&
   document.documentElement.clientHeight)
      /* MSIE6 v std. režimu - Opera a Mozilla
      již uspěly s window.innerHeight */
      return document.documentElement.clientHeight;
   else if
   (document.body && document.body.clientHeight)
      /* starší MSIE + MSIE6 v quirk režimu */
      return document.body.clientHeight;
   else
      return null;
}


function getScrollOffset()
{
	if(document.documentElement.scrollTop)
		return document.documentElement.scrollTop;
	if(window.pageYOffset)
		return window.pageYOffset;
	return document.body.scrollTop;
}

function ukaz_obrazek(src,width,height)
{
 	if(document.getElementById)
 	{
 		var obj = document.getElementById('detailImg');
 		if(obj)
 			{
 				obj.src = src;
 				obj.width = width;
 				obj.height = height;
			}
  	obj = document.getElementById('imgBlock');
  	if(obj)
  		{
   		obj.style.visibility = "visible";
   		obj.style.height = (winH())+'px';
   		}
   	obj = document.getElementById('imgBlock');
  	if(obj)
  		{
   		obj.style.top = getScrollOffset()+'px';
  		}
   		obj = document.getElementById('movieFlash');
  	if(obj)
  		{
   		obj.style.visibility = 'hidden';
   		}
 	}
 return false;
}


function schovejObrazek()
{
	var obj = document.getElementById('detailImg');
 		if(obj)
 			{
 				obj.src = 'style/free.gif';
			}
	
	var obj = document.getElementById('imgBlock');
  if(obj)
  {
   		obj.style.visibility = "hidden";
  }
  obj = document.getElementById('movieFlash');
  	if(obj)
  		{
   		obj.style.visibility = 'visible';
   		}
	return false;
}


function vloz_swf( swf, bgcolor, width, height )
{
 document.write
 (
  '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+
  ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"'+
  ' id="animace" width="' + width + '" height="' + height + '" align="">'+
  ' <param name=movie value="' + swf + '">'+
  ' <param name=loop value=true>'+
  ' <param name=menu value=false>'+
  ' <param name=quality value=high>'+
  ' <param name=bgcolor value="' + bgcolor + '">'+
  ' <embed src="' + swf + '" loop=true menu=false quality=high bgcolor=' + bgcolor +
  ' swLiveConnect=FALSE width="' + width + '" height="' + height + '" name="animace" align=""'+
  ' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">'+
  ' </embed>'+
  ' <noembed>Prezentaci nelze zobrazit. Vaše verze prohlížeče nepodporuje Flash.</noembed>'+
  ' </object>'
 );
}
