;(function(){
var str = 'аеёиоуыэюя'
check = function(letter){
if(str.indexOf(letter) > -1) return "vowel"
return "consonant"
}
}())
checkForm = function(){
var warn = "введите пароль в русской раскладке"
var pass = prompt(warn)
if(/[^а-яё]/i.test(pass)) {
alert(warn)
return checkForm()
}
pass = pass.split("")
return (pass.filter(function(letter) {return check(letter) === "vowel"}).length - 3) === pass.filter(function(letter) {return check(letter) === "consonant"}).length
}
alert(checkForm())