function search_home()
{
	document.write('<table width="575" border="0" cellspacing="0" cellpadding="0">'+'\n');
	document.write('<tr><td width="13">&nbsp;</td>'+'\n');
	document.write('<form method="post" action="http://index.p5w.net:7777/english/search.wct" name="SearchForm" onsubmit="return KeySearch_onsubmit()">'+"\n") ;		
        document.write('<td align="right" width="92"><img src="/p5w/home/english/images/enter1.gif" width="89" height="23"></td>'+'\n');
	document.write('<input type="hidden" name="ChannelID" value="8085">'+"\n");        
        document.write('<td width="100"> <input type="text" name="SearchWord" size="13" onFocus="search_tipkey()" value=""></td>'+'\n');
        document.write('<td width="120"> '+'\n');
        document.write('<select name="SearchType">'+'\n');
        document.write('      <option value="0">--------All--------</option>'+'\n');
        document.write('      <option value="135">News</option>'+'\n');
        document.write('      <option value="134">Research Report</option>'+'\n');
        document.write('      <option value="142">Stock Market</option>'+'\n');
        document.write('      <option value="157">Statistics</option>'+'\n');
        document.write('      <option value="163">Law</option>'+'\n');
        document.write('</select></td>'+'\n');
        document.write('<td><input type="image" border="0" name="imageField" src="/p5w/home/english/images/news_search.gif" width="47" height="23" alt="search"></td>'+'\n');
        document.write('</form>'+'\n');
	document.write('<form name="nb"  action="http://www.p5w.net/cgibin/search_en2.pl" method="post" >'+"\n") ;        
        document.write('<td width="125" align="center"><img src="/p5w/home/english/images/enter2.gif" width="121" height="23"></td>'+'\n');
        document.write('<td width="60" align="center"> '+'\n');
        document.write('<input type="text" name="gsdm" size="6">'+'\n');
        document.write('</td>'+'\n');
	document.write('</form>'+'\n') ;        
        document.write('</tr></table>'+'\n');
}

