var lastFH;
var o;
function getCStyle(obj,prop) {
	if (document.defaultView) {
		var v = document.defaultView.getComputedStyle(obj, "").getPropertyValue(prop);
	} else {
		var v = eval('obj.currentStyle.'+prop);
	}
	return v;
}
function canResizeFlash(){
	var ua = navigator.userAgent.toLowerCase();
	var opera = ua.indexOf("opera");
	if( document.getElementById ){
		if(opera == -1) return true;
		else if(parseInt(ua.substr(opera+6, 1)) >= 7) return true;
	}
	return false;
}

function setFlashWidth(divName,flashWidth){
	lastFH = flashWidth;
	if (document.all)
	{
		windowWidth = document.body.offsetWidth;
	} 
	else if (document.layers)
	{
		windowWidth = window.innerWidth;
	}
	else 
	{
		windowWidth = getCStyle(o,"width");
	}
	if (flashWidth < parseInt(windowWidth))
	{
		document.getElementById("flashDiv").style.width = "100%";
	} 
	else 
	{
		document.getElementById("flashDiv").style.width = flashWidth+"px";
	}
//	alert(windowWidth+" "+flashWidth);
}
function manualResize(){
	windowWidth = getCStyle(o,"width");
	if (lastFH < parseInt(windowWidth))
	{
		document.getElementById("flashDiv").style.width = "100%";
	} 
	else 
	{
		document.getElementById("flashDiv").style.width = lastFH+"px";
	}
	
}
//window.onresize = manualResize;
window.onload = function () {
	o = document.getElementById('testDiv');
}

