/* 
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. 
*/

function ConstantTest(strFrom)
{
	alert("Function called from [" + strFrom + "]!");
}

var divid = "flash_container";
	
function set_PPG_FlashWidth(newW){
	//alert("calling width resize with parameters [" + divid + ", " + newW + "]");
	if (divid)
	{
		document.getElementById(divid).style.width = newW+"px";
	}
	else
	{
		alert("divid not found [" + divid + "]");
	}
}

function set_PPG_FlashHeight(newH){
	//alert("calling height resize with parameters [" + divid + ", " + newH + "]");
	if (divid)
	{
		document.getElementById(divid).style.height = newH+"px";
	}
	else
	{
		alert("divid not found [" + divid + "]");
	}
}

function set_PPG_FlashSize(newW, newH){
	set_PPG_FlashWidth(newW);
	set_PPG_FlashHeight( newH);
}

function canResizeFlash(){
	alert("!");
	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;
}
