
function leggi() {
			
		var ni = document.getElementById('selezione');
				
    	var newdiv = document.createElement("div");
    	
		newdiv.setAttribute("style","height:100px; width:160px; background-color:#e6eaf1;padding:5px; margin-left:20px; border:4px solid Orange");
		newdiv.setAttribute("id","nomediv");
				
		if(ni.hasChildNodes()) {}
		else {
		
		
        var inputUser = document.createElement("INPUT");
		inputUser.setAttribute("type","text");
		inputUser.setAttribute("name","user");
		var lab1 = document.createElement("label");
		lab1.innerHTML = "username";	

		var inputpass = document.createElement("INPUT");
		inputpass.setAttribute("type","password");
		inputpass.setAttribute("name","password");
		var lab2 = document.createElement("label");
		lab2.innerHTML = "password";

		ni.appendChild(newdiv);
		newdiv.appendChild(lab1);
        newdiv.appendChild(inputUser);
		newdiv.appendChild(document.createElement('BR'));
	
		newdiv.appendChild(lab2);
		newdiv.appendChild(inputpass);
		
		
		var newBut = document.createElement("INPUT");
		newBut.setAttribute("type","submit");
		newBut.setAttribute("value","invia");
		newdiv.appendChild(newBut);
		exit();
		
		 }
		 
		ni.removeChild(ni.childNodes[0]);
}
