﻿function silentErrorHandler() { return true; }
//window.onerror = silentErrorHandler;


soundManager.url = './swf/'; // directory where SM2 .SWFs live
soundManager.useHighPerformance = true;
soundManager.useFastPolling = true;
soundManager.defaultOptions.autoLoad = true;
// Note that SounndManager will determine and append the appropriate .SWF file to the URL.

// disable debug mode after development/testing..
soundManager.debugMode = false;

// Option 1: Simple createSound method
soundManager.onload = function() {
    // SM2 has loaded - now you can create and play sounds!
    soundManager.createSound('galleryOpen', './sounds/button-27.mp3');
    soundManager.createSound('galleryChangeImage', './sounds/button-19.mp3');
}

function FireEvent(el, e) {
    var evt;
    if (document.createEvent) { // DOM Level 2 standard
        evt = document.createEvent("MouseEvents");
        evt.initMouseEvent(e, true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);

        el.dispatchEvent(evt);
    } else if (el.fireEvent) { // IE
        el.fireEvent('on' + e);
    }
}

