/*******************************************************************************
 * FitFlash - developed by Miller Medeiros ( http://www.millermedeiros.com )
 *
 * FitFlash is (c) 2006 Miller Medeiros - v2.0
 *
 * FitFlash is used to resize flash to 100% wid/hei when the browser window is greater than the swf minimum size and to resize swf to the minimum size when browser window is smaller than the minimum size.
 *
 * If you gonna use this code DON'T delete this comment !!!
 *
 *******************************************************************************

** USAGE ******** (place in your HTML file) ******************

	<script type="text/javascript">
	<!--
	    FitFlash ("flash ID" , minimum width, minimum height);
	//-->
	</script>

*************************************************************/

<!-- //2006 - MILLERMEDEIROS.COM
		// VARS 
   		var NS = (navigator.appName=="Netscape" )?true:false;
		var minWid = 0;
		var minHei;
		var fitTarget;
		// FIT FLASH
		function FitFlash(target, wid, hei) { 
				iWidth = (NS)?window.innerWidth:document.body.clientWidth; 
				iHeight = (NS)?window.innerHeight:document.body.clientHeight;
				if (minWid == 0 ) {
					 minWid = wid;
					 minHei = hei;
					 fitTarget = target;
				}
				if (iWidth > minWid ) {
					document.getElementById(fitTarget).style.width = "100%";
				} else {
					document.getElementById(fitTarget).style.width = minWid +"px";
				}
				if (iHeight > minHei){
					document.getElementById(fitTarget).style.height = "100%";
				} else {
					document.getElementById(fitTarget).style.height = minHei+"px";
				}
		};
window.onresize= FitFlash;
//-->