function validate_required(field,alerttxt){ with (field){ if (value==null||value=="") {alert(alerttxt);return false;} else {return true;} } } function validate(thisform){ with (thisform){ if (validate_required(username,"登录用户名不能为空")==false){ username.focus();return false; } if (validate_required(password,"密码不能为空")==false){ password.focus();return false; } } } function initTopBarBox(){ var html=""; var setcookie="javascript:$.cookie('defaultBrowser','mobile',{expires:999,path:'/',domain:'.wenxuecity.com'})"; html+=""; html+="
"; html+="
"; html+="
"; html+=" "; html+=" "; html+=" "; html+=" "; html+="
"; html+="
"; html+="
"; var toploginbox = document.getElementById("toploginbox"); if( typeof(toploginbox)!="undefined" && toploginbox!=null) toploginbox.innerHTML = html; } initTopBarBox();