function login(utente,segreto)
{
	var codiceCarattere1 = utente.charCodeAt(0);
	var codiceCarattereUltimo= utente.charCodeAt(utente.length-1);
	var divisore = codiceCarattere1 *  codiceCarattereUltimo + utente.length;
	divisore+=segreto.charCodeAt(0);
	var modulo = 6121938%divisore;
	var stringamodulo = modulo.toString();
	var consenso=segreto.indexOf(stringamodulo);
	switch(consenso)
{
		case -1 :
		window.alert("Access denied");
		break;
		default :
		//window.alert("Accesso autorizzato");
		window.location =("intranet.html");
}
}
