/* 
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 setFlashWidth(divid, newW, newC){
	document.getElementById(divid).style.width = newW+"px";
}






function setFlashHeight(newH){
	
  	
	var w = 0;
	var h = 0;

	//IE
	if(!window.innerWidth)
	{
		//strict mode
		if(!(document.documentElement.clientWidth == 0))
		{
			w = document.documentElement.clientWidth;
			h = document.documentElement.clientHeight;
		}
		//quirks mode
		else
		{
			w = document.body.clientWidth;
			h = document.body.clientHeight;
		}
	}
	//w3c
	else
	{
		w = window.innerWidth;
		h = window.innerHeight;
	}
	
	
	if (newH < h) 

		//document.getElementById('bgid').style.height = myHeight+"px";
		document.getElementById('flashid').style.height = h+"px";
		
	else {
		document.getElementById('flashid').style.height = newH+"px";
		//document.getElementById('bgid').style.height = newH+"px";
	}
	
	
	//alert(newH + "-" +currentHeight + "-" +document.getElementById('flashid').style.height);
	//document.getElementById('bgid').style.height = currentHeight+"px";
	//document.getElementById('bgid').style.background = "#FF6600";//+newC;
	//alert(newC + "-" + document.getElementById('fbg').style.background);
}


function setFlashSize(divid1, newH, divid2, newC){
	setFlashHeight(divid1, newH);
	setFlashHeight(divid2, newH);
	setDivColor(divid2, newC);
}

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;
}