function initPage() {
  new AjaxTiny("loggedout", { toolbarLocation:"external" });
  new AjaxTiny("TopLeft", { toolbarLocation:"external" });
  new AjaxTiny("TopRight", { toolbarLocation:"external" });
}

function dlClicked(url) {
  var ok = true;
  var chk = document.getElementById("accept");
  if (chk) {
    if (!chk.checked) alert("Please accept the license agreement before downloading");
    ok = chk.checked;
  }
  if (ok) {
    var response = Download.StartDownload(url);
    ok = response.value;
  }
  return ok;
}

var films = ["Qlucore Identifying groups final.flv", "Qlucore paired data final.flv", "Qlucore few samples final.flv"];
var currFilm;

function showFilm(no) {
  document.getElementById("film").innerHTML = "";
  document.getElementById("speakermess").style.display = "block";
  $S('flv_player').display = 'block';
  currFilm = no;
  setTimeout(showFilm2, 2000);
}

function showFilm2() {
  document.getElementById("speakermess").style.display = "none";

  var so = new SWFObject("flash/flv_player.swf", "film", "720", "600", "8", "#666666", true);
  so.addParam("salign", "lt");
  so.addParam("scale", "noscale");
  so.addParam("wmode", "transparent");
  so.addParam("allowFullScreen", "true");
  so.addVariable("control_mode", "BOTTOM");
  so.addVariable("play_mode", "PLAY");
  so.addVariable("movie_path", "/flash/" + films[currFilm-1]);
  so.addVariable("movie_width", "720");
  so.addVariable("movie_height", "576");
  so.addVariable("color_theme", "000000");
  so.addVariable("show_interface", "1");
  so.addVariable("update_message", "Your flashplayer\nis too old.");
  so.addVariable("update_button", "Update now");
  so.write("film");
}

function closeFilm() {
  document.getElementById('flv_player').style.display = 'none'
  document.getElementById('film').innerHTML = "";
}