function checkpic(this_form)
{	
	var fso,f; 
	if (this_form.upload_file.value.length > 0){
		var filesize = 1;  
		try {
			fso=new ActiveXObject("Scripting.FileSystemObject");  
   			f = fso.GetFile(this_form.upload_file.value); filesize = f.size;
		} catch (e1) {}
		if (filesize >200000 || filesize == 0) {
			_error_msg_show("文件不能为空，并且小于200K");
			return false;
		}
	}
	return true;
}
function checkForm(this_form){
	
	if ((this_form.answer.value == '') || (this_form.answer.value.length > 10000)) {
		_error_msg_show("回答的内容长度必须为1-1000个汉字！");
        this_form.answer.focus();
        return false;
	}
  	if (this_form.referto.value.length > 60) {
		_error_msg_show("对不起，参考文献内容长度不能大于30个汉字！");
        this_form.referto.focus();
        return false;
    }
	TwindowMask.show(25);
	return true;
	/*if (checkpic(this_form))
	{
		if (this_form.upload_file.value.length > 0) showSending();
		return true;
	}
	else
	{
		return false;
	}*/
}
function showSending() 
{
	document.getElementById("sending").style.visibility="visible";
	document.getElementById("cover").style.visibility="visible";
}

function on(tdbg)
{
	tdbg.style.background="#fff17d";
}

function off(tdbg)
{
	tdbg.style.background="#EFF7FE";
}

function checkLogin()
{
if (document.login.U_Loginname.value=="")
{
_error_msg_show("会员名不能为空，请输入会员名！");
document.login.U_Loginname.focus();
return false;
}
if (document.login.U_Pass.value=="")
{
_error_msg_show("密码不能为空，请输入密码！");
document.login.U_Pass.focus();
return false;
}
return true;
}