/*
	Finestre ausiliarie()

	Author: Deiro Claudio
	Author Email: deiro@livio.it
*/

function openAux(href, w, h)
{
	var winWidth = w;
	var winHeight = h;
	var xPos = (screen.availWidth-winWidth)/2;
	var yPos = (screen.availHeight-winHeight)/2;

	this.open(href, "_blank", "innerWidth=" + w + ",innerHeight=" + h + ",width=" + w + ",height=" + h + ",top=0,left=0,titlebar=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,status=yes,top=" + yPos + ",left=" + xPos);
}

function displayImage(pic, w, h, title)
{
	var winWidth = w;
	var winHeight = h;
	var xPos = (screen.availWidth-winWidth)/2;
	var yPos = (screen.availHeight-winHeight)/2;

	var newWin = this.open("", "_blank", "innerWidth=" + w + ",innerHeight=" + h + ",width=" + w + ",height=" + h + ",top=0,left=0,titlebar=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,status=yes,top=" + yPos + ",left=" + xPos);

	if(newWin != null)
	{
		var htmlString = "<html><head><title>" + title + "</title></head>"  
		htmlString += "<body background=" + pic + ">"
		htmlString += "</body></html>"

		newWin.document.open()
		newWin.document.write(htmlString)
		newWin.document.close()

		newWin.focus() //brings window to top
	}	
}
