//=================================================================================================
//	You can delete these three functions if not needed.
//-------------------------------------------------------------------------------------------------
var
	movie;
//-------------------------------------------------------------------------------------------------
function customBodyLoad( sender )
{
}
//=================================================================================================
function customBodyResize( sender, size )
{
}
//=================================================================================================
function customBodyScroll( sender )
{
}
//=================================================================================================
function showMovie(file, name, itmID)
{
	var
		url = new Url();
	
	url = url.replacePage("misc/getMovie.aspx");
	url = url.add("itmID", itmID );

	movie = new TLightBox("divMovie", 2000, 200, imgBack );
		
		
		
	if ( movie.initialized() )
	{
		movie.top( 100 );
		movie.getHtml( url );
		movie.show();
		
		initPlayer(file, name);
	}
}
//=================================================================================================
function hideMovie()
{
	var
		divFlv = document.getElementById("videoFlv");
	
	if ( divFlv )
		divFlv.innerHTML = "";
	
	movie.hide();
	movie = null;
}
//=================================================================================================
function initPlayer( file, name )
{
	if ( gotFlash("8") )
	{
		var movieTitle = document.getElementById("movieTitle");
		
		if (movieTitle)
			movieTitle.innerHTML = name;
		
	
		var 
		fo = new FlashObject("img/default/flvplayer.swf", "single", "640", "385", "7");
		
		fo.addParam("bufferlength", "3");
		fo.addParam("allowfullscreen", "false");
		fo.addParam("menu", "false");
			
		fo.addVariable("autostart", "true");
		fo.addVariable("type", "flv");
		fo.addVariable("displaywidth", "640");
		fo.addVariable("displayheight", "385");
		fo.addVariable("usefullscreen", "false");
		fo.addVariable("file", file);		
		
		fo.write("videoFlv");
	}
}
//=================================================================================================

