// JavaScript Document

function loadContent(page)
{
var __url = page+"&ONLY_CONTENT=true";
 
	/**
	 * The simple way for an Ajax request, use onRequest/onComplete/onFailure
	 * to do add your own Ajax depended code.
	 */

	new Ajax(__url, {
		method: 'get',
		update: $('main')		
	}).request();
	
//"&middot; ";
// onComplete: function (e) {}
//	if (anker!="" && anker!=undefined) document.location.hash = ""+anker;
}

function show_flash(streamName,shop_id,trailer) //url, title
{
	
	$("flashplayer").style.display="block";
	
	if (trailer)
		$("blackback_trailer").style.display="block";
	else
		$("blackback").style.display="block";
		
	
	$("flashplayer").innerHTML='<div><a href="javascript:hide_flash();">schlie&szlig;en</a> &nbsp; &nbsp; &nbsp;</div><div id="videoplayer"><div class="errormessage">Sie benötigen mindestens den Flashplayer 8.0 um das Video zu sehen.</div></div>';
	if (shop_id!="" && shop_id!=null && shop_id!="null") $("flashplayer").innerHTML+='<div><a href="javascript:order_film('+shop_id+');">Film bestellen</a>&nbsp; &nbsp; &nbsp;</div>';
	$("flashplayer").innerHTML+='<br>';
	
	
	
	 var so3 = new SWFObject("videoplayer.swf?MM_ComponentVersion=1&skinName=Corona_Skin_1&streamName=data/"+streamName+".flv&autoPlay=true&autoRewind=false", "mymovie3", "490", "376", "8", "#000000");
	 so3.useExpressInstall('swf/expressinstall.swf');
	 so3.addParam("allowScriptAccess", "always");
	 so3.addParam("allowFullscreen", "true");
	 so3.write("videoplayer");
}

function order_film(shop_id)
{
	hide_flash();
	loadContent('?page=bestellung&film_num='+shop_id);	
}

function hide_flash()
{
	$("blackback").style.display="none";
	$("blackback_trailer").style.display="none";
	//$("filmlistmovie").myFunc();
	$("filmlistmovie").myFunc();
	
	//$("filmlistmovie").setVariable("locked","false");
	//so.addVariable("locked","0");
	$("flashplayer").style.display="none";
	$("flashplayer").innerHTML="";
}