function video_play(flv, width, height, nazev, rok, zanr, typ, popisek, videoid)
{
	if (onloaded)
	{
		xajax_romannemec_view(videoid);
		
		var so, str;
		
		disable_scrolling();
		
		overlay.style.display = "block";
		video.style.display = "block";
		
		overlay.style.top = document.documentElement.scrollTop + "px";
		
		width = (width < 420 ? 420 : width);
		height = (height < 250 ? 250 : height);
		
		movie.style.width = width + "px";
		movie.style.height = height + "px";
		
		video.style.width = width + "px";
		video.style.height = (parseInt(height) + 60) + "px";
		video.style.left = ((document.documentElement.clientWidth - width) / 2) + "px";
		video.style.top = ((document.documentElement.clientHeight - (parseInt(height) + 60)) / 2) + document.documentElement.scrollTop + "px";
		
		if (document.all)
		// IE
		{
			so = new SWFObject("../../../template/templates/output/mediaplayer.swf", "flashcontent_play", width, height, "0", "");
			
			so.addParam("wmode", "transparent");
			so.addParam("quality", "high");
			so.addParam("bgcolor", "");
			so.addParam("autoplay", "false");
			so.addParam("allowfullscreen", "true");
			so.addParam("allowscriptaccess", "always");
			
			so.addParam("videoplay", "file_system/romannemeccz/file/" + flv);
			so.addParam("flashvars", "file=../../../file_system/romannemeccz/file/" + flv + "&autostart=false&fullscreen=true");
		
			so.write("movie");
		}
		else
		// FireFox
		{
			Set_Cookie("width", width);
			Set_Cookie("height", height);
			Set_Cookie("flv", flv);
			
			movie.innerHTML = '<iframe src="template/templates/output/romannemeccz/inc/video_ffx.html" width="100%" height="100%" frameborder="0" scrolling="no" marginwidth="0" marginheight="0"></iframe>';
		}
		
		str = "<h1>" + nazev + " <span class=\"label\">" + zanr + ", " + rok + "</span></h1>";
		str += "<span class=\"label\"><strong>" + typ + "</strong>: " + popisek + "</span>";
		
		document.getElementById("movie_label").innerHTML = str;
		
		if (document.all)
			movie.onkeypress = function()
			{
				if (event.keyCode == 27)
					overlay_hide();
			}
	}
	
	return false;
}

function overlay_hide()
{
	image.style.display 		= "none";
	arrow_left.style.display 	= "none";
	arrow_right.style.display 	= "none";
	overlay.style.display 		= "none";
	video.style.display 		= "none";
	
	image.src = "";
	
	movie.onkeypress = null;
	document.onkeydown = null;
	
	arrow_left.getElementsByTagName("img")[0].onclick = null;
	arrow_right.getElementsByTagName("img")[0].onclick = null;
	
	movie.innerHTML = "";
	
	enable_scrolling();
}


