var informa

//Teodori Giancarlo 15/11/03
//modifica per la gestione della finestra eventualmente già aperta

function login(){
	if(informa){
		if (!informa.closed)
		{
			informa.close()
		}
	}
	openInforma()
}

function openInforma(){

	userid = eval(document.forms[0].elements['UserId'])
	password = eval(document.forms[0].elements['Password'])
	if (userid.value.length==0) {
		alert("User id necessaria")
		userid.focus()
		return
	}
	if (password.value.length==0) {
		alert("Password necessaria")
		password.focus()
		return
	}
	width = window.screen.width
	height = window.screen.height
	//informa = window.open("./direct_login.asp?userid=" + userid.value + "&password=" + password.value ,"informa","status=yes,location=no,toolbar=no,menubar=no,width=" + (width-10) + ",height=" + (height-75) )
	informa = window.open("" ,"informa","status=yes,location=no,toolbar=no,menubar=no,width=" + (width-10) + ",height=" + (height-75) )
	informa.moveTo(0,0)
	informa.focus()
	document.forms[0].submit()
}
