// change this path to match the image you want to have in the background
// path has to be relative to the html pages
var bgImageToLoad = "background/still.jpg";

if (navigator.userAgent.toLowerCase().indexOf('macintosh') > -1 &&
    (navigator.userAgent.toLowerCase().indexOf('gecko') > -1 ||
      navigator.userAgent.toLowerCase().indexOf('opera') > -1)) {
  // we have Firefox/Opera on mac
  if (window.attachEvent) {
    window.attachEvent('onload', replaceBg);
  } else {
    window.addEventListener('load', replaceBg, true);
  }
}

//function replaceBg() {
//  document.getElementById('flashbg').innerHTML = "";
//  document.getElementById('flashbg').style.backgroundImage = bgImageToLoad;
//}

function replaceBg() {
  var flash_bg = document.getElementById('flashbg')
  flash_bg.innerHTML = "";
  flash_bg.style.backgroundImage = "url('"+bgImageToLoad+"')";
  flash_bg.style.backgroundRepeat = "no-repeat";
  flash_bg.style.backgroundPosition= "center"
}// 
