var prevWW = -1;
var prevWH = -1;
var hold;

function init(dir) {
	hold = document.getElementById('flashhold');
	//setInterval("resizeBg()", 1000);
	resizeBg();
}

function resizeBg() {
	var ww = Math.max(900, getWindowW());
	var wh = Math.max(600, getWindowH());
	
	if ( ww == prevWW && wh == prevWH ) { return; }
	prevWW = ww;
	prevWH = wh;
	
	hold.style.width = (ww-1)+'px';
	hold.style.height = (wh-1)+'px';
}

function getWindowW() {
	if ( typeof(window.innerWidth) == 'number' ) { return window.innerWidth; }	
	var de = document.documentElement;
	if ( de && de.clientWidth ) { return de.clientWidth; }	
	var db = document.body;
	if ( db && db ) { return db.clientWidth; }
}

function getWindowH() {
	if ( typeof(window.innerHeight) == 'number' ) { return window.innerHeight; }	
	var de = document.documentElement;
	if ( de && de.clientHeight ) { return de.clientHeight; }	
	var db = document.body;
	if ( db && db.clientHeight ) { return db.clientHeight; }
}