<!-- Hiding

/*

Accesso Controllato

*/

function goToURL() {
  var i, args=goToURL.arguments; document.returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}



function passWord() {
   var tentativi = 0;
   var username = new String();
   var password = new String(); // = prompt('Inserire la Password');

   username = prompt('Inserire nome utente','Utente');
   while (true) {
      	if (!username) {
      		goToURL('parent','error.htm');
      		break;
      	}
      	if (username.toLowerCase()=="csua") {
		/*
		Controllo password per aventi sempre diritto
		*/
		password = prompt('Inserire la Password');
      		var tentativi2 = 0;
      		var esci = false;
      		while (true) {
      			      	if (!password) {
      		goToURL('parent','error.htm');
      		break;
      	}

      			if ((password.toLowerCase()=="5t3y")||(password.toLowerCase()=="6a2t")||(password.toLowerCase()=="7z5d")) {
         			alert('La sua password è corretta');
         			esci = true;
         			break;
         			
      			} else {
     				password = prompt('Errore. Inserire Password:','Password');
			}
			tentativi += 1;
			if (tentativi2 == 3) {
				window.location.href="error.htm";
				esci = true;
				break;
			}
		}
		if ( esci == true )
		{
			break;
		}
   	} else {
     		username = prompt('Errore. Inserire nome Utente:','Utente');
	}
	tentativi += 1;
	
   	if (tentativi > 3) 
   	{	goToURL('parent','error.htm');
   		break;
   	}
   } //end of while
   /*
   goToURL('parent','error.htm');
   */
   
   
   
   /*
   return " ";
   */
}

passWord();

// Done Hiding -->
