function openAlbumImage(url)
{
	offx=40
	offy=100

	l=(screen.width-650-offx)/2
	t=(screen.height-500-offy)/2
	
	var a
	newWindow = window.open("popup_albumimage.php?url="+url, "_blank", "toolbar=no,menubar=no,scrollbars=yes,resizable=yes,status=no,location=no,directories=no,copyhistory=no,height=500,width=600,top="+t+",left="+l)
}

function openLibroDownload()
{
	l=(screen.width-550)/2
	t=(screen.height-480)/2;
	newWindow = window.open("sezioneLibro.asp", "_blank", "toolbar=no,menubar=no,scrollbars=yes,resizable=yes,status=no,location=no,directories=no,copyhistory=no,height=500,width=600,top="+t+",left="+l)
}

function openTesti(url)
{
	newWindow = window.open(url, "_blank", "toolbar=no,menubar=no,scrollbars=yes,resizable=yes,status=no,location=no,directories=no,copyhistory=no")

}

function DisplayMail(Server, Login, Display){
	if ((Display.length == 0) || (Display.indexOf('@')+1)) {
	document.write("<a href=" + "'mai" + "lto:" + Login + "@" + Server + "'>" + Login + "@" + Server + "</a>"); }
	else {
	document.write("<a href=" + "'mai" + "lto:" + Login + "@" + Server + "'>" + Display + "</a>"); }
}

function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
   var obj = document.layers ? document.layers[szDivID] :
   document.getElementById ?  document.getElementById(szDivID).style :
   document.all[szDivID].style;
   obj.visibility = document.layers ? (iState ? "show" : "hide") :
   (iState ? "visible" : "hidden");
}

function GoToLink(combo) { 
	
	if (combo.options[combo.selectedIndex].value!="null")
		window.open(combo.options[combo.selectedIndex].value,"") 
} 

function openWindow(file,w,h){
	offx=40
	offy=100

	l=(screen.width-w-offx)/1.1
	t=(screen.height-h-offy)/2
	
	var a
	a = window.open(file, "_blank", "toolbar=no,menubar=no,scrollbars=yes,resizable=yes,status=no,location=no,directories=no,copyhistory=no,height="+h+",width="+w+",left="+l+",top="+t)
}
