function sizeFlash() {
	
	var object, windowWidth, windowHeight; 
	
	windowWidth = getWindowWidth();
	windowHeight = getWindowHeight();
	
	windowWidth = (windowWidth < 1280) ? 1280 : windowWidth;
	windowHeight = (windowHeight < 960) ? 960 : windowHeight;
	
	if (getObject("flash")) {
	
		object = getObject("flash");
	
		object.width = windowWidth;
		object.height = windowHeight;
	
	}

}

function getObject(id) {
	if(document.getElementById) return document.getElementById(id);
	else if(document.all) return document.all[id];
	else return null;
}

function getWindowWidth() {
	if(typeof(window.innerWidth )=="number") return window.innerWidth;
  else if(document.documentElement && document.documentElement.clientWidth) return document.documentElement.clientWidth;
  else if(document.body && document.body.clientWidth) return document.body.clientWidth;
	else return null;
}

function getWindowHeight() {
	if(typeof(window.innerHeight )=="number") return window.innerHeight;
  else if(document.documentElement && document.documentElement.clientHeight) return document.documentElement.clientHeight;
  else if(document.body && document.body.clientHeight) return document.body.clientHeight;
	else return null;
}

window.onload = sizeFlash;
window.onresize = sizeFlash;
