        function SendForm()
        {
                with(document.forms[0])
                {
                        var nr = document.all.searchword.value;
                        nr = nr.replace(/[\r\n]/g, "");
                        if(nr == '')
                                {
                                        alert('請輸入檢索內容！');
                                        document.all.searchword.focus();
                                        return false;
                                }
					  var   radiovalue   =   document.getElementsByName("channelid");   
					  for(i=0;i<radiovalue.length;i++)   
					  {   
					  if(radiovalue[i].checked)   
						  radiovalues =radiovalue[i].value;   
					  } 
				      var URL="http://103.249.53.35/gate/big5/search.chinataiwan.org/was40/search?channelid=" + radiovalues + "&searchword=" + encodeURIComponent(document.getElementById("searchword").value) ;
				     document.searchform.action=URL;
                     return submit();
                }
        }  
    // 快捷提交
    function quickpost(){
                if(document.all){
                        if(window.event.keyCode == 13)
                                document.all.Submit.click();
                }
    }


document.write("<style type=\"text/css\">form,input{padding:0;margin:0;font-size:12px;}</style>");
document.write("<form method=\"post\" action=\"\" name=\"searchform\" style=\"font-size:12px;\">");
document.write("<input name=\"searchword\" type=\"text\" size=\"15\" id=\"searchword\"  onkeydown=\"quickpost();\" />");
document.write("&nbsp;&nbsp;");
document.write("<input type=\"radio\" name=\"channelid\" value=\"4544\" checked />&nbsp;新聞&nbsp;");
document.write("<input type=\"radio\" name=\"channelid\" value=\"30639\" />&nbsp;圖片&nbsp;");
document.write("<input type=\"radio\" name=\"channelid\" value=\"7705\" />&nbsp;資訊");
document.write("&nbsp;<input type=\"button\"  onclick=\"SendForm();\" name=\"Submit\" id=\"Submit\" value=\" 搜索 \" />");
document.write(" </form>");
