function CheckResolution() { //v3.0
	width = screen.width;
	height = screen.height;
	if ((width < 800) || (width < 600))  {
		alert('ATTENZIONE\nSi sta utilizzando una risoluzione di ' + width + ' x ' + height + '.Questo sito è stato realizzato per poter\nlavorare correttamente ad una risoluzione di 1024 x 768, mantenendo queste impost-\nazioni alcune parti del sito non saranno visibili.\nCosigliamo di aumentare la propria risoluzione video\n\nWARNING\nYou are using a video resolution of ' + width + ' x ' + height + '. This web-site was created for 1024 x 768\nresolution, keeping your actual settings some part of this web-site will be not visible as well.\nWe suggest to increase your own video resolution');
	}
}
function apri(url) {
	xwin = window.open(url, "organigramma", 'scrollbars=no, menubar=no, statusbar=no, resizable=yes');
}

function aprisito() {
	var apri;
	width = screen.width;
	height = screen.height;
	if (height < 1000)  {
		apri = "home2.html";
	} else {
		apri = "home1.html";
	}
	FScreen(apri,"newfinestra");
}

function FScreen(theURL,wname) {

	var xwin
	xwin = window.open(theURL, wname, 'scrollbars=auto, menubar=no, statusbar=yes, resizable=yes');

	if (document.all || document.layers) {

	xwin.moveTo(0,0);
	xwin.resizeTo(screen.availWidth,screen.availHeight)
	}
}

function Massimizza(link, windowName) {
	var scw = 0;
	var sch = 0;


	if (navigator.appName == 'Microsoft Internet Explorer' && (navigator.platform.substring(0,3) == 'Win')) {
		window.open(link, windowName,'fullscreen=yes,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=yes');
	}
	else if (navigator.appName == 'Netscape' && navigator.platform == 'MacPPC') {
		var scw=screen.width;
		var sch=screen.height;
		window.open (link, windowName, "screenX=0,screenY=0,outerWidth=" + scw + ",outerHeight=" + sch);
	}
	else {
		var scw=screen.width;
		var sch=screen.height;
		window.open (link, windowName, "screenX=0,screenY=0,Width=" + scw + ",Height=" + sch);	
	}
}

function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}
