function loadFlash( fname, w, h, embed)
{
//var ran_number= Math.random()*5;
if (embed) {
var Flash = '<embed type="application/x-shockwave-flash" src="'+ fname +'" name="topflash" quality="high" wmode="transparent" height="'+ h +'" width="'+ w +'" scale="noscale" bgcolor="#ffffff" movie="'+ fname +'">';
} else {
	var Flash = ' \
		<object type="application/x-shockwave-flash" data="' + fname + '" width="' + w + '" height="' + h + '"> \
			<param name="quality" value="high" /> \
			<param name="scale" value="noscale" /> \
			<param name="devicefont" value="true" /> \
			<param name="bgcolor" value="#ffffff" /> \
			<param name="movie" value="' + fname + '" /> \
			<param name="wmode" value="transparent"/> \
		</object> \
	';
}

	document.write( Flash );
}

function ShowLoader( id )
{
	element = $(id);
	element.setAttribute("class", "show");
}

function HideLoader(id)
{
	element = $(id);
	element.setAttribute("class", "hide");
}

function loadFLV( flash_id, player_id )
{

	// SET PATH to PHP FILE handling the REQUEST
	var url = '../inc/ajax/ajax_flash_loader.php';

	// SET PARAMETERS
	var pars = 'flash_id='+parseInt(flash_id);

	// SET ID of the element were the responce goes
	var target = player_id;

	// SHOW the loader
	ShowLoader('loading');

	// AJAX Updater by prototype
	var myAjax = new Ajax.Updater(target, url, {method: 'post', parameters: pars, onComplete: HideLoader('loading')});
}
