function showFlash () {
$('deco')
        .store('bgstyles',$('deco').getStyles('background-image','background-color'))
        .setStyles({'background-image':'none','background-color':'transparent'});

   new Swiff('/userfiles/flash/header.swf', {
        id: 'mp1',
        name: 'mp1',
        container: $('deco'),
        width: 550,
        height: 375,
        params: {
            wmode: 'opaque',
            bgcolor: '#000000'
        }
    });
}
window.addEvent('domready',function() {
    if (Browser.Engine.trident4 ||!Browser.Plugins.Flash) {
        $$('#stop','#play').destroy();
    }
});

window.addEvent('load',function() {
if (Browser.Engine.trident4) {

    var arVersion = navigator.appVersion.split("MSIE");
    var version = parseFloat(arVersion[1]);

    $$("img.t2p","img.contentbar").each(function(elem){
       fixPNG(elem);
    });

}

if (!Browser.Engine.trident4 && Browser.Plugins.Flash && Browser.Plugins.Flash.version && Browser.Plugins.Flash.version > 7) {
        if (Cookie.read("playFlash") == false ||Cookie.read("playFlash") == 'yes') {
           showFlash();
        }
        $('stop').addEvents({
            'click':function(e){
                new Event(e).stop();
                $('deco').setStyles($('deco').retrieve('bgstyles'));
                if ($('mp1'))$('mp1').destroy();
                Cookie.write("playFlash",'no');
            },
            'mouseenter':function(){this.setStyle('cursor','pointer')},
            'mouseleave':function(){this.setStyle('cursor','')}
        });
        $('play').addEvents({
            'click':function(e){
                new Event(e).stop();
                if (!$('mp1')) {
                    showFlash();
                    Cookie.write("playFlash",'yes');
                }
            },
            'mouseenter':function(){this.setStyle('cursor','pointer')},
            'mouseleave':function(){this.setStyle('cursor','')}
        });
} else {
    $$('#stop','#start').addEvents({
       'click': function(e){
                new Event(e).stop();
                alert("u need adobe flash to play this movie");
       }
    });
}
});

if (Browser.Engine.trident4) {

    var arVersion = navigator.appVersion.split("MSIE");
    var version = parseFloat(arVersion[1]);
}


function fixPNG(myImage)
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters))
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ?
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width
                  + "px; height:" + myImage.height
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML
    }
}