function displayVideo() {
  var flvDiv = document.getElementById('flashcontent');
  if (flvDiv != null) {
    var rel = flvDiv.getAttribute('rel'); 
    var flvFile = rel.split(';')[0].split('=')[1];
    var imageFile = rel.split(';')[1].split('=')[1];
    var swfFileWidth = document.getElementById('flashcontent').style.width;
    var swfFileHeight = document.getElementById('flashcontent').style.height;
    var swf = new SWFObject("/scripts/flvplayer.swf","single",swfFileWidth,swfFileHeight,"7");
    swf.addParam("allowfullscreen","true");
    swf.addVariable("file",flvFile);
    swf.addVariable("image",imageFile);
    swf.addVariable("width",swfFileWidth.replace('px',''));
    swf.addVariable("height",swfFileHeight.replace('px',''));
    swf.addVariable("displayheight",swfFileHeight.replace('px',''));
    swf.write("flashcontent");
  }
}

function displayVimeo() {
  var flvDiv = document.getElementById('vimeoVideo');
  if (flvDiv != null) {
    var rel = flvDiv.getAttribute('rel'); 
    var swfFileWidth = document.getElementById('vimeoVideo').style.width;
    var swfFileHeight = document.getElementById('vimeoVideo').style.height;
    var swf = new SWFObject(rel,"single",swfFileWidth,swfFileHeight,"7");
    swf.addParam("allowfullscreen","true");
    swf.addVariable("width",swfFileWidth.replace('px',''));
    swf.addVariable("height",swfFileHeight.replace('px',''));
    swf.write("vimeoVideo");
  }
}

window.onload = function() {
  if (document.getElementById) {
    displayVideo();
    displayVimeo();
  }
}