
var isFirefox2Mac = detectMacXFF2();
var flash = checkFlashVersion(); //set this to false to fake not having flash
var quicktime;

function checkFlashVersion(){
  var flashVersion = swfobject.getFlashPlayerVersion();
  if(flashVersion.major > 9 || (flashVersion.major == 9 && (flashVersion.minor > 0 || flashVersion.release > 114))) return true;
  return false;
}

function detectMacXFF2() {
  var userAgent = navigator.userAgent.toLowerCase();
  if (/firefox[\/\s](\d+\.\d+)/.test(userAgent)) {
    var ffversion = new Number(RegExp.$1);
    if (ffversion < 3 && userAgent.indexOf('mac') != -1) {
      return true;
    }
  }
  return false;
}

function toAbsoluteURL(url) {
  /* Complicated stuff to ensure all URLs are the same format */
  var host = window.location.protocol + "//" + window.location.hostname;
  if(window.location.port != ""){
    host = host + ":" + window.location.port;
  }
  url = url.replace(host,"");
  
  if(url.charAt(0) != '/'){
    url = "/" + url;
  }
  url = host + url;
  
  return url;
}