﻿
Function.prototype.bind = function(obj) {
  var method = this,
   temp = function() {
     return method.apply(obj, arguments);
   };

  return temp;
};

/**
* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
* 
* @param  f  onMouseOver function || An object with configuration options
* @param  g  onMouseOut function  || Nothing (use configuration options object)
* @author    Brian Cherne <brian@cherne.net>
*/
(function($) { $.fn.hoverIntent = function(f, g) { var cfg = { sensitivity: 7, interval: 100, timeout: 0 }; cfg = $.extend(cfg, g ? { over: f, out: g} : f); var cX, cY, pX, pY; var track = function(ev) { cX = ev.pageX; cY = ev.pageY; }; var compare = function(ev, ob) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); if ((Math.abs(pX - cX) + Math.abs(pY - cY)) < cfg.sensitivity) { $(ob).unbind("mousemove", track); ob.hoverIntent_s = 1; return cfg.over.apply(ob, [ev]); } else { pX = cX; pY = cY; ob.hoverIntent_t = setTimeout(function() { compare(ev, ob); }, cfg.interval); } }; var delay = function(ev, ob) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); ob.hoverIntent_s = 0; return cfg.out.apply(ob, [ev]); }; var handleHover = function(e) { var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget; while (p && p != this) { try { p = p.parentNode; } catch (e) { p = this; } } if (p == this) { return false; } var ev = jQuery.extend({}, e); var ob = this; if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); } if (e.type == "mouseover") { pX = ev.pageX; pY = ev.pageY; $(ob).bind("mousemove", track); if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout(function() { compare(ev, ob); }, cfg.interval); } } else { $(ob).unbind("mousemove", track); if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout(function() { delay(ev, ob); }, cfg.timeout); } } }; return this.mouseover(handleHover).mouseout(handleHover); }; })(jQuery);

(function($) {

  jQuery.fn.pngFix = function(settings) {

    // Settings
    settings = jQuery.extend({
      blankgif: 'blank.gif'
    }, settings);

    var ie55 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 5.5") != -1);
    var ie6 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1);

    if (jQuery.browser.msie && (ie55 || ie6)) {

      //fix images with png-source
      jQuery(this).find("img[src$=.png]").each(function() {

        jQuery(this).attr('width', jQuery(this).width());
        jQuery(this).attr('height', jQuery(this).height());

        var prevStyle = '';
        var strNewHTML = '';
        var imgId = (jQuery(this).attr('id')) ? 'id="' + jQuery(this).attr('id') + '" ' : '';
        var imgClass = (jQuery(this).attr('class')) ? 'class="' + jQuery(this).attr('class') + '" ' : '';
        var imgTitle = (jQuery(this).attr('title')) ? 'title="' + jQuery(this).attr('title') + '" ' : '';
        var imgAlt = (jQuery(this).attr('alt')) ? 'alt="' + jQuery(this).attr('alt') + '" ' : '';
        var imgAlign = (jQuery(this).attr('align')) ? 'float:' + jQuery(this).attr('align') + ';' : '';
        var imgHand = (jQuery(this).parent().attr('href')) ? 'cursor:hand;' : '';
        if (this.style.border) {
          prevStyle += 'border:' + this.style.border + ';';
          this.style.border = '';
        }
        if (this.style.padding) {
          prevStyle += 'padding:' + this.style.padding + ';';
          this.style.padding = '';
        }
        if (this.style.margin) {
          prevStyle += 'margin:' + this.style.margin + ';';
          this.style.margin = '';
        }
        var imgStyle = (this.style.cssText);

        strNewHTML += '<span ' + imgId + imgClass + imgTitle + imgAlt;
        strNewHTML += 'style="position:relative;white-space:pre-line;display:inline-block;background:transparent;' + imgAlign + imgHand;
        strNewHTML += 'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;';
        strNewHTML += 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + jQuery(this).attr('src') + '\', sizingMethod=\'scale\');';
        strNewHTML += imgStyle + '"></span>';
        if (prevStyle != '') {
          strNewHTML = '<span style="position:relative;display:inline-block;' + prevStyle + imgHand + 'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;' + '">' + strNewHTML + '</span>';
        }

        jQuery(this).hide();
        jQuery(this).after(strNewHTML);

      });

      // fix css background pngs
      jQuery(this).find("*").each(function() {
        var bgIMG = jQuery(this).css('background-image');
        if (bgIMG.indexOf(".png") != -1) {
          var iebg = bgIMG.split('url("')[1].split('")')[0];
          jQuery(this).css('background-image', 'none');
          jQuery(this).get(0).runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + iebg + "',sizingMethod='scale')";
        }
      });

      //fix input with png-source
      /*
      jQuery(this).find("input[src$=.png]").each(function() {
      var bgIMG = jQuery(this).attr('src');
      jQuery(this).get(0).runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + bgIMG + '\', sizingMethod=\'scale\');';
      jQuery(this).attr('src', settings.blankgif)
      });*/

    }

    return jQuery;

  };

})(jQuery);  

