function onResize(){
	setFlashSize();
	
	var flash = document.getElementById(String(flashData.attributes.id));
		flash.width = 	flashData.size.width;
		flash.height = 	flashData.size.height;
}

function setFlashSize(){
	var defaultSize = 			flashData.minSize;
	var currentSize = 			Array();
		currentSize['width'] = 	0;
		currentSize['height'] = 0;
	
	if (parseInt(navigator.appVersion)>3) {
		 if (navigator.appName=="Netscape") {
		  currentSize['width'] = window.innerWidth;
		  currentSize['height'] = window.innerHeight;
		 }
		 if (navigator.appName.indexOf("Microsoft")!=-1) {
		  currentSize['width'] = document.body.offsetWidth;
		  currentSize['height'] = document.body.offsetHeight;
		 }
	}
	
	if(currentSize.height < flashData.minSize.height){
		flashData.size.height = defaultSize.height;
		if(currentSize.width < flashData.minSize.width)
			flashData.size.width = defaultSize.width;
		else
			flashData.size.width = '100%';
	}else{
		if(currentSize.width < flashData.minSize.width){
			flashData.size.width = defaultSize.width;
			flashData.size.height = '100%';
		}else{
			flashData.size.height = currentSize.height;
			flashData.size.width = currentSize.width;
		}
	}
}

function checkDomReadyIE(){
	//check IE's proprietary DOM members
	if (!document.uniqueID && document.expando) return;

	//you can create any tagName, even customTag like <document :ready />
	var tempNode = document.createElement('document:ready'); 
	try {
			//see if it throws errors until after ondocumentready#
			tempNode.doScroll('left');

			//call your function which catch window.onDocumentReady
			onResize();

			//release some memory, if possible
			tempNode = null;
	} catch (err) {
			setTimeout(arguments.callee, 0);
	}
}

// Add events
if (window.addEventListener){
	window.addEventListener("resize", onResize, false);
	window.addEventListener("DOMContentLoaded", onResize, false);
}else{
	window.onresize = function(){ onResize(); }
	checkDomReadyIE();
}
