
function embed_movie(targetid,basename,sx,sy,ap) {
  var flashvars = {};
	
  /* flv player parameters */		
  flashvars.playerpath = "http://www.hepatux.de/images/flvplayer/"; 				// do not use relative paths! This is just a local example.
  flashvars.contentpath = "http://www.hepatux.de/images/";	   // Use http://www.example.com/myfolder or /myfolder instead
		
  flashvars.video = "mpg/"+basename+".flv";
  flashvars.preview = "eccet/"+basename+".jpg";
		
  flashvars.skin = "skin-applestyle.swf";
  flashvars.skincolor = "0x222266";
  flashvars.skinscalemaximum = "5";

  flashvars.autoscale = "false";
  // set autoscale to false to use width and height
  flashvars.videowidth = ""+sx;	
  flashvars.videoheight = ""+sy;

  if (ap) flashvars.autoplay = "true";
		
  //flashvars.captions = "demo-captions.xml";
  //flashvars.preroll = "demo-ad.flv";
  /* end */		
					
  var params = {};
  params.scale = "noscale";
  params.allowfullscreen = "true";
  params.salign = "tl";
		
  var attributes = {};
  attributes.align = "left";
		
  /* embed flv player */			
  // adapt the path to flvplayer.swf and expressInstall.swf
  // adapt the display size of the flash file	
  try { 
	document.getElementById(targetid).innerHTML = "<div id=\"nerviger_workaround\" style=\"width: "+sx+"px;\"><img src=\""+flashvars.contentpath+flashvars.preview+"\" alt=\"Flash not found\"><br/>Flash nicht gefunden<br/>Live Video nicht möglich.</div>"; 
	targetid="nerviger_workaround";
  } catch(e) {};
  swfobject.embedSWF("http://www.hepatux.de/images/flvplayer/flvplayer.swf", targetid, ""+sx, ""+(sy+24), "9.0.28", "images/flvplayer/expressInstall.swf", flashvars, params, attributes);
  /* end */	
	
}

function showplayer(basename,sx,sy,ap) {
	embed_movie('flashcontent',basename,sx,sy,ap);
	document.getElementById('MovieDiv').style.visibility='visible';
}
function hideplayer() {
	document.getElementById('MovieDiv').style.visibility='hidden';
  try {
	/* kill off the embedded flash, or it will continue rolling */
	var fc=document.getElementById('flashcontent');
	fc.removeChild(fc.firstChild);
  } catch(e) {};
}

