function playit(player, clip_index)
{
//  player.DoStop();
  player.ToClip(clip_index);
  player.DoPlay();
}
function showPlayList(playList)
{
  var item;
  var ul = new Element("ul")
  player = $$("#flowplayerholder > :first")[0];
  for (var i = 0; i < playList.length; i++) {
    if (playList[i].name) {
/*
      li = new Element('li');
      Element.update(li, playList[i].name);
      Element.insert(ul, li);
*/
      clip_index = i + 1
      a = new Element("a", {href: "#", onclick: "playit(player, " + clip_index + ");"}).update(clip_index + ": " + playList[i].name);
      Element.insert(ul, new Element("li").update(a));
    }

  }
  $("playList").insert(ul)
}

function onFlowPlayerReady() {
}

function cinema(theVideoFile) {

  flowplayerSwfSrc = [
    "FlowPlayerLight.swf",
    "FlowPlayerClassic.swf",
    "FlowPlayerDark.swf",
    "FlowPlayerLP.swf"
    ]

  new flashembed("flowplayerholder", {
    src: "swf/" + flowplayerSwfSrc[0],
    width: 380,
    height: 350
    },
    {
    config: {
      baseURL: "rtmp://cannonau.ca2000.it:1935/oflaDemo/",
      videoFile: theVideoFile+".flv",
      splashImageFile: "http://cannonau.ca2000.it/oflaDemo/"+theVideoFile+".jpg",
      autoPlay: false
      }
    }
  );
        //streamingServer: "red5",
        //      streamingServerURL: "rtmp://cannonau.ca2000.it:1935/oflaDemo/bn",
//  showPlayList(pl);
}//cinema
