
function check_cambio_password(){
	var password = document.getElementById('password').value;
	var password2 = document.getElementById('password2').value;
	
	if(password != password2){
		alert(L_opz_pass1);
		return false
	}
	
	if(password == '') return true;
	
	if(password.indexOf(' ') >= 0){
		alert(L_opz_pass2);
		return false;
	}
	
	if(password.length < 5){
		alert(L_opz_pass3);
		return false;
	}
	
	return true;
}

function check_opzioni_form(){
	idForm = 'opzioni';
	
	var form = document.getElementById(idForm);
	
	if(!check_cambio_password()) 	return false;
	
	form.submit();
}
