function login(){var param={"currentUser.userId":userName.value,"currentUser.passwd":MD5.hex_md5(userName.value+"|"+password.value)};if(document.getElementById("checkCodeDiv").style.display=="inline-block"){if(checkCode.value==""){alert("请输入验证码");return;} param["currentUser.memo"]=checkCode.value;} dojo.io.bind({url:"userLoginAction/login.action",mimetype:"text/html",timeoutSeconds:3000,method:"POST",content:param,load:function(type,data,evt){var errormsg=data.indexOf("errorMsg:");if(errormsg>=0){document.getElementById("loginBar").src="images/newMainPage/loginBarChkCode.png";document.getElementById("checkCodeDiv").style.display="inline-block";document.getElementById("checkCodeImg").src="common/regCode.jsp?"+new Date().getTime();alert(data.split("errorMsg:")[1]);} else{location.href="pages/application1.jsp";}},error:function(type,error){alert(error.message);},timeout:function(type){alert("请求超时!");}});} function getUserCnName(){dojo.io.bind({url:"pages/awb/getUserCnName.jsp",mimetype:"text/html",timeoutSeconds:3000,method:"POST",content:{},load:function(type,data,evt){dojo.byId("userCnName").innerHTML=data;},error:function(type,error){alert(error.message);},timeout:function(type){alert("请求超时!");}});}