// stopTime from flash external interface
function placeBackground(stopTime){
  // Vars
  var whatMakesUsImgFrames = 150;
  var whatMakesUsLength = 30;
  var whatMakesUsFPS = (whatMakesUsImgFrames / whatMakesUsLength);
  var whatMakesUsStopFrame = Math.round(stopTime * whatMakesUsFPS);
  
  // Set background image
  document.getElementById('backgroundImage').innerHTML = '<img src="/wp-content/themes/joostjansen/images/movieStills/'+whatMakesUsStopFrame+'.jpg" alt="" />';
  // Clear video div beofore remove it (ie6&7 fix)
  document.getElementById('introVideo').innerHTML = '';
  
  // Remove video div
  document.getElementById('introVideo').parentNode.removeChild(document.getElementById('introVideo'));
  
  // Resize background
  hyperSize();
  
  // Set cookie
  document.cookie = "background="+whatMakesUsStopFrame+"; path=/";
  
  // Add flash
  var flashvars = true;
  
  var logotypeParams = {
    flashvars:          "vids=logotype1~logotype2~logotype3"
  };
  
  var mrHenryParams = {
    flashvars:          "vids=mrhenry"
  };
  
  swfobject.embedSWF( "http://joostjansen.be/wp-content/themes/joostjansen/assets/flash/logotype/logotype.swf", "logotypeObject", "260", "220", "9.0.0", "http://joostjansen.be/wp-content/themes/joostjansen/assets/flash/expressInstall.swf", flashvars, logotypeParams);
  swfobject.embedSWF( "http://joostjansen.be/wp-content/themes/joostjansen/assets/flash/mrHenry/mrhenry.swf", "mrHenryObject", "280", "237", "9.0.0", "http://joostjansen.be/wp-content/themes/joostjansen/assets/flash/expressInstall.swf", flashvars, mrHenryParams);
}