var browserType = "";

function getBrowserType()
{
	//Non-IE
	if (typeof(window.innerWidth) == 'number')
		browserType = "non_ie";
	
	//IE 6+ in 'standards compliant mode'
	else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
		browserType = "ie_6+";
	
	//IE 4 compatible
	else if (document.body && (document.body.clientWidth || document.body.clientHeight))
		browserType = "ie_4";
}


function resizeHeight(divid, windowHeight)
{
	var flash_div = document.getElementById(divid); 
	
	if (windowHeight < 800)
	{
		document.body.style.height = "800px";
		flash_div.style.height = "800px";
	}
	
	else
	{
		document.body.style.height = windowHeight + "px";
		flash_div.style.height = windowHeight + "px";
	}
}

function resizeWidth(divid, windowWidth)
{
	var flash_div = document.getElementById(divid);
	
	
	if (windowWidth < 1165)
	{
		document.body.style.width = "1165px";
		flash_div.style.width = "1165px";
	}  
	
	else
	{
		document.body.style.width = windowWidth + "px";
		flash_div.style.width = windowWidth + "px";
	}
}

function doResize(divid)
{
	switch (browserType)
	{
		case "non_ie":
			resizeHeight(divid, window.innerHeight);
			resizeWidth(divid, window.innerWidth);
			break;
			
		case "ie_6+":
			resizeHeight(divid, document.documentElement.clientHeight);
			resizeWidth(divid, document.documentElement.clientWidth);
			break;
			
		case "ie_4":
			resizeHeight(divid, document.body.clientHeight);
			resizeWidth(divid, document.body.clientWidth);
			break;
	}
}