//
function resetText(id, defaultText, errorText, color)
{
	var textColor = "#666666";
	if (color != null && color != "undefined") 
		textColor = color;
	document.getElementById(id).style.color = textColor;
	var value = jQuery.trim(document.getElementById(id).value);
	errorText = jQuery("#"+id).attr("error");
	if (value == defaultText || value == errorText || value == "Valore errato")
		document.getElementById(id).value = "";
	if (value == "")
		document.getElementById(id).value = defaultText;
}

function checkPasswordLogin()
{
	if (jQuery.trim(jQuery("#password").val()) == '')
		jQuery(".password").children("span").show();
}

function resetLoginField()
{
	jQuery("#username").val(jQuery("#username").attr('default'));
	jQuery("#password").val('');
	jQuery("#box_login .password").children("span").show();
	jQuery("#box_login .password").children("span").html(jQuery("#password").attr('default'));	
}

