// JavaScript Document
// Based on doResize by Neo-Pangea

var minWidth = 0;
var minWidth = 0;

function windowSize() {
  var obj = new Object();
  var windowWidth = 0, windowHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    windowWidth = window.innerWidth;
    windowHeight = window.innerHeight;
	obj.ie=false;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    windowWidth = document.documentElement.clientWidth;
    windowHeight = document.documentElement.clientHeight;
	obj.ie=true;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    windowWidth = document.body.clientWidth;
    windowHeight = document.body.clientHeight;
	obj.ie=true;
  }
  
  obj.w = windowWidth;
  obj.h = windowHeight;
  return obj;
}

function checkResize(){
	
	var obj = windowSize();
	obj.w = (obj.w<minWidth) ? minWidth+"px" : "100%";
	obj.h = (obj.h<minHeight) ? minHeight+"px" : "100%";
	document.getElementsByTagName("body")[0].style.overflow = (obj.w>minWidth || obj.h>minHeight) ? "visible" : "hidden";
	var flashDiv = document.getElementById("flashcontent").style;
	flashDiv.width = obj.w;
	flashDiv.height = obj.h;
	
}

function configureCheckSize(mW, mH)
{	
	minWidth = mW;
	minHeight = mH;
	
	window.onresize = checkResize;
	checkResize();
}