//left trim
function ltrim( s ){return s.replace( /^\s*/, "" );}
//right trim
function rtrim( s ){return s.replace( /\s*$/, "" );}
//trim left & right
function trim( s ){return rtrim(ltrim(s));}
//is null or not
function isNull( s ){return (trim(s).length<1);}
//check Form
function checkForm(obj)
{
if (isNull(obj.q.value))
{
obj.q.value = "";
obj.q.focus();
return false;
}
else
{
var q = trim(obj.q.value);
obj.q.value = q;
}
}

document.writeln("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"34\">");
document.writeln("    <tbody>");
document.writeln("        <tr>");
document.writeln(" <form method=\"get\" action=\"\/jsearch\/index.jsp\" onSubmit=\"return(checkForm(this));\" name=\"qForm\">");
document.writeln("");
document.writeln("  <td valign=\"middle\" align=\"right\" style=\"line-height: 17px; padding-right: 4px\">");
document.writeln("<INPUT type=hidden value=\"result\" name=\"pagemode\"\/><INPUT type=hidden value=\"1\" name=\"appid\"\/><INPUT type=hidden value=\"1\" name=\"style\"\/><INPUT type=hidden value=\"o\" name=\"ck\"\/>");
document.writeln(" ");
document.writeln("<input type=\"hidden\" id=\"pos\" name=\"pos\" value=\"title,content\">");
document.writeln("<input name=\"q\" type=\"text\" style=\"height:16px; line-height:16px; width:120px;\" ><\/td>");
document.writeln("                <td valign=\"middle\" width=\"50\" nowrap=\"nowrap\" align=\"center\" style=\"line-height: 19px\">");
document.writeln("<a href=\"#\" style=\"font-size:12px; color:#FFFFFF;\" onClick=\"submit();\"  >搜索<\/a>");
document.writeln("");
document.writeln("<\/td><td width=\"60\" align=\"center\" valign=\"middle\">");
document.writeln("  <a target=\"_blank\" href=\"\/jsearch\/index.jsp?pagemode=advsearch&appid=1&style=1\" style=\"font-size:12px; color:#FFFFFF;\">高级检索<\/a>");
document.writeln("  <\/td>");
document.writeln("          <\/form>");
document.writeln("        <\/tr>");
document.writeln("    <\/tbody>");
document.writeln("<\/table>");
