/* 
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(newW){
  var contenitore = document.getElementById('contenitore');
	contenitore.style.width = newW+"px";
}
function setFlashHeight(newH){
	var contenitore = document.getElementById('contenitore');
	newH += "";
	if (newH == "NaN") {
  } else {
		contenitore.style.height = newH+"px";
 	}
}
function setFlashTop(newT){
  var contenitore = document.getElementById('contenitore');
	contenitore.style.top = newT+"px";
}
function setFlashLeft(newL){
  var contenitore = document.getElementById('contenitore');
	//contenitore.style.marginLeft = newL+"px";
}
function setFlashElements(newW, newH, newT, newL) {
	var contenitore = document.getElementById('contenitore');
	contenitore.style.width = "100%";
	contenitore.style.height = newH+"px";

	contenitore.style.top = newT+"px";
	contenitore.style.marginLeft = "-50%";

	var body = document.getElementsByTagName("body")[0];
	var info = document.getElementById("info");
	body.removeChild(info);
}
function setFlashSize(newW, newH){
	setFlashWidth(newW);
	setFlashHeight(newH);
}
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;
}

