﻿

function FlashObject(swf, width, height, bgcolor, id, flashvars)
{
    var strFlashTag = new String();
    
    if (navigator.appName.indexOf("Microsoft") != -1)
    {
        strFlashTag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
        strFlashTag += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=version=8,0,0,0" ';
        strFlashTag += 'id="' + id + '" width="' + width + '" height="' + height + '">';
        strFlashTag += '<param name="movie" value="' + swf + '"/>';
        
        if(flashvars != null) {strFlashTag += '<param name="flashvars" value="' + flashvars + '"/>'};
        strFlashTag += '<param name="quality" value="best"/>';
        strFlashTag += '<param name="bgcolor" value="' + bgcolor + '"/>';
        strFlashTag += '<param name="menu" value="false"/>';
        strFlashTag += '<param name="salign" value="LT"/>';
        strFlashTag += '<param name="scale" value="noscale"/>';
        strFlashTag += '<param name="wmode" value="transparent"/>';
        strFlashTag += '<param name="allowScriptAccess" value="always"/>';
        strFlashTag += '</object>';
    }
    else
    {
        strFlashTag += '<embed src="' + swf + '" ';
        strFlashTag += 'quality="best" ';
        strFlashTag += 'bgcolor="' + bgcolor + '" ';
        strFlashTag += 'width="' + width + '" ';
        strFlashTag += 'height="' + height + '" ';
        strFlashTag += 'menu="false" ';
        strFlashTag += 'scale="noscale" ';
        strFlashTag += 'id="' + id + '" ';
        strFlashTag += 'salign="LT" ';
        strFlashTag += 'wmode="transparent" ';
        strFlashTag += 'allowScriptAccess="always" ';
        if(flashvars != null) {strFlashTag += 'flashvars="' + flashvars + '" '};
        strFlashTag += 'type="application/x-shockwave-flash" ';
        strFlashTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
        strFlashTag += '</embed>';
    }

 document.write(strFlashTag);
}

/*
* FitFlash v 2.5 (01/23/2008) - http://fitflash.millermedeiros.com
* FitFlash is (c) 2006 Miller Medeiros - http://www.millermedeiros.com
*/
var NS=(navigator.appName=='Netscape')?true:false;var ft;var mw;var mh;var xw;var xh;var xc;function FitFlash(t,w,h,_w,_h,c){if(t&&w&&h){ft=t;mw=w;mh=h;xw=_w;xh=_h;xc=(c==false||c==0)?false:true;document.getElementsByTagName('html')[0].style.height='100%';document.body.style.margin='0';document.body.style.padding='0';document.body.style.height='100%'}var tm=setTimeout("FlashFit()",200);window.onresize=FlashFit}function FlashFit(){if(ft){document.getElementById(ft).style.position='absolute'}iw=(NS)?window.innerWidth:document.body.clientWidth;ih=(NS)?window.innerHeight:document.body.clientHeight;if(iw>mw&&(iw<xw||!xw)){document.getElementById(ft).style.width='100%';if(xc){document.getElementById(ft).style.left='auto';document.getElementById(ft).style.marginLeft='0'}}else if(iw>xw){document.getElementById(ft).style.width=xw+'px';if(xc){document.getElementById(ft).style.left='50%';document.getElementById(ft).style.marginLeft=-(xw/2)+'px'}}else{document.getElementById(ft).style.width=mw+'px';if(xc){document.getElementById(ft).style.left='auto';document.getElementById(ft).style.marginLeft='0'}}if(ih>mh&&(ih<xh||!xh)){document.getElementById(ft).style.height='100%';if(xc){document.getElementById(ft).style.top='auto';document.getElementById(ft).style.marginTop='0'}}else if(ih>xh){document.getElementById(ft).style.height=xh+'px';if(xc){document.getElementById(ft).style.top='50%';document.getElementById(ft).style.marginTop=-(xh/2)+'px'}}else{document.getElementById(ft).style.height=mh+'px';if(xc){document.getElementById(ft).style.top='auto';document.getElementById(ft).style.marginTop='0'}}};