var min_width = 1000;
var min_height = 755;
var d = new Date();
var last_update = 0;


function resize() {
	var flash_div;
	var current_width;
	var current_height;
	var mod;
	var is_ie;
	
	
	
	
	if(browser.isIE4up) {	//IE
		flash_div 			= document.all['flashcontent'];
		
		if(browser.isIE5x){
			current_width 		= document.body.clientWidth;			// ie 5-6 quirks mode
			current_height 		= document.body.clientHeight;
		}
		
		if(browser.isIE6up){
			current_width		= document.documentElement.clientWidth;
			current_height 		= document.documentElement.clientHeight;  	// only on ie 6+
		}
		mod					= 0;
		is_ie				= true;
		
	}else {					// OTHERS
		flash_div 			= document.getElementById("flash");
		current_width 		= window.innerWidth;
		current_height 		= window.innerHeight;
		mod 				= 2;
		is_ie				= false;
	}
	
	// set minimum width
	var w = (current_width < min_width) ? min_width : current_width;
	var corrected_width = new String(String(w-mod)+"px");
	
	// set the height
	flash_div.style.width = corrected_width;
	
	
	// set minimum height
	var h = (current_height < min_height) ? min_height : current_height;
	var corrected_height = new String(String(h-mod)+"px")
	
	//window.status = "ie resize: " + d.valueOf() + "[" + current_height + ", " + min_height + ", " + corrected_height + "]";
	
	// set the height
	if(!is_ie){
		flash_div.style.height = corrected_height;
	}else{ // ie will fire it's own onresize, wait 10 milliseconds to break the endless loop
		var d2 = new Date();
		if( (d2.valueOf() - last_update) > 10){
			flash_div.style.height = corrected_height;
		}
	}
	
	last_update = d.valueOf();
}