/*
FUN????ES B??SICAS
*/


$(document).ready(function() {

	//LOGIN
	$('#j_username').focus(function(){				   
		$(this).css({'background-position':'0px -17px'});
	});
	$('#j_username').blur(function(){
		if($(this).val() == "")
		$(this).css({'background-position':'0px 0px'});
	});
	
	$('#j_password').focus(function(){
		$(this).css({'background-position':'0px -17px'});
	});
	$('#j_password').blur(function(){
		if($(this).val() == "")
		$(this).css({'background-position':'0px 0px'});
	});
	
	
	/*$('#bt_submit').click(function(){
		
		var estado = $('#boxLogin').css("display");

		if( estado == 'none')
		{	  
			//$('#boxLogin').css({'display':'block'});
		}else{
			$('#j_username').val("").css({'background-position':'0px 0px'});
			$('#j_password').val("").css({'background-position':'0px 0px'});
			//$('#boxLogin').css({'display':'none'});
		}
	});*/
	
})



//SHOW ----------------------------------------------------------------------
function show (layer_ref)
{
	state = '';
	if (document.all)
	{ //IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + layer_ref + ".style.display = state");
	}
	if (document.layers)
	{ //IS NETSCAPE 4 or below
		document.layers[layer_ref].display = state;
	}
	if (document.getElementById && !document.all)
	{
		maxwell_smart = document.getElementById(layer_ref);
		maxwell_smart.style.display = state;
	}	
}
//HIDE ----------------------------------------------------------------------
function hide (layer_ref)
{
	state = 'none';
	if (document.all)
	{ //IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + layer_ref + ".style.display = state");
	}
	if (document.layers)
	{ //IS NETSCAPE 4 or below
		document.layers[layer_ref].display = state;
	}
	if (document.getElementById && !document.all)
	{
		maxwell_smart = document.getElementById(layer_ref);
		maxwell_smart.style.display = state;
	}	
}
//TOGGLE ----------------------------------------------------------------------
function toggle (layer_ref)
{
	if (document.all)
	{ //IS IE 4 or 5 (or 6 beta)
		var qual = eval( "document.all." + layer_ref + ".style.display");
		if(qual == ''){state = 'none';}else{state = '';}		
		eval( "document.all." + layer_ref + ".style.display = state");
	}
	if (document.layers)
	{ //IS NETSCAPE 4 or below
		var qual = document.layers[layer_ref].display;
		if(qual == ''){state = 'none';}else{state = '';}
		document.layers[layer_ref].display = state;
	}
	if (document.getElementById && !document.all)
	{
		maxwell_smart = document.getElementById(layer_ref);
		if(maxwell_smart.style.display == ''){state = 'none';}else{state = '';}
		maxwell_smart.style.display = state;
	}	
}


//GENERIC INPUT MSG ----------------------------------------------------------------------
/*function inputFocus(id, msg){
	var n=document.getElementById(id);
	if(n.value == msg){
		n.value='';
	}
}
function inputBlur(id, msg){
	var n=document.getElementById(id);
	if(n.value == ''){
		n.value = msg;
	}
}
*/





