(function(){
    var flashObject = document.getElementById('flash');
    var forward = [
        'initFlash',
        'consolelog',
        'playFinished'
    ];
    window.showStartGiftSpef = function (args) {
        var ar2 = decodeURIComponent(args);
        flashObject.showStartGiftSpef(ar2);
    };
    window.transSwfDirToSpef = function (args) {
        flashObject.transSwfDirToSpef(args);
    };
    window.setFullScreen = function (args) {
        flashObject.setFullScreen(args);
    };
    window.showBroadcast = function (args) {
        flashObject.showBroadcast(args);
    }
    forward.forEach(function (v)
    {
        (function (name)
        {
            window[name] = function ()
            {
                window.giftlogic[name].apply(window.giftlogic, arguments);
            };
        })(v);
    });
})();