//  these is the location of the player script (UFO.js)
var ufoScriptPath = "https://www.city.ac.uk/global/scripts/ufo.js";
//  this is the path to the standard player swf
var swfPlayerPath = "https://www.city.ac.uk/global/swf/player_external.swf";
//  this is the path to the widescreen player swf
var swfWSPlayerPath = "https://www.city.ac.uk/global/swf/player_w_external.swf";

document.write('<script type="text/javascript" src="'+ ufoScriptPath +'"><\/script>');

function insertVideo(FolderName, DivId) {
  writeVidTxt(swfPlayerPath, FolderName, DivId, "512", "426");
}

function insertWidescreen(FolderName, DivId) {
  writeVidTxt(swfWSPlayerPath, FolderName, DivId, "512", "330");
}

//  this function just echos out the normal js to embed a flash movie through js
function writeVidTxt(PlayerPath, FolderName, DivId, Width, Height) {
  document.write('<script type="text/javascript">');
  document.write('vObj = { movie:"'+PlayerPath+'", width:"'+Width+'", height:"'+Height+'", majorversion:"8", build:"0", flashvars:"DaFolder='+FolderName+'" };');
  document.write('UFO.create(vObj, "'+ DivId +'");');
  document.write('</script>');
}







