// saved from url=http://www.asafvg.it
// Software and graphics by: Gianni Pezzarini gianni.pezzarini@istruzione.it

// Object: Javascript Library

// Imposta nuova finestra modalità 1 senza menu con scroll
function expandingWindow(website, width, height) {
	var windowprops='width=1,height=1,scrollbars=yes,status=no,resizable=yes,location=no'
	var heightspeed = 5;
	var widthspeed = 5; 
	var leftdist = 10;   
	var topdist = 10; 
	if(width == 0){width = 480}
	if(height == 0){height = 600}
	if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {
		var winwidth = width;
		var winheight = height;
		var sizer = window.open("","","left=" + leftdist + ",top=" + topdist +","+ windowprops);
		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.open(website,'mywindow');
}

// Imposta nuova finestra modalità 2
function expandingWindow2(website, width, height) {
	var windowprops='width=1,height=1,toolbar=no,scrollbars=no,status=no,resizable=no,location=no'
	var heightspeed = 5;
	var widthspeed = 5; 
	var leftdist = 10;   
	var topdist = 10; 
	if(width == 0){width = 480}
	if(height == 0){height = 600}
	if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {
		var winwidth = width;
		var winheight = height;
		var sizer = window.open("","","left=" + leftdist + ",top=" + topdist +","+ windowprops);
		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.open(website,'mywindow');
}

// Imposta nuova finestra alla misura dello schermo
function openFullSenza(url) {
	width = self.screen.availWidth;
	height = self.screen.availHeight;
	opzioni = "height=" + (height-165) + ",width=" + (width-12) + ",status,location,scrollbars,toolbar,resizable,menubar,left=0,top=0,screenX=0,screenY=0";
	winobj = window.open(url,"",opzioni);
	
// Istruzioni Netscape 4 e 6 (per questi funziona perfettamente)
	if (!document.all) {
		winobj.outerWidth = width;
		winobj.outerHeight = height;
		}
		winobj.focus();
	};

// Visualizza ...
function openCentered(url, wName, width, height) {
	posX = (screen.availWidth - width) / 2;
	posY = (screen.availHeight - height) / 2 - 10;
	opt = "resizable=yes, menubar=no, toolbar=no, width=" + width + ", height=" + height + ", screenX=" + posX + ", screenY=" + posY + ", left=" + posX + ", top=" + posY;
	window.open(url,wName,opt);
}


// saved from url=http://www.asafvg.it
// Software and graphics by: Gianni Pezzarini gianni.pezzarini@istruzione.it
