var y=0; 
var campoCheio=null; 

  function converter(n) {

if(n=='A') {n='a'}

if(n=='B') {n='b'}

if(n=='C' || n=='Ç' || n=='ç' ) {n='c'}

if(n=='D') {n='d'}

if(n=='E') {n='e'}

if(n=='F') {n='f'}

if(n=='G') {n='g'}

if(n=='H') {n='h'}

if(n=='I') {n='i'} 

if(n=='J') {n='j'} 

if(n=='K') {n='k'} 

if(n=='L') {n='l'}

if(n=='M') {n='m'}

if(n=='N') {n='n'}

if(n=='O' || n=='Ô' || n=='ô') {n='o'}

if(n=='P') {n='p'}

if(n=='Q') {n='q'}

if(n=='R') {n='r'}

if(n=='S') {n='s'}

if(n=='T') {n='t'}

if(n=='U') {n='u'}

if(n=='V') {n='v'}

if(n=='X') {n='x'}

if(n=='Y') {n='y'}

if(n=='Z') {n='z'}

if(n==' ') {n=''}

if(n=='@' || n=='!' || n=='#' || n=='$' || n=='%' || n=='¨' || n=='*' || n=='(' || n==')' || n=='-' || n=='_' || n=='+' || n=='=' || n=='&' || n=='¨¨' || n=='/'){n=''}

else n=n

return n

        }

	//converte os valores DEPOIS que estes são digitados,note a chamada de converter()

	function chgNick() {

	var output=''

	var enter=document.cadastro_loja.f_nome_prof.value;

	if(enter!='') {      // este laço só executa a conversão se o primeiro campo estiver preenchido

		  campoCheio=true;

		  for(var i=0;i<enter.length+1;i++) {output+=converter(enter.charAt(i));}

		  saida1=output

				   }


				  }


	function mostrarNick() { // mostra novo nick em forma de substrings,letra a letra

	   if(campoCheio) {

			document.cadastro_loja.f_login.value=saida1.substring(0,y);

			y++;

			tempo=setTimeout('mostrarNick()',1);

			if(y==saida1.length+1) {clearTimeout(tempo)}

				   }

			

						 }

	function Cria_Login() { //função que agrupa todas as outras,é chamada pelo botão Input

			chgNick();

			if(campoCheio) {mostrarNick()};

							}
