﻿/**
 * SWFForceSize v1.0: Flash container size limiter for SWFObject - http://blog.pixelbreaker.com/
 *
 * SWFForceSize is (c) 2006 Gabriel Bucknall and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Dependencies: 
 * SWFObject v2.0 - (c) 2006 Geoff Stearns.
 * http://blog.deconcept.com/swfobject/
 */
function SWFForceSize(a,b,c){this.div=a.getAttribute('id');this.minW=b;this.minH=c;var o=this;this.addWindowEvent('onload',this,this.onLoadDiv);this.addWindowEvent('onresize',this,this.onResizeDiv)}SWFForceSize.prototype={addWindowEvent:function(a,b,c){var d=window[a];if(typeof window[a]!='function')window[a]=function(){c.call(b)};else{window[a]=function(){if(d)d();c.call(b)}}},getWinSize:function(){var a,winW;if(parseInt(navigator.appVersion)>3){if(document.body.offsetWidth){winW=document.body.offsetWidth;a=document.body.offsetHeight}else if(document.body.offsetWidth){winW=document.body.offsetWidth;a=document.body.offsetHeight}}return{height:a,width:winW}},onLoadDiv:function(){document.getElementById(this.div).style.width="100%";document.getElementById(this.div).style.height="100%";this.onResizeDiv()},onResizeDiv:function(){var a=this.getWinSize();var w=a.width<this.minW?this.minW+"px":"100%";var h=a.height<this.minH?this.minH+"px":"100%";if(document.all)document.body.scroll=(w!="100%"||h!="100%")?"auto":"no";document.getElementById(this.div).style.width=w;document.getElementById(this.div).style.height=h}}