/**
 * SWFUtility v1.0: Serie di utility da abbinare a siti realizzati in flash
 *
 * SWFUtility is (c) 2007 Roberto Colognato and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
// Gruppo di funzione per la gestione della mappa google
var myWidth = 0;
function showMap() {
	var obj = document.getElementById("boxMap");
	if (obj != null) {
		obj.style.visibility = "visible";
		obj.style.width = this.myWidth;
		obj.style.zIndex = 100;
	}
}
function hideMap() {
	var obj = document.getElementById("boxMap");
	if (obj != null) {
		obj.style.width = "0px";
		obj.style.zIndex = -1;
		obj.style.visibility = "hidden";
	}
}
function moveMap(x, y, w, h) {
	if (document.getElementById) {
		var obj = document.getElementById("flashcontent");
		if (obj != null) {
			var sx = obj.offsetLeft;
			var sy = obj.offsetTop;
			var obj = document.getElementById("boxMap");
			if (obj != null) {
				obj.style.left = (sx + x) + "px";
				obj.style.top = (sy + y) + "px";
				this.myWidth = w + "px";
				obj.style.width = w + "px";
				obj.style.height = h + "px";
				obj.style.zIndex = 100;
			}
		}
	}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// Funzione per eseguire il ridimensionamento dell'are di visualizzazione di un oggetto swf
var backImage = new Array(); 
backImage[0] = "_include/brd1.gif";
backImage[1] = "_include/brd2.gif";
function setHeight(vValue, vImage) {
	var myH = String(vValue);
	var obj = document.getElementById("flashcontent");
	if (typeof(obj) != "undefined") {
		obj.style.height = myH + "px";
	}
	obj = document.getElementById("mainswf");
	if (typeof(obj) != "undefined") {
		obj.style.height = myH + "px";
	}
	//document.body.style.backgroundImage = "url(" + backImage[vImage] + ")";
}

// Esegue il focus sull'oggetto html nascosto per consentire lo scorrimento
// della pagina anche quando lo stesso focus punta su di un oggetto swf
function setBodyFocus() {
	var obj = document.getElementById("focusArea");
	obj.focus();
}
