function langSwitch(lang) {
	if (lang=='english') {
		if (location.href.toString().search('tc') != -1) {
			goPath=location.href.replace("tc", "english");
		}else{
			goPath=location.href.replace("sc", "english");
		}
	}

	if (lang=='tc') {
		if (location.href.toString().search('english') != -1) {
			goPath=location.href.replace("english", "tc");
		}else{
			goPath=location.href.replace("sc", "tc");
		}
	}

	if (lang=='sc') {
		if (location.href.toString().search('english') != -1) {
			goPath=location.href.replace("english", "sc");
		}else{
			goPath=location.href.replace("tc", "sc");
		}
	}
	if (lang=='txttc') {
			goPath=location.href.replace("tc", "txttc");
	}
	document.location=goPath;
}
function submit_search_form() {
	window.document.search.submit();
}

document.write("<table width=\"615\" border=\"0\" height=\"87\" cellpadding=\"0\" cellspacing=\"0\" background=\"tcimages/bkgdtexture.gif\">");
document.write("  <form name=search action='http://search.gov.hk/search.html' method=get target=blank>");
document.write("    <input type=hidden name=tpl_id value=stdsearch>");
document.write("    <input type=hidden name=ui_lang value=zh-hk>");
document.write("    <input type=hidden name=ui_charset value=big5>");
document.write("    <input type=hidden name=gp0 value=grs_home>");
document.write("    <input type=hidden name=gp1 value=grs_home>");
document.write("    <input type=hidden name=web value=this>");
document.write("    <tr align=\"left\" valign=\"top\"> ");
document.write("      <td height=\"65\" colspan=\"6\" class=\"sidebar\" background=\"tcimages/bkgdtexture.gif\"><a href=../index.htm><img src=\"tcimages/branding.gif\" alt=\"香港特別行政區政府 - 政府檔案處\" width=\"500\" height=\"60\" border=\"0\"></a> ");
document.write("      </td>");
document.write("      <td height=\"65\" background=\"tcimages/bkgdtexture.gif\" colspan=\"4\" valign=\"bottom\"> ");
document.write("        <div align=\"right\"><a href=\"http://www.brandhk.gov.hk/brandhk/\" target=\"_blank\"><img src=\"tcimages/Brandhk.gif\" alt=\"香港品牌形象 - 亞洲國際都會\" name=\"brandhk\" width=\"190\" height=\"60\" border=\"0\"></a></div>");
document.write("      </td>");
document.write("    </tr>");
document.write("    <tr align=\"left\" valign=\"top\"> ");
document.write("      <td height=\"20\" width=\"171\" background=\"tcimages/bkgdtexture.gif\" valign=\"bottom\"><a href=\"http://www.gov.hk/tc/residents/\" target=\"_blank\" onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar1','','tcimages/mainbar1_f2.gif',1)\" ><img name=\"mainbar1\" src=\"tcimages/mainbar1.gif\" width=\"171\" height=\"20\" border=\"0\" alt=\"GovHK 香港政府一站通\"></a></td>");
document.write("      <td align=\"left\" valign=\"bottom\" height=\"20\" width=\"77\" background=\"tcimages/bkgdtexture.gif\"><a href=javascript:langSwitch(\"txttc\") onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar2','','tcimages/mainbar2_f2.gif',1)\" ><img name=\"mainbar2\" src=\"tcimages/mainbar2.gif\" width=\"77\" height=\"20\" border=\"0\" alt=\"繁體純文字\"></a></td>");
document.write("      <td align=\"left\" valign=\"bottom\" height=\"20\" width=\"49\" background=\"tcimages/bkgdtexture.gif\"><a href=javascript:langSwitch(\"sc\") onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar3','','tcimages/mainbar3_f2.gif',1)\" ><img name=\"mainbar3\" src=\"tcimages/mainbar3.gif\" width=\"49\" height=\"20\" border=\"0\" alt=\"簡體版\"></a></td>");
document.write("      <td align=\"left\" valign=\"bottom\" height=\"20\" width=\"56\" background=\"tcimages/bkgdtexture.gif\"><a href=javascript:langSwitch(\"english\") onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar4','','tcimages/mainbar4_f2.gif',1)\" ><img name=\"mainbar4\" src=\"tcimages/mainbar4.gif\" width=\"56\" height=\"20\" border=\"0\" alt=\"English\"></a></td>");
document.write("      <td height=\"20\" width=\"172\" background=\"tcimages/bkgdtexture.gif\" valign=\"bottom\"><a href=\"#\" onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar5','','tcimages/mainbar5_f2.gif',1)\" ><img name=\"mainbar5\" src=\"tcimages/mainbar5.gif\" width=\"171\" height=\"20\" border=\"0\"></a></td>");
document.write("      <td height=\"20\" width=\"36\" background=\"tcimages/bkgdtexture.gif\" valign=\"bottom\"><a href=\"javascript:submit_search_form()\" onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar6','','tcimages/mainbar6_f2.gif',1)\" ><img name=\"mainbar6\" src=\"tcimages/mainbar6.gif\" width=\"36\" height=\"20\" border=\"0\" alt=\"搜尋\"></a></td>");
document.write("      <td height=\"20\" valign=\"bottom\" background=\"tcimages/bkgdtexture.gif\" width=\"83\"> ");
document.write("        <div align=\"center\"> ");
document.write("          <input class=\"search\" type=\"text\" name=\"query\" size=\"10\">");
document.write("        </div>");
document.write("      </td>");
document.write("      <td height=\"20\" width=\"22\" background=\"tcimages/bkgdtexture.gif\" valign=\"bottom\"><a href=\"javascript:submit_search_form()\" onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar8','','tcimages/mainbar8_f2.gif',1)\" ><img name=\"mainbar8\" src=\"tcimages/mainbar8.gif\" width=\"22\" height=\"20\" border=\"0\" alt=\"搜尋\"></a></td>");
document.write("      <td height=\"20\" width=\"67\" background=\"tcimages/bkgdtexture.gif\" valign=\"bottom\"><a href=\"sitemap.htm\" onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar9','','tcimages/mainbar9_f2.gif',1)\" ><img name=\"mainbar9\" src=\"tcimages/mainbar9.gif\" width=\"67\" height=\"20\" border=\"0\" alt=\"網頁指南\"></a></td>");
document.write("      <td height=\"20\" width=\"29\" background=\"tcimages/bkgdtexture.gif\" valign=\"bottom\"><a href=\"contactus.htm\" onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar10','','tcimages/mainbar10_f2.gif',1)\" ><img name=\"mainbar10\" src=\"tcimages/mainbar10.gif\" width=\"29\" height=\"20\" border=\"0\" alt=\"聯絡我們\"></a></td>");
document.write("    </tr>");
document.write("    <tr align=\"left\" valign=\"top\" bgcolor=\"#BB3333\"> ");
document.write("      <td height=\"2\" colspan=\"10\"><img src=\"tcimages/reddot.gif\" width=\"760\" height=\"2\"></td>");
document.write("    </tr>");
document.write("  </form>");
document.write("</table> ");

