/** * :folding=explicit:collapseFolds=1: */ //{{{ showAuthForm() { function showAuthForm() { var tmp = $_j('div.pop-up'); if (tmp.css('display') == 'none') { tmp.css('display', 'block'); $_j('input[name="auth_login"]').attr('disabled', false); $_j('input[name="auth_password"]').attr('disabled', false); $_j('input[name="auth_save"]').attr('disabled', false); } return false; } //}}} //{{{ closeAuthForm() function closeAuthForm() { $_j('div.pop-up').css('display', 'none'); $_j('input[name="auth_login"]').attr('disabled', true); $_j('input[name="auth_password"]').attr('disabled', true); $_j('input[name="auth_save"]').attr('disabled', true); return false; } //}}} //{{{ checkFieldText() //{{{ in_array() function in_array(needle, haystack, strict) { var found = false, key, strict = !!strict; for (key in haystack) { if ((strict && haystack[key] === needle) || (!strict && haystack[key] == needle)) { found = true; break; } } return found; } //}}} function checkFieldText(elem, svalidator, smessage) { if (elem.value.match(svalidator)) return true; alert(smessage); elem.focus(); return false; } //}}}