function vytvorFlash(menomovie, width, height, id)
{
    //flesh = document.getElementById(kde);
    //flesh.innerHTML +=
    document.writeln("<object type='application/x-shockwave-flash' data='"+menomovie+"' width='"+width+"' height='"+height+"' id='"+id+"'><param name='movie' value='"+menomovie+"'><param name='quality' value='high'><param name='wmode' value='transparent'></object>");
}

function showPlayer(movie, playlist, width, height)
{
  document.writeln("<object type='application/x-shockwave-flash' data='"+movie+"?playlist_url="+playlist+"&autoload=true' width='"+width+"' height='"+height+"' id='player'>");
  document.writeln("<param name='movie' value='"+movie+"?playlist_url="+playlist+"&autoload=true' />");
  document.writeln("<param name='quality' value='high' />");
  document.writeln("</object>");
}

function showSpan(parent,e,w,h)
{
    var imageSpan = document.getElementById(parent);
    var moz = false;
    //mouse position
  	var posx = 0;
  	var posy = 0;
  	if (!e) var e = window.event;
  	if (e.pageX || e.pageY) 	{
  		posx = e.pageX;
  		posy = e.pageY;
  	}
  	else if (e.clientX || e.clientY) 	{
  		posx = e.clientX + document.body.scrollLeft
  			+ document.documentElement.scrollLeft;
  		posy = e.clientY + document.body.scrollTop
  			+ document.documentElement.scrollTop;
  	}
    if (e.layerX || e.layerY) {
      posx = e.layerX;
      posy = e.layerY;
      moz = true;
    }
    
  	// posx and posy contain the mouse position relative to the document
    if (posx > (w+20)) 
      posx = posx-(w+20);
    else
      posx = posx+20;
    if (posy > (h+20)) 
      posy = posy-(h+20);
    else
      posy = posy+20;
    
    imageSpan.style.display = "block";
    if (moz) {
      imageSpan.style.top = posy+"px";
      imageSpan.style.left = posx+"px";
    } else {
      imageSpan.style.top = posy;
      imageSpan.style.left = posx;
    }
}

function hideSpan(parent)
{
    var imageSpan = document.getElementById(parent);
    imageSpan.style.display = "none";
    //var imageSpan = parent.getElementsByTagName('span');
    //imageSpan[0].style.display = "none";
}

function hideMe(self)
{
    self.style.display = "none";
}

function showMe(parent)
{
    var imageSpan = document.getElementById(parent);
    imageSpan.style.display = "block";
}

