function FlashScaler(flashdiv,w,h){
		
	var flashObj = document.getElementById(flashdiv);
	var minW = w;
	var minH = h;	
	addWindowEvent("onload",resize);
	addWindowEvent("onresize",resize);
	
	function addWindowEvent(eventtype,func) {
  	var oldEvent= window[eventtype];
  	if (typeof window[eventtype] != 'function') {
    	window[eventtype] = func;
  	} else {
    	window[eventtype] = function() {
      	if (oldEvent) {
       	 oldEvent();
      	}
      	func();
    	}
  	}	 	
	}
	
	function resize() {			
		if (self.innerHeight) 
		{
			winW = self.innerWidth;
			winH = self.innerHeight;
		}
		else if (document.documentElement && document.documentElement.clientHeight)	
		{
			winW = document.documentElement.clientWidth;
			winH = document.documentElement.clientHeight;
		}
		else if (document.body)
		{
			winW = document.body.clientWidth;
			winH = document.body.clientHeight;
		}	
		if(winH<minH) {
			flashObj.style.height = minH+"px";
		} else {
			flashObj.style.height = "100%";
		}
		if(winW<minW) {
			flashObj.style.width = minW+"px";
		} else {
			flashObj.style.width = "100%";
		}	
	}
	
}