/* Impostazioni del layout ------------------------------------ */

	function setTemplate(pagina) {

		/* Rende il layout perfettamente crossbrowser */

		browsername = navigator.appName;
		browserVersion = navigator.appVersion;
		if (browsername.indexOf("Netscape")!=-1) { 
		
			if (navigator.appVersion.indexOf("Mac")!=-1 || navigator.appVersion.indexOf("Safari")!=-1 || navigator.appVersion.indexOf("Apple")!=-1) {

				browsername="SAFARI";
				addHomePixel = 1;

			} else {

				browsername="NS";
				addHomePixel = 1;

			} 

		} else {

			if (browsername.indexOf("Microsoft")!=-1) {

				browsername="MSIE";
				addHomePixel = 1;

			} else {

				browsername="MSIE";
				addHomePixel = 1;

			}

		}
		
		/* In questo caso NON deve fare nulla */

		var browserWindowWidth = document.documentElement.clientWidth;

		if (parseInt(browserWindowWidth)<960) {

			document.getElementById('pageContainer').style.left = "0px";
			document.getElementById('pageContainer').style.marginLeft = "0px";

		}
	}

/* ------------------------------------------------------------ */


/* Effetti di rollover ---------------------------------------- */

	function overLinkImg(idImg) {

		document.getElementById(idImg).src = "img/layout/squareSel.gif";

	}
	function outLinkImg(idImg) {

		document.getElementById(idImg).src = "img/layout/square.gif";

	}

/* ------------------------------------------------------------ */

/* Effetti del menu ------------------------------------------- */

	function openSubMenu(idMenu) {

		if (document.getElementById(idMenu).style.display=="none") {
			document.getElementById(idMenu).style.display = "";
		} else {
			document.getElementById(idMenu).style.display = "none";
		}
	}

/* ------------------------------------------------------------ */

/* Funzioni per apertura finestre di azione e visualizzazione - */

	/* Ref: js/ajax/ajaxContent.js */

	function setAction(action,firstID,secondID,popWidth) {

		document.getElementById('userAction').value = action;
		document.getElementById('actionFirstID').value = "";
		document.getElementById('actionFirstID').value = firstID;
		document.getElementById('actionSecondID').value = "";
		document.getElementById('actionSecondID').value = secondID;
		document.getElementById('popupWidth').value = "";
		document.getElementById('popupWidth').value = popWidth;

		openActionChannel();

	}

	function viewWindow(action,firstID,secondID,popWidth) {

		document.getElementById('view_userAction').value = action;
		document.getElementById('view_actionFirstID').value = "";
		document.getElementById('view_actionFirstID').value = firstID;
		document.getElementById('view_actionSecondID').value = "";
		document.getElementById('view_actionSecondID').value = secondID;
		document.getElementById('view_popupWidth').value = "";
		document.getElementById('view_popupWidth').value = popWidth;

		openViewChannel();

	}

	function playVideoContent(action,firstID,secondID,popWidth,vFile,vWidth,vHeight) {

		document.getElementById('vFile').value = vFile;
		document.getElementById('vWidth').value = vWidth;
		document.getElementById('vHeight').value = vHeight;

		setAction(action,firstID,secondID,popWidth);

	}

/* ------------------------------------------------------------ */

