// Descrição: Funções de controle do Menu Intranet > bcoelho

////////////////////////////////////////////////////////////////////////////////////////
//
//	Eventos
//
////////////////////////////////////////////////////////////////////////////////////////
<!-- Fx para ocultar DIV sem ocupar espaço na tela -->
function camadaOculta( sId ) {
       var sDiv = document.getElementById( sId );
       if( sDiv.style.display == "hidden" ) {
         sDiv.style.display = "block";
       } else {
         sDiv.style.display = "none";
       }
}

<!-- Fx para o evento do Menu Rolagem -->
function MM_effectSlide(targetElement, duration, from, to, toggle)
{
	Spry.Effect.DoSlide(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}

<!-- Fx para o evento do Menu Alfa -->
function MM_effectAppearFade(targetElement, duration, from, to, toggle)
{
	Spry.Effect.DoFade(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}

////////////////////////////////////////////////////////////////////////////////////////
//
//	Validação
//
////////////////////////////////////////////////////////////////////////////////////////

<!--Trata campos de Senha para apresentar o Texto e ao clicar ele vira um Password -->
function campoSenha(campo,destino,name) 
{

	//alert(name);
	//alert(destino);
	
	if (campo.type == "text") 
	{	 
	  document.getElementById(destino).innerHTML = '<input type="password" id="'+ name +'" name="'+ name +'" value="" class="inputMenuIntranet" onBlur="if (this.value==\'\') campoSenha(this,\''+destino+'\', this.name)" />';
	  document.getElementById(document.getElementById(name).id).focus();
	  document.getElementById(document.getElementById(name).id).focus();
	}
	else 
	{	 
	  document.getElementById(destino).innerHTML = '<input type="text"  id="'+ name +'" name="'+ name +'" value="Senha:" class="inputMenuIntranet" onFocus="campoSenha(this,\''+destino+'\', this.name)"/>';
	  //document.getElementById(document.getElementById(name).id).focus();
	  //document.getElementById(document.getElementById(name).id).focus();
	}
}