/*
Methods for resizing the flash stage at runtime.

setFlashWidth(divid, newW)
divid: id of the div containing the flash movie.
newW: new width for flash movie

setFlashWidth(divid, newH)
divid: id of the div containing the flash movie.
newH: new height for flash movie

setFlashSize(divid, newW, newH)
divid: id of the div containing the flash movie.
newW: new width for flash movie
newH: new height for flash movie

canResizeFlash()
returns true if browser supports resizing flash, false if not.
*/
var do_not_return_true_on_resize=true;
function setFlashWidth(divid, newW){
	document.getElementById(divid).style.width = newW+"px";
    if(do_not_return_true_on_resize)
 {}
    else
      return true;
	return true;
}
function setFlashHeight(divid, newH){
	document.getElementById(divid).style.height = newH+"px";
    if(do_not_return_true_on_resize){}
    else
  	return true;
}
function setFlashSize(divid, newW, newH){
	setFlashWidth(divid, newW);
	setFlashHeight(divid, newH);
    if(do_not_return_true_on_resize){}
    else
	return true;
}
function getDivSize(a_divID)
{
	var divWidth = -1;
	var divHeight = -1;
	var divObj;
	var sizeObj;
	var error = null;

	try
	{
		divObj = document.getElementById(a_divID);
		divWidth = divObj && divObj.style ? divObj.style.width : -1;
		divHeight = divObj && divObj.style ? divObj.style.height : -1;
	}
	catch(e)
	{
		error = e;
	}

	sizeObj = {width:divWidth, height:divHeight, error:error};

	return sizeObj;
}
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;
}

