function onoffpsw(idpsw) {
  	pswfield = document.getElementById(idpsw);
	cnfpswfield = document.getElementById(idpsw + '_conferma');
	pswfield.disabled = !pswfield.disabled;
	cnfpswfield.disabled = !cnfpswfield.disabled;
}

function generatepsw(idpsw) {
  onoffpsw(idpsw);
}

function refreshform(form, exec, execval) {
	exec.value = execval;
  	form.submit();
}

// Tooltips
var ToolTips = {
	tips: null,

	init: function() {
		this.tips = new Tips('.tooltips', {showDelay: '1', hideDelay: '1'});
		
		this.tips.addEvent('show', function(tip){
		    tip.fade('show');
		});

		this.tips.addEvent('hide', function(tip){
		    tip.fade('hide');
		});

	}
}

// Event on domready
addEvent("domready", function() {
	ToolTips.init();	
});

