function update_div_forregister() {
	document.all.popDiv.style.height = "540px";
	document.all.popDiv.style.width = "492px";
	$("popIframe").src = "/register/register.jsp";
	document.all.shadowDiv.style.display = "block";
	document.all.popDiv.style.display = "block";
}
function update_div_forlogin() {
	document.all.popDiv.style.height = "441px";
	document.all.popDiv.style.width = "492px";
	$("popIframe").src = "/login/login.jsp";
	document.all.shadowDiv.style.display = "block";
	document.all.popDiv.style.display = "block";
}
function close_the_div() {
	document.all.shadowDiv.style.display = "none";
	document.all.popDiv.style.display = "none";
}
function close_the_div_ask() {
	document.all.shadowDiv.style.display = "none";
	document.all.popDiv_3.style.display = "none";
}
function askquestion() {
	document.all.popDiv_3.style.height = "250px";
	document.all.shadowDiv.style.display = "block";
	document.all.popDiv_3.style.display = "block";
}
function answerquestion() {
	document.all.shadowDiv.style.display = "block";
	document.all.popDiv_3.style.display = "block";
}
function askNextSubmit() {
	var regx = /(^\s*)|(\s*$)/g;
    userask.question.value = userask.question.value.replace(regx, "");
    if (userask.question.value == null || userask.question.value == "") {
		alert("没有输入问题哦~~");
		userask.question.focus();
		return false;
	}
	if (userask.question.value == "\u6bcd\u591c\u53c9" || userask.question.value == "\u8272\u60c5" || userask.question.value == "\u9ec4\u7247" || userask.question.value == "\u5973\u4f18" || userask.question.value == "\u72d7\u5c4e") {
		alert("\u4e3a\u4e86\u7ed9\u5927\u5bb6\u8425\u9020\u4e00\u7247\u51c0\u571f\uff0c\u672c\u7ad9\u4e0d\u63d0\u4f9b\u6b64\u5173\u952e\u5b57\u641c\u7d22\uff01\n \n         \u8bf7\u4f7f\u7528\u5065\u5eb7\u3001\u6587\u660e\u7528\u8bed\uff01");
		userask.question.focus();
		return false;
	}
	document.userask.action = "/searchsim.do?question=" + escape(userask.question.value);
	document.userask.submit();
}
function getWindow() {
	window.open("/index.jsp", "_self");
}
function checkform() {
    var regx = /(^\s*)|(\s*$)/g;
    searchform.question.value.value = searchform.question.value.replace(regx, "");
    if (searchform.question.value == null || searchform.question.value == "") {
		alert("没有输入问题哦~~");
		searchform.question.focus();
		return false;
	}
	if (searchform.question.value == "\u6bcd\u591c\u53c9" || searchform.question.value == "\u8272\u60c5" || searchform.question.value == "\u9ec4\u7247" || searchform.question.value == "\u5973\u4f18" || searchform.question.value == "\u72d7\u5c4e") {
		alert("\u4e3a\u4e86\u7ed9\u5927\u5bb6\u8425\u9020\u4e00\u7247\u51c0\u571f\uff0c\u672c\u7ad9\u4e0d\u63d0\u4f9b\u6b64\u5173\u952e\u5b57\u641c\u7d22\uff01\n \n         \u8bf7\u4f7f\u7528\u5065\u5eb7\u3001\u6587\u660e\u7528\u8bed\uff01");
		searchform.question.focus();
		return false;
	}
	searchform.action="/search.do";
	searchform.submit();
}
function loadurl(){
     var name = document.getElementById('username').value;
     if(name!='nouser'){
		 var url="/user/userLogout.action?username="+name;  
	     url=encodeURI(url); 
	     url=encodeURI(url); 
	     document.getElementById('bye').href = url;
     }
}