function search_others()
{
	document.write('<table width="191" border="0" cellspacing="0" cellpadding="2">'+'\n');
	document.write('<form method="post" action="http://index.p5w.net:7777/english/search.wct" name="SearchForm" onsubmit="return KeySearch_onsubmit()">'+"\n") ;		
        document.write('<tr> '+'\n');
        document.write('  <td width="10">&nbsp;</td>'+'\n');
        document.write('  <td width="150"><font color="#FFFFFF">Enter Keywords :</font></td>'+'\n');
        document.write('  <td width="10">&nbsp;</td>'+'\n');
        document.write('</tr>'+'\n');
        document.write('<tr>'+'\n'); 
        document.write('  <td width="10">&nbsp;</td>'+'\n');
        document.write('  <td width="150">'+'\n'); 
	document.write('<input type="hidden" name="ChannelID" value="8085">'+"\n");        
        document.write('    <input type="text" name="SearchWord" size="22" onFocus="search_tipkey()" value="">'+'\n');
        document.write('  </td>'+'\n');
        document.write('  <td width="10">&nbsp;</td>'+'\n');
        document.write('</tr>'+'\n');
        document.write('<tr> '+'\n');
        document.write('  <td width="10" height="10"></td>'+'\n');
        document.write('  <td height="10" width="150"> </td>'+'\n');
        document.write('  <td width="10" height="10"></td>'+'\n');
        document.write('</tr>'+'\n');
        document.write('<tr> <td width="10">&nbsp;</td>'+'\n');
        document.write('  <td width="150"> '+'\n');
        document.write('    <select name="SearchType">'+'\n');
        document.write('      <option value="0">--------All--------</option>'+'\n');
        document.write('      <option value="135">News</option>'+'\n');
        document.write('      <option value="134">Research Report</option>'+'\n');
        document.write('      <option value="142">Stock Market</option>'+'\n');
        document.write('      <option value="157">Statistics</option>'+'\n');
        document.write('      <option value="163">Law</option>'+'\n');
        document.write('    </select>'+'\n');
        document.write('  </td>'+'\n');
        document.write('  <td width="10">&nbsp;</td>'+'\n');
        document.write('</tr>'+'\n');
        document.write('<tr> '+'\n');
        document.write('  <td width="10" height="30">&nbsp;</td>'+'\n');
        document.write('  <td align="right" height="30" width="150">'+'\n');
        document.write('<input type="image" border="0" name="imageField" src="/p5w/home/english/images/bt_search.gif" width="51" height="18" alt="search"></td>'+'\n');
        document.write('  <td align="center" width="10" height="30">&nbsp;</td>'+'\n');
        document.write('</tr>'+'\n');
	document.write('</form>'+'\n');        
	document.write('<form name="nb"  action="http://www.p5w.net/cgibin/search_en2.pl" method="post" >'+"\n") ;
        document.write('<tr> '+'\n');
        document.write('  <td width="10" height="30">&nbsp;</td>'+'\n');
        document.write('  <td width="150" height="30"><font color="#FFFFFF">Enter Code or Symbol: '+'\n');
        document.write('    <br>'+'\n');
        document.write('    </font></td>'+'\n');
        document.write('  <td align="center" width="10" height="30">&nbsp;</td>'+'\n');
        document.write('</tr>'+'\n');
        document.write('<tr> '+'\n');
        document.write('  <td width="10" height="30">&nbsp;</td>'+'\n');
        document.write('  <td width="150" height="30"><font color="#FFFFFF"> '+'\n');
        document.write('    <input type="text" name="gsdm" size="22">'+'\n');
        document.write('    </font></td>'+'\n');
        document.write('  <td align="center" width="10" height="30">&nbsp;</td>'+'\n');
        document.write('</tr>'+'\n');
        document.write('<tr> '+'\n');
        document.write('  <td width="10" height="30">&nbsp;</td>'+'\n');
        document.write('  <td align="right" height="30" width="150"><font color="#FFFFFF"><input type="image" name="imageenglish" src="/p5w/home/english/images/bt_search.gif" width="51" height="18" alt="search" border="0"><br>'+'\n');
        document.write('    </font></td>'+'\n');
        document.write('  <td align="center" width="10" height="30">&nbsp;</td>'+'\n');
        document.write('</tr>'+'\n');
        document.write('<tr> '+'\n');
        document.write('  <td width="10" height="30">&nbsp;</td>'+'\n');
        document.write('  <td height="30" width="150"><font color="#FFFFFF">(Including: A, B, '+'\n');
        document.write('    H, Gem, <br>'+'\n');
        document.write('    Overseas listings shares) </font></td>'+'\n');
        document.write('  <td align="center" width="10" height="30">&nbsp;</td>'+'\n');
        document.write('</tr>'+'\n');
        document.write('</form>'+'\n');
      document.write('</table>'+'\n');

}

function search_tipkey()
{
	window.status='Matches on all words:(word1*word2...),Matches on any word:(word1+word2...),word1 but not word2:(word1-word2...)';
}

// Key search form submit
// 当关键字检索时被调用。将条件组合成一个查询语句的条件
// 并赋给SearchWord变量。条件不为空时返回true,否则返回false
function KeySearch_onsubmit()
{
	var searchKey = document.SearchForm.SearchWord.value;
	var typeValue = document.SearchForm.SearchType.options[document.SearchForm.SearchType.selectedIndex].value;
	if(searchKey=="")
	{
		alert("Search expression can't be EMPTY!");
		return false;
	}
	if( typeValue !="" && typeValue !="0" )
		document.SearchForm.SearchWord.value = '( rcs_subject =' + searchKey + ' OR rcs_detail =' + searchKey + ') AND rcs_scope=' + typeValue;
	else
		document.SearchForm.SearchWord.value = searchKey;
	return true;
}