/**
* jQuery lightBox plugin
* This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
* and adapted to me for use like a plugin from jQuery.
* @name jquery-lightbox-0.5.js
* @author Leandro Vieira Pinho - http://leandrovieira.com
* @version 0.5
* @date April 11, 2008
* @category jQuery plugin
* @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
* @license CC Attribution-No Derivative Works 2.5 Brazil - http://creativecommons.org/licenses/by-nd/2.5/br/deed.en_US
* @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
*/
;
(function($) {
  $.fn.lightBox = function(settings) {
    settings = jQuery.extend({ overlayBgColor: '#000', overlayOpacity: 0.8, fixedNavigation: false, imageLoading: websiteRoot + 'Images/Lightbox/lightbox-ico-loading.gif', imageBtnPrev: websiteRoot + 'Images/Lightbox/lightbox-btn-prev.gif', imageBtnNext: websiteRoot + 'Images/Lightbox/lightbox-btn-next.gif', imageBtnClose: websiteRoot + 'Images/Lightbox/lightbox-btn-close.gif', imageBlank: websiteRoot + 'Images/Lightbox/lightbox-blank.gif', containerBorderSize: 10, containerResizeSpeed: 400, txtImage: 'Image', txtOf: 'of', keyToClose: 'c', keyToPrev: 'p', keyToNext: 'n', imageArray: [], activeImage: 0 }, settings); var jQueryMatchedObj = this; function _initialize() { _start(this, jQueryMatchedObj); return false; }
    function _start(objClicked, jQueryMatchedObj) {
      $('embed, object, select').css({ 'visibility': 'hidden' }); _set_interface(); settings.imageArray.length = 0; settings.activeImage = 0; if (jQueryMatchedObj.length == 1) { settings.imageArray.push(new Array(objClicked.getAttribute('href'), objClicked.getAttribute('title'))); } else { for (var i = 0; i < jQueryMatchedObj.length; i++) { settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'), jQueryMatchedObj[i].getAttribute('title'))); } }
      while (settings.imageArray[settings.activeImage][0] != objClicked.getAttribute('href')) { settings.activeImage++; }
      _set_image_to_view();
    }
    function _set_interface() { $('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="' + settings.imageLoading + '"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="' + settings.imageBtnClose + '"></a></div></div></div></div>'); var arrPageSizes = ___getPageSize(); $('#jquery-overlay').css({ backgroundColor: settings.overlayBgColor, opacity: settings.overlayOpacity, width: arrPageSizes[0], height: arrPageSizes[1] }).fadeIn(); var arrPageScroll = ___getPageScroll(); $('#jquery-lightbox').css({ top: arrPageScroll[1] + (arrPageSizes[3] / 10), left: arrPageScroll[0] }).show(); $('#jquery-overlay,#jquery-lightbox').click(function() { _finish(); }); $('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function() { _finish(); return false; }); $(window).resize(function() { var arrPageSizes = ___getPageSize(); $('#jquery-overlay').css({ width: arrPageSizes[0], height: arrPageSizes[1] }); var arrPageScroll = ___getPageScroll(); $('#jquery-lightbox').css({ top: arrPageScroll[1] + (arrPageSizes[3] / 10), left: arrPageScroll[0] }); }); }
    function _set_image_to_view() {
      $('#lightbox-loading').show(); if (settings.fixedNavigation) { $('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide(); } else { $('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide(); }
      var objImagePreloader = new Image(); objImagePreloader.onload = function() { $('#lightbox-image').attr('src', settings.imageArray[settings.activeImage][0]); _resize_container_image_box(objImagePreloader.width, objImagePreloader.height); objImagePreloader.onload = function() { }; }; objImagePreloader.src = settings.imageArray[settings.activeImage][0];
    }; function _resize_container_image_box(intImageWidth, intImageHeight) {
      var intCurrentWidth = $('#lightbox-container-image-box').width(); var intCurrentHeight = $('#lightbox-container-image-box').height(); var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); var intDiffW = intCurrentWidth - intWidth; var intDiffH = intCurrentHeight - intHeight; $('#lightbox-container-image-box').animate({ width: intWidth, height: intHeight }, settings.containerResizeSpeed, function() { _show_image(); }); if ((intDiffW == 0) && (intDiffH == 0)) { if ($.browser.msie) { ___pause(250); } else { ___pause(100); } }
      $('#lightbox-container-image-data-box').css({ width: intImageWidth }); $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height: intImageHeight + (settings.containerBorderSize * 2) });
    }; function _show_image() { $('#lightbox-loading').hide(); $('#lightbox-image').fadeIn(function() { _show_image_data(); _set_navigation(); }); _preload_neighbor_images(); }; function _show_image_data() {
      $('#lightbox-container-image-data-box').slideDown('fast'); $('#lightbox-image-details-caption').hide(); if (settings.imageArray[settings.activeImage][1]) { $('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show(); }
      if (settings.imageArray.length > 1) { $('#lightbox-image-details-currentNumber').html(settings.txtImage + ' ' + (settings.activeImage + 1) + ' ' + settings.txtOf + ' ' + settings.imageArray.length).show(); } 
    }
    function _set_navigation() {
      $('#lightbox-nav').show(); $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background': 'transparent url(' + settings.imageBlank + ') no-repeat' }); if (settings.activeImage != 0) { if (settings.fixedNavigation) { $('#lightbox-nav-btnPrev').css({ 'background': 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' }).unbind().bind('click', function() { settings.activeImage = settings.activeImage - 1; _set_image_to_view(); return false; }); } else { $('#lightbox-nav-btnPrev').unbind().hover(function() { $(this).css({ 'background': 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' }); }, function() { $(this).css({ 'background': 'transparent url(' + settings.imageBlank + ') no-repeat' }); }).show().bind('click', function() { settings.activeImage = settings.activeImage - 1; _set_image_to_view(); return false; }); } }
      if (settings.activeImage != (settings.imageArray.length - 1)) { if (settings.fixedNavigation) { $('#lightbox-nav-btnNext').css({ 'background': 'url(' + settings.imageBtnNext + ') right 15% no-repeat' }).unbind().bind('click', function() { settings.activeImage = settings.activeImage + 1; _set_image_to_view(); return false; }); } else { $('#lightbox-nav-btnNext').unbind().hover(function() { $(this).css({ 'background': 'url(' + settings.imageBtnNext + ') right 15% no-repeat' }); }, function() { $(this).css({ 'background': 'transparent url(' + settings.imageBlank + ') no-repeat' }); }).show().bind('click', function() { settings.activeImage = settings.activeImage + 1; _set_image_to_view(); return false; }); } }
      _enable_keyboard_navigation();
    }
    function _enable_keyboard_navigation() { $(document).keydown(function(objEvent) { _keyboard_action(objEvent); }); }
    function _disable_keyboard_navigation() { $(document).unbind(); }
    function _keyboard_action(objEvent) {
      if (objEvent == null) { keycode = event.keyCode; escapeKey = 27; } else { keycode = objEvent.keyCode; escapeKey = objEvent.DOM_VK_ESCAPE; }
      key = String.fromCharCode(keycode).toLowerCase(); if ((key == settings.keyToClose) || (key == 'x') || (keycode == escapeKey)) { _finish(); }
      if ((key == settings.keyToPrev) || (keycode == 37)) { if (settings.activeImage != 0) { settings.activeImage = settings.activeImage - 1; _set_image_to_view(); _disable_keyboard_navigation(); } }
      if ((key == settings.keyToNext) || (keycode == 39)) { if (settings.activeImage != (settings.imageArray.length - 1)) { settings.activeImage = settings.activeImage + 1; _set_image_to_view(); _disable_keyboard_navigation(); } } 
    }
    function _preload_neighbor_images() {
      if ((settings.imageArray.length - 1) > settings.activeImage) { objNext = new Image(); objNext.src = settings.imageArray[settings.activeImage + 1][0]; }
      if (settings.activeImage > 0) { objPrev = new Image(); objPrev.src = settings.imageArray[settings.activeImage - 1][0]; } 
    }
    function _finish() { $('#jquery-lightbox').remove(); $('#jquery-overlay').fadeOut(function() { $('#jquery-overlay').remove(); }); $('embed, object, select').css({ 'visibility': 'visible' }); }
    function ___getPageSize() {
      var xScroll, yScroll; if (window.innerHeight && window.scrollMaxY) { xScroll = window.innerWidth + window.scrollMaxX; yScroll = window.innerHeight + window.scrollMaxY; } else if (document.body.scrollHeight > document.body.offsetHeight) { xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; } else { xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; }
      var windowWidth, windowHeight; if (self.innerHeight) {
        if (document.documentElement.clientWidth) { windowWidth = document.documentElement.clientWidth; } else { windowWidth = self.innerWidth; }
        windowHeight = self.innerHeight;
      } else if (document.documentElement && document.documentElement.clientHeight) { windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; }
      if (yScroll < windowHeight) { pageHeight = windowHeight; } else { pageHeight = yScroll; }
      if (xScroll < windowWidth) { pageWidth = xScroll; } else { pageWidth = windowWidth; }
      arrayPageSize = new Array(pageWidth, pageHeight, windowWidth, windowHeight); return arrayPageSize;
    }; function ___getPageScroll() {
      var xScroll, yScroll; if (self.pageYOffset) { yScroll = self.pageYOffset; xScroll = self.pageXOffset; } else if (document.documentElement && document.documentElement.scrollTop) { yScroll = document.documentElement.scrollTop; xScroll = document.documentElement.scrollLeft; } else if (document.body) { yScroll = document.body.scrollTop; xScroll = document.body.scrollLeft; }
      arrayPageScroll = new Array(xScroll, yScroll); return arrayPageScroll;
    }; function ___pause(ms) {
      var date = new Date(); curDate = null; do { var curDate = new Date(); }
      while (curDate - date < ms);
    }; return this.unbind('click').click(_initialize);
  };
})(jQuery);

/*! SWFObject v2.1 <http://code.google.com/p/swfobject/>
Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/

var swfobject = function() {

  var UNDEF = "undefined",
		OBJECT = "object",
		SHOCKWAVE_FLASH = "Shockwave Flash",
		SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
		FLASH_MIME_TYPE = "application/x-shockwave-flash",
		EXPRESS_INSTALL_ID = "SWFObjectExprInst",

		win = window,
		doc = document,
		nav = navigator,

		domLoadFnArr = [],
		regObjArr = [],
		objIdArr = [],
		listenersArr = [],
		script,
		timer = null,
		storedAltContent = null,
		storedAltContentId = null,
		isDomLoaded = false,
		isExpressInstallActive = false;

  /* Centralized function for browser feature detection
  - Proprietary feature detection (conditional compiling) is used to detect Internet Explorer's features
  - User agent string detection is only used when no alternative is possible
  - Is executed directly for optimal performance
  */
  var ua = function() {
    var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
			playerVersion = [0, 0, 0],
			d = null;
    if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
      d = nav.plugins[SHOCKWAVE_FLASH].description;
      if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
        d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
        playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
        playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
        playerVersion[2] = /r/.test(d) ? parseInt(d.replace(/^.*r(.*)$/, "$1"), 10) : 0;
      }
    }
    else if (typeof win.ActiveXObject != UNDEF) {
      var a = null, fp6Crash = false;
      try {
        a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".7");
      }
      catch (e) {
        try {
          a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".6");
          playerVersion = [6, 0, 21];
          a.AllowScriptAccess = "always";  // Introduced in fp6.0.47
        }
        catch (e) {
          if (playerVersion[0] == 6) {
            fp6Crash = true;
          }
        }
        if (!fp6Crash) {
          try {
            a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
          }
          catch (e) { }
        }
      }
      if (!fp6Crash && a) { // a will return null when ActiveX is disabled
        try {
          d = a.GetVariable("$version"); // Will crash fp6.0.21/23/29
          if (d) {
            d = d.split(" ")[1].split(",");
            playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
          }
        }
        catch (e) { }
      }
    }
    var u = nav.userAgent.toLowerCase(),
			p = nav.platform.toLowerCase(),
			webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
			ie = false,
			windows = p ? /win/.test(p) : /win/.test(u),
			mac = p ? /mac/.test(p) : /mac/.test(u);
    /*@cc_on
    ie = true;
    @if (@_win32)
    windows = true;
    @elif (@_mac)
				mac = true;
			@end
    @*/
    return { w3cdom: w3cdom, pv: playerVersion, webkit: webkit, ie: ie, win: windows, mac: mac };
  } ();

  /* Cross-browser onDomLoad
  - Based on Dean Edwards' solution: http://dean.edwards.name/weblog/2006/06/again/
  - Will fire an event as soon as the DOM of a page is loaded (supported by Gecko based browsers - like Firefox -, IE, Opera9+, Safari)
  */
  var onDomLoad = function() {
    if (!ua.w3cdom) {
      return;
    }
    addDomLoadEvent(main);
    if (ua.ie && ua.win) {
      try {	 // Avoid a possible Operation Aborted error
        doc.write("<scr" + "ipt id=__ie_ondomload defer=true src=//:></scr" + "ipt>"); // String is split into pieces to avoid Norton AV to add code that can cause errors 
        script = getElementById("__ie_ondomload");
        if (script) {
          addListener(script, "onreadystatechange", checkReadyState);
        }
      }
      catch (e) { }
    }
    if (ua.webkit && typeof doc.readyState != UNDEF) {
      timer = setInterval(function() { if (/loaded|complete/.test(doc.readyState)) { callDomLoadFunctions(); } }, 10);
    }
    if (typeof doc.addEventListener != UNDEF) {
      doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, null);
    }
    addLoadEvent(callDomLoadFunctions);
  } ();

  function checkReadyState() {
    if (script.readyState == "complete") {
      script.parentNode.removeChild(script);
      callDomLoadFunctions();
    }
  }

  function callDomLoadFunctions() {
    if (isDomLoaded) {
      return;
    }
    if (ua.ie && ua.win) { // Test if we can really add elements to the DOM; we don't want to fire it too early
      var s = createElement("span");
      try { // Avoid a possible Operation Aborted error
        var t = doc.getElementsByTagName("body")[0].appendChild(s);
        t.parentNode.removeChild(t);
      }
      catch (e) {
        return;
      }
    }
    isDomLoaded = true;
    if (timer) {
      clearInterval(timer);
      timer = null;
    }
    var dl = domLoadFnArr.length;
    for (var i = 0; i < dl; i++) {
      domLoadFnArr[i]();
    }
  }

  function addDomLoadEvent(fn) {
    if (isDomLoaded) {
      fn();
    }
    else {
      domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
    }
  }

  /* Cross-browser onload
  - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
  - Will fire an event as soon as a web page including all of its assets are loaded 
  */
  function addLoadEvent(fn) {
    if (typeof win.addEventListener != UNDEF) {
      win.addEventListener("load", fn, false);
    }
    else if (typeof doc.addEventListener != UNDEF) {
      doc.addEventListener("load", fn, false);
    }
    else if (typeof win.attachEvent != UNDEF) {
      addListener(win, "onload", fn);
    }
    else if (typeof win.onload == "function") {
      var fnOld = win.onload;
      win.onload = function() {
        fnOld();
        fn();
      };
    }
    else {
      win.onload = fn;
    }
  }

  /* Main function
  - Will preferably execute onDomLoad, otherwise onload (as a fallback)
  */
  function main() { // Static publishing only
    var rl = regObjArr.length;
    for (var i = 0; i < rl; i++) { // For each registered object element
      var id = regObjArr[i].id;
      if (ua.pv[0] > 0) {
        var obj = getElementById(id);
        if (obj) {
          regObjArr[i].width = obj.getAttribute("width") ? obj.getAttribute("width") : "0";
          regObjArr[i].height = obj.getAttribute("height") ? obj.getAttribute("height") : "0";
          if (hasPlayerVersion(regObjArr[i].swfVersion)) { // Flash plug-in version >= Flash content version: Houston, we have a match!
            if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements
              fixParams(obj);
            }
            setVisibility(id, true);
          }
          else if (regObjArr[i].expressInstall && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) { // Show the Adobe Express Install dialog if set by the web page author and if supported (fp6.0.65+ on Win/Mac OS only)
            showExpressInstall(regObjArr[i]);
          }
          else { // Flash plug-in and Flash content version mismatch: display alternative content instead of Flash content
            displayAltContent(obj);
          }
        }
      }
      else {	// If no fp is installed, we let the object element do its job (show alternative content)
        setVisibility(id, true);
      }
    }
  }

  /* Fix nested param elements, which are ignored by older webkit engines
  - This includes Safari up to and including version 1.2.2 on Mac OS 10.3
  - Fall back to the proprietary embed element
  */
  function fixParams(obj) {
    var nestedObj = obj.getElementsByTagName(OBJECT)[0];
    if (nestedObj) {
      var e = createElement("embed"), a = nestedObj.attributes;
      if (a) {
        var al = a.length;
        for (var i = 0; i < al; i++) {
          if (a[i].nodeName == "DATA") {
            e.setAttribute("src", a[i].nodeValue);
          }
          else {
            e.setAttribute(a[i].nodeName, a[i].nodeValue);
          }
        }
      }
      var c = nestedObj.childNodes;
      if (c) {
        var cl = c.length;
        for (var j = 0; j < cl; j++) {
          if (c[j].nodeType == 1 && c[j].nodeName == "PARAM") {
            e.setAttribute(c[j].getAttribute("name"), c[j].getAttribute("value"));
          }
        }
      }
      obj.parentNode.replaceChild(e, obj);
    }
  }

  /* Show the Adobe Express Install dialog
  - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
  */
  function showExpressInstall(regObj) {
    isExpressInstallActive = true;
    var obj = getElementById(regObj.id);
    if (obj) {
      if (regObj.altContentId) {
        var ac = getElementById(regObj.altContentId);
        if (ac) {
          storedAltContent = ac;
          storedAltContentId = regObj.altContentId;
        }
      }
      else {
        storedAltContent = abstractAltContent(obj);
      }
      if (!(/%$/.test(regObj.width)) && parseInt(regObj.width, 10) < 310) {
        regObj.width = "310";
      }
      if (!(/%$/.test(regObj.height)) && parseInt(regObj.height, 10) < 137) {
        regObj.height = "137";
      }
      doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
      var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
				dt = doc.title,
				fv = "MMredirectURL=" + win.location + "&MMplayerType=" + pt + "&MMdoctitle=" + dt,
				replaceId = regObj.id;
      // For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element
      // In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
      if (ua.ie && ua.win && obj.readyState != 4) {
        var newObj = createElement("div");
        replaceId += "SWFObjectNew";
        newObj.setAttribute("id", replaceId);
        obj.parentNode.insertBefore(newObj, obj); // Insert placeholder div that will be replaced by the object element that loads expressinstall.swf
        obj.style.display = "none";
        var fn = function() {
          obj.parentNode.removeChild(obj);
        };
        addListener(win, "onload", fn);
      }
      createSWF({ data: regObj.expressInstall, id: EXPRESS_INSTALL_ID, width: regObj.width, height: regObj.height }, { flashvars: fv }, replaceId);
    }
  }

  /* Functions to abstract and display alternative content
  */
  function displayAltContent(obj) {
    if (ua.ie && ua.win && obj.readyState != 4) {
      // For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element
      // In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
      var el = createElement("div");
      obj.parentNode.insertBefore(el, obj); // Insert placeholder div that will be replaced by the alternative content
      el.parentNode.replaceChild(abstractAltContent(obj), el);
      obj.style.display = "none";
      var fn = function() {
        obj.parentNode.removeChild(obj);
      };
      addListener(win, "onload", fn);
    }
    else {
      obj.parentNode.replaceChild(abstractAltContent(obj), obj);
    }
  }

  function abstractAltContent(obj) {
    var ac = createElement("div");
    if (ua.win && ua.ie) {
      ac.innerHTML = obj.innerHTML;
    }
    else {
      var nestedObj = obj.getElementsByTagName(OBJECT)[0];
      if (nestedObj) {
        var c = nestedObj.childNodes;
        if (c) {
          var cl = c.length;
          for (var i = 0; i < cl; i++) {
            if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
              ac.appendChild(c[i].cloneNode(true));
            }
          }
        }
      }
    }
    return ac;
  }

  /* Cross-browser dynamic SWF creation
  */
  function createSWF(attObj, parObj, id) {
    var r, el = getElementById(id);
    if (el) {
      if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
        attObj.id = id;
      }
      if (ua.ie && ua.win) { // IE, the object element and W3C DOM methods do not combine: fall back to outerHTML
        var att = "";
        for (var i in attObj) {
          if (attObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries, like Object.prototype.toJSONString = function() {}
            if (i.toLowerCase() == "data") {
              parObj.movie = attObj[i];
            }
            else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
              att += ' class="' + attObj[i] + '"';
            }
            else if (i.toLowerCase() != "classid") {
              att += ' ' + i + '="' + attObj[i] + '"';
            }
          }
        }
        var par = "";
        for (var j in parObj) {
          if (parObj[j] != Object.prototype[j]) { // Filter out prototype additions from other potential libraries
            par += '<param name="' + j + '" value="' + parObj[j] + '" />';
          }
        }
        el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
        objIdArr[objIdArr.length] = attObj.id; // Stored to fix object 'leaks' on unload (dynamic publishing only)
        r = getElementById(attObj.id);
      }
      else if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements: fall back to the proprietary embed element
        var e = createElement("embed");
        e.setAttribute("type", FLASH_MIME_TYPE);
        for (var k in attObj) {
          if (attObj[k] != Object.prototype[k]) { // Filter out prototype additions from other potential libraries
            if (k.toLowerCase() == "data") {
              e.setAttribute("src", attObj[k]);
            }
            else if (k.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
              e.setAttribute("class", attObj[k]);
            }
            else if (k.toLowerCase() != "classid") { // Filter out IE specific attribute
              e.setAttribute(k, attObj[k]);
            }
          }
        }
        for (var l in parObj) {
          if (parObj[l] != Object.prototype[l]) { // Filter out prototype additions from other potential libraries
            if (l.toLowerCase() != "movie") { // Filter out IE specific param element
              e.setAttribute(l, parObj[l]);
            }
          }
        }
        el.parentNode.replaceChild(e, el);
        r = e;
      }
      else { // Well-behaving browsers
        var o = createElement(OBJECT);
        o.setAttribute("type", FLASH_MIME_TYPE);
        for (var m in attObj) {
          if (attObj[m] != Object.prototype[m]) { // Filter out prototype additions from other potential libraries
            if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
              o.setAttribute("class", attObj[m]);
            }
            else if (m.toLowerCase() != "classid") { // Filter out IE specific attribute
              o.setAttribute(m, attObj[m]);
            }
          }
        }
        for (var n in parObj) {
          if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // Filter out prototype additions from other potential libraries and IE specific param element
            createObjParam(o, n, parObj[n]);
          }
        }
        el.parentNode.replaceChild(o, el);
        r = o;
      }
    }
    return r;
  }

  function createObjParam(el, pName, pValue) {
    var p = createElement("param");
    p.setAttribute("name", pName);
    p.setAttribute("value", pValue);
    el.appendChild(p);
  }

  /* Cross-browser SWF removal
  - Especially needed to safely and completely remove a SWF in Internet Explorer
  */
  function removeSWF(id) {
    var obj = getElementById(id);
    if (obj && (obj.nodeName == "OBJECT" || obj.nodeName == "EMBED")) {
      if (ua.ie && ua.win) {
        if (obj.readyState == 4) {
          removeObjectInIE(id);
        }
        else {
          win.attachEvent("onload", function() {
            removeObjectInIE(id);
          });
        }
      }
      else {
        obj.parentNode.removeChild(obj);
      }
    }
  }

  function removeObjectInIE(id) {
    var obj = getElementById(id);
    if (obj) {
      for (var i in obj) {
        if (typeof obj[i] == "function") {
          obj[i] = null;
        }
      }
      obj.parentNode.removeChild(obj);
    }
  }

  /* Functions to optimize JavaScript compression
  */
  function getElementById(id) {
    var el = null;
    try {
      el = doc.getElementById(id);
    }
    catch (e) { }
    return el;
  }

  function createElement(el) {
    return doc.createElement(el);
  }

  /* Updated attachEvent function for Internet Explorer
  - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
  */
  function addListener(target, eventType, fn) {
    target.attachEvent(eventType, fn);
    listenersArr[listenersArr.length] = [target, eventType, fn];
  }

  /* Flash Player and SWF content version matching
  */
  function hasPlayerVersion(rv) {
    var pv = ua.pv, v = rv.split(".");
    v[0] = parseInt(v[0], 10);
    v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
    v[2] = parseInt(v[2], 10) || 0;
    return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
  }

  /* Cross-browser dynamic CSS creation
  - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
  */
  function createCSS(sel, decl) {
    if (ua.ie && ua.mac) {
      return;
    }
    var h = doc.getElementsByTagName("head")[0], s = createElement("style");
    s.setAttribute("type", "text/css");
    s.setAttribute("media", "screen");
    if (!(ua.ie && ua.win) && typeof doc.createTextNode != UNDEF) {
      s.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
    }
    h.appendChild(s);
    if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
      var ls = doc.styleSheets[doc.styleSheets.length - 1];
      if (typeof ls.addRule == OBJECT) {
        ls.addRule(sel, decl);
      }
    }
  }

  function setVisibility(id, isVisible) {
    var v = isVisible ? "visible" : "hidden";
    if (isDomLoaded && getElementById(id)) {
      getElementById(id).style.visibility = v;
    }
    else {
      createCSS("#" + id, "visibility:" + v);
    }
  }

  /* Filter to avoid XSS attacks 
  */
  function urlEncodeIfNecessary(s) {
    var regex = /[\\\"<>\.;]/;
    var hasBadChars = regex.exec(s) != null;
    return hasBadChars ? encodeURIComponent(s) : s;
  }

  /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
  */
  var cleanup = function() {
    if (ua.ie && ua.win) {
      window.attachEvent("onunload", function() {
        // remove listeners to avoid memory leaks
        var ll = listenersArr.length;
        for (var i = 0; i < ll; i++) {
          listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
        }
        // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
        var il = objIdArr.length;
        for (var j = 0; j < il; j++) {
          removeSWF(objIdArr[j]);
        }
        // cleanup library's main closures to avoid memory leaks
        for (var k in ua) {
          ua[k] = null;
        }
        ua = null;
        for (var l in swfobject) {
          swfobject[l] = null;
        }
        swfobject = null;
      });
    }
  } ();


  return {
    /* Public API
    - Reference: http://code.google.com/p/swfobject/wiki/SWFObject_2_0_documentation
    */
    registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr) {
      if (!ua.w3cdom || !objectIdStr || !swfVersionStr) {
        return;
      }
      var regObj = {};
      regObj.id = objectIdStr;
      regObj.swfVersion = swfVersionStr;
      regObj.expressInstall = xiSwfUrlStr ? xiSwfUrlStr : false;
      regObjArr[regObjArr.length] = regObj;
      setVisibility(objectIdStr, false);
    },

    getObjectById: function(objectIdStr) {
      var r = null;
      if (ua.w3cdom) {
        var o = getElementById(objectIdStr);
        if (o) {
          var n = o.getElementsByTagName(OBJECT)[0];
          if (!n || (n && typeof o.SetVariable != UNDEF)) {
            r = o;
          }
          else if (typeof n.SetVariable != UNDEF) {
            r = n;
          }
        }
      }
      return r;
    },

    embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj) {
      if (!ua.w3cdom || !swfUrlStr || !replaceElemIdStr || !widthStr || !heightStr || !swfVersionStr) {
        return;
      }
      widthStr += ""; // Auto-convert to string
      heightStr += "";
      if (hasPlayerVersion(swfVersionStr)) {
        setVisibility(replaceElemIdStr, false);
        var att = {};
        if (attObj && typeof attObj === OBJECT) {
          for (var i in attObj) {
            if (attObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries
              att[i] = attObj[i];
            }
          }
        }
        att.data = swfUrlStr;
        att.width = widthStr;
        att.height = heightStr;
        var par = {};
        if (parObj && typeof parObj === OBJECT) {
          for (var j in parObj) {
            if (parObj[j] != Object.prototype[j]) { // Filter out prototype additions from other potential libraries
              par[j] = parObj[j];
            }
          }
        }
        if (flashvarsObj && typeof flashvarsObj === OBJECT) {
          for (var k in flashvarsObj) {
            if (flashvarsObj[k] != Object.prototype[k]) { // Filter out prototype additions from other potential libraries
              if (typeof par.flashvars != UNDEF) {
                par.flashvars += "&" + k + "=" + flashvarsObj[k];
              }
              else {
                par.flashvars = k + "=" + flashvarsObj[k];
              }
            }
          }
        }
        addDomLoadEvent(function() {
          createSWF(att, par, replaceElemIdStr);
          if (att.id == replaceElemIdStr) {
            setVisibility(replaceElemIdStr, true);
          }
        });
      }
      else if (xiSwfUrlStr && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) {
        isExpressInstallActive = true; // deferred execution
        setVisibility(replaceElemIdStr, false);
        addDomLoadEvent(function() {
          var regObj = {};
          regObj.id = regObj.altContentId = replaceElemIdStr;
          regObj.width = widthStr;
          regObj.height = heightStr;
          regObj.expressInstall = xiSwfUrlStr;
          showExpressInstall(regObj);
        });
      }
    },

    getFlashPlayerVersion: function() {
      return { major: ua.pv[0], minor: ua.pv[1], release: ua.pv[2] };
    },

    hasFlashPlayerVersion: hasPlayerVersion,

    createSWF: function(attObj, parObj, replaceElemIdStr) {
      if (ua.w3cdom) {
        return createSWF(attObj, parObj, replaceElemIdStr);
      }
      else {
        return undefined;
      }
    },

    removeSWF: function(objElemIdStr) {
      if (ua.w3cdom) {
        removeSWF(objElemIdStr);
      }
    },

    createCSS: function(sel, decl) {
      if (ua.w3cdom) {
        createCSS(sel, decl);
      }
    },

    addDomLoadEvent: addDomLoadEvent,

    addLoadEvent: addLoadEvent,

    getQueryParamValue: function(param) {
      var q = doc.location.search || doc.location.hash;
      if (param == null) {
        return urlEncodeIfNecessary(q);
      }
      if (q) {
        var pairs = q.substring(1).split("&");
        for (var i = 0; i < pairs.length; i++) {
          if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
            return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
          }
        }
      }
      return "";
    },

    // For internal usage only
    expressInstallCallback: function() {
      if (isExpressInstallActive && storedAltContent) {
        var obj = getElementById(EXPRESS_INSTALL_ID);
        if (obj) {
          obj.parentNode.replaceChild(storedAltContent, obj);
          if (storedAltContentId) {
            setVisibility(storedAltContentId, true);
            if (ua.ie && ua.win) {
              storedAltContent.style.display = "block";
            }
          }
          storedAltContent = null;
          storedAltContentId = null;
          isExpressInstallActive = false;
        }
      }
    }
  };
} ();

