function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		azienda_down_sopra = newImage("immagini/azienda.gif");
		prodotti_sopra = newImage("immagini/prodotti-sopra.gif");
		servizi_sopra = newImage("immagini/servizi-sopra.gif");
		soluzioni_sopra = newImage("immagini/soluzioni-sopra.gif");
		contatti_sopra = newImage("immagini/contatti-sopra.gif");
		home_sopra = newImage("immagini/home-sopra.gif");
		preloadFlag = true;
	}
}

function apripopup(x) {

    remote = window.open("","remotewin","width=452,height=500,scrollbars=yes,left=0,top=0,toolbar=no,menubar=no,location=no");

         if (x==1) {

    remote.location.href = "contatti.asp";

         }
		 else if (x==2) {

    remote.location.href = "contatti.html";

         }
		 
		  else if (x==3) {

    remote.location.href = "faq.html";

         }
		 		 
         if (remote.opener == null) remote.opener = window;

    remote.opener.name = "opener";

    }
	
	function chiudipopup() {

    window.close();
        }

	// netscape resize fix
if (document.layers) {
	widthcheck = window.innerwidth
	heightcheck = window.innerheight
	window.onresize = resizefix
}

function resizefix() {
	if (widthcheck != window.innerwidth || heightcheck != window.innerheight)
	document.location.href = document.location.href
}
