function setFocus(){if(!$F("imapuser")){$("imapuser").focus()}else{$("pass").focus()}}function imp_reload(){window.top.document.location=autologin_url+$F("server_key")}
function submit_login() {
	if(show_list&&$F("server").startsWith("_")){
		return false
	}
	if(!$F("imapuser")){
		alert(IMP.text.login_username);
		$("imapuser").focus();
		return false
	} else{
		if(!$F("pass")){
			alert(IMP.text.login_password);
			$("pass").focus();
			return false
		}else{
			$("loginButton").disable();
			if(ie_clientcaps){
				try {
					$("ie_version").setValue(objCCaps.getComponentVersion("{89820200-ECBD-11CF-8B85-00AA005B4383}","componentid"))
				} catch(a){
				}
			}
			document.imp_login.imapuser.value = document.imp_login.imapuser.value.toLowerCase();
			$("imp_login").submit();
			return true
		}
	}
}
function selectLang(){if(!$F("imapuser")&&!$F("pass")){var a={new_lang:$F("new_lang")};if(lang_url!==null){a.url=lang_url}self.location="login.php?"+Object.toQueryString(a)}}function updatePort(){var a=$F("protocol");if(protocols[a]){$("port").setValue(protocols[a])}}function serverChangeHandler(){if(change_smtphost){$("smtphost").setValue($F("server"))}}function removeHash(a){return(Object.isString(a)&&a.startsWith("#"))?a.substring(1):a}document.observe("dom:loaded",function(){if(imp_auth){if(parent.frames.horde_main){if(nomenu){parent.location=self.location}else{document.imp_login.target="_parent"}}}if(location.hash){$("anchor_string").setValue(removeHash(location.hash))}});

