// JavaScript Document

//Funzione per popup
function OpenPopUp(pathFile,WindowWidth, WindowHeight) {

        RemoteWin=window.open(pathFile+'','PopUpWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+WindowWidth+',height='+WindowHeight+'');
        RemoteWin.focus();
}

//Funzione per galleria ZOOM immagini con ridimensione automatica dalla pagina
function fullsize(website) {
	var heightspeed = 2; // vertical scrolling speed (higher = slower)
	var widthspeed = 7;  // horizontal scrolling speed (higher = slower)
	var leftdist = 100;    // distance to left edge of window
	var topdist = 100;     // distance to top edge of window
	//if (document.all) {
		var winwidth = 0;
		var winheight = 0;
		var sizer = window.open("","","left=" + leftdist + ",top=" + topdist + ",width=1,height=1,scrollbars=yes,resizable=yes");
		for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed) {
			sizer.resizeTo("1", sizeheight);
		}
		for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed) {
			sizer.resizeTo(sizewidth, sizeheight);
		}
	sizer.location = website;
	//}
	//else
	//window.location = website;
}
