/* 
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){
	if (newW<screen.width) newW=screen.width;
	if(document.all && !document.getElementById) {
 		document.all["miflash"].style.height = newW+"px";
	}else{
		document.getElementById("miflash").style.width = newW+"px";
	}
	window.scroll(0,0)
}
function setFlashHeight(divid, newH){
	if (newH<screen.height) newH=screen.height;
	//if(document.all && !document.getElementById) {
 	//	document.all["miflash"].style.height = newH+"px";
	//}else{
	//	document.getElementById("miflash").style.height = newH+"px";
	//}
	newSize('100%',newH)
	window.scroll(0,0)
}
function setFlashSize(newW, newH){
	
	newSize(newW,newH);

}
function newSize(datoX,datoY) {
	window.scroll(0,0)
	if(document.all && !document.getElementById) {
 		document.all['miFlash'].style.pixelWidth = datoX;
 		document.all['miFlash'].style.pixelHeight = datoY;
	}else{
		document.getElementById('miFlash').style.width = datoX;
		document.getElementById('miFlash').style.height = datoY;
	}
}
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;
}