/**
* SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
*
* SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
*/
if (typeof deconcept == "undefined") { var deconcept = new Object(); } if (typeof deconcept.util == "undefined") { deconcept.util = new Object(); } if (typeof deconcept.SWFObjectUtil == "undefined") { deconcept.SWFObjectUtil = new Object(); } deconcept.SWFObject = function(_1, id, w, h, _5, c, _7, _8, _9, _a) { if (!document.getElementById) { return; } this.DETECT_KEY = _a ? _a : "detectflash"; this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY); this.params = new Object(); this.variables = new Object(); this.attributes = new Array(); if (_1) { this.setAttribute("swf", _1); } if (id) { this.setAttribute("id", id); } if (w) { this.setAttribute("width", w); } if (h) { this.setAttribute("height", h); } if (_5) { this.setAttribute("version", new deconcept.PlayerVersion(_5.toString().split("."))); } this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion(); if (!window.opera && document.all && this.installedVer.major > 7) { deconcept.SWFObject.doPrepUnload = true; } if (c) { this.addParam("bgcolor", c); } var q = _7 ? _7 : "high"; this.addParam("quality", q); this.setAttribute("useExpressInstall", false); this.setAttribute("doExpressInstall", false); var _c = (_8) ? _8 : window.location; this.setAttribute("xiRedirectUrl", _c); this.setAttribute("redirectUrl", ""); if (_9) { this.setAttribute("redirectUrl", _9); } }; deconcept.SWFObject.prototype = { useExpressInstall: function(_d) { this.xiSWFPath = !_d ? "expressinstall.swf" : _d; this.setAttribute("useExpressInstall", true); }, setAttribute: function(_e, _f) { this.attributes[_e] = _f; }, getAttribute: function(_10) { return this.attributes[_10]; }, addParam: function(_11, _12) { this.params[_11] = _12; }, getParams: function() { return this.params; }, addVariable: function(_13, _14) { this.variables[_13] = _14; }, getVariable: function(_15) { return this.variables[_15]; }, getVariables: function() { return this.variables; }, getVariablePairs: function() { var _16 = new Array(); var key; var _18 = this.getVariables(); for (key in _18) { _16[_16.length] = key + "=" + _18[key]; } return _16; }, getSWFHTML: function() { var _19 = ""; if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); this.setAttribute("swf", this.xiSWFPath); } _19 = "<embed type=\"application/x-shockwave-flash\" src=\"" + this.getAttribute("swf") + "\" width=\"" + this.getAttribute("width") + "\" height=\"" + this.getAttribute("height") + "\" style=\"" + this.getAttribute("style") + "\""; _19 += " id=\"" + this.getAttribute("id") + "z\" name=\"" + this.getAttribute("id") + "z\" "; var _1a = this.getParams(); for (var key in _1a) { _19 += [key] + "=\"" + _1a[key] + "\" "; } var _1c = this.getVariablePairs().join("&"); if (_1c.length > 0) { _19 += "flashvars=\"" + _1c + "\""; } _19 += "/>"; } else { if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); this.setAttribute("swf", this.xiSWFPath); } _19 = "<object id=\"" + this.getAttribute("id") + "z\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"" + this.getAttribute("width") + "\" height=\"" + this.getAttribute("height") + "\" style=\"" + this.getAttribute("style") + "\">"; _19 += "<param name=\"movie\" value=\"" + this.getAttribute("swf") + "\" />"; var _1d = this.getParams(); for (var key in _1d) { _19 += "<param name=\"" + key + "\" value=\"" + _1d[key] + "\" />"; } var _1f = this.getVariablePairs().join("&"); if (_1f.length > 0) { _19 += "<param name=\"flashvars\" value=\"" + _1f + "\" />"; } _19 += "</object>"; } return _19; }, write: function(_20) { if (this.getAttribute("useExpressInstall")) { var _21 = new deconcept.PlayerVersion([6, 0, 65]); if (this.installedVer.versionIsValid(_21) && !this.installedVer.versionIsValid(this.getAttribute("version"))) { this.setAttribute("doExpressInstall", true); this.addVariable("MMredirectURL", escape(this.getAttribute("xiRedirectUrl"))); document.title = document.title.slice(0, 47) + " - Flash Player Installation"; this.addVariable("MMdoctitle", document.title); } } if (this.skipDetect || this.getAttribute("doExpressInstall") || this.installedVer.versionIsValid(this.getAttribute("version"))) { var n = (typeof _20 == "string") ? document.getElementById(_20) : _20; n.innerHTML = this.getSWFHTML(); return true; } else { if (this.getAttribute("redirectUrl") != "") { document.location.replace(this.getAttribute("redirectUrl")); } } return false; } }; deconcept.SWFObjectUtil.getPlayerVersion = function() { var _23 = new deconcept.PlayerVersion([0, 0, 0]); if (navigator.plugins && navigator.mimeTypes.length) { var x = navigator.plugins["Shockwave Flash"]; if (x && x.description) { _23 = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".")); } } else { if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0) { var axo = 1; var _26 = 3; while (axo) { try { _26++; axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + _26); _23 = new deconcept.PlayerVersion([_26, 0, 0]); } catch (e) { axo = null; } } } else { try { var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); } catch (e) { try { var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); _23 = new deconcept.PlayerVersion([6, 0, 21]); axo.AllowScriptAccess = "always"; } catch (e) { if (_23.major == 6) { return _23; } } try { axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); } catch (e) { } } if (axo != null) { _23 = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(",")); } } } return _23; }; deconcept.PlayerVersion = function(_29) { this.major = _29[0] != null ? parseInt(_29[0]) : 0; this.minor = _29[1] != null ? parseInt(_29[1]) : 0; this.rev = _29[2] != null ? parseInt(_29[2]) : 0; }; deconcept.PlayerVersion.prototype.versionIsValid = function(fv) { if (this.major < fv.major) { return false; } if (this.major > fv.major) { return true; } if (this.minor < fv.minor) { return false; } if (this.minor > fv.minor) { return true; } if (this.rev < fv.rev) { return false; } return true; }; deconcept.util = { getRequestParameter: function(_2b) { var q = document.location.search || document.location.hash; if (_2b == null) { return q; } if (q) { var _2d = q.substring(1).split("&"); for (var i = 0; i < _2d.length; i++) { if (_2d[i].substring(0, _2d[i].indexOf("=")) == _2b) { return _2d[i].substring((_2d[i].indexOf("=") + 1)); } } } return ""; } }; deconcept.SWFObjectUtil.cleanupSWFs = function() { var _2f = document.getElementsByTagName("OBJECT"); for (var i = _2f.length - 1; i >= 0; i--) { _2f[i].style.display = "none"; for (var x in _2f[i]) { if (typeof _2f[i][x] == "function") { _2f[i][x] = function() { }; } } } }; if (deconcept.SWFObject.doPrepUnload) { if (!deconcept.unloadSet) { deconcept.SWFObjectUtil.prepUnload = function() { __flash_unloadHandler = function() { }; __flash_savedUnloadHandler = function() { }; window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs); }; window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload); deconcept.unloadSet = true; } } if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }; } var getQueryParamValue = deconcept.util.getRequestParameter; var FlashObject = deconcept.SWFObject; var SWFObject = deconcept.SWFObject;


function unescapeHTML(html) {
  var htmlNode = document.createElement("DIV");
  htmlNode.innerHTML = html;
  if (htmlNode.innerText)
    return htmlNode.innerText; // IE
  return htmlNode.textContent; // FF
}
