<!--
function find_path() {
	i=0;
	while (i<location.pathname.length) {
		if (location.pathname.charAt(i) == '/') {
			stroke = i;
		}
		i++;
	}
	filename = location.pathname.substring(stroke+1, location.pathname.length);
	return filename;
}

function write_table() {
	gb_path = "http://sc.lcsd.gov.hk/gb/";
	b5_path = "b5";
	en_path = "en";
	b5text_path = "textmode/b5";
	entext_path = "textmode/en";
	current_domain = "www.lcsd.gov.hk";
	entitle = "Leisure and Cultural Services Department - Art Promotion Office";
	b5title = "康樂及文化事務署, 藝 術 推 廣 辦 事 處";
	full_path = current_domain + location.pathname;
	//1: English Graphic, 2: TC Graphic, 3: SC Graphic, 4: English Text, 5: TC Text, 6:SC Text
	if (location.pathname.indexOf("textmode/b5")>0 && location.pathname.indexOf("gb")>0) {
		mode = 6;
	} else if (location.pathname.indexOf("b5")>0 && location.pathname.indexOf("gb")>0) {
		mode = 3;
	} else if (location.pathname.indexOf("textmode/b5")>0) {
		mode = 5;
	} else if (location.pathname.indexOf("b5")>0) {
		mode = 2;
	} else if (location.pathname.indexOf("textmode/en")>0) {
		mode = 4;
	} else if (location.pathname.indexOf("en")>0) {
		mode = 1;
	}
	if (mode < 4) {
		document.writeln("<table border=\"0\" width=\"770\" height=\"87\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#fffee6\" background=\"../graphics/b5/bkgdtexture.gif\">");
		document.writeln("<form name=\"search\" action=\"http://search.info.gov.hk/cgi-bin/se.cgi\" method=\"get\">");
		document.writeln("<input type=\"hidden\" name=\"mode\" value=\"1\">");
		document.writeln("<input type=\"hidden\" name=\"gr_1\" value=\"lcsd\">");
		document.writeln("  <tr>");
		switch (mode)  {
			case 1: {
			document.writeln("    <td height=\"65\" colspan=\"5\"><a href=\"../index.html\"><img height=\"65\" src=\"../graphics/en/branding.gif\" width=\"484\" border=\"0\" alt=\"" + entitle + "\" title=\"" + entitle + "\"></a></td>");
			document.writeln("    <td valign=\"bottom\" colspan=\"5\" height=\"65\" align=\"right\"><a target=\"_top\" href=\"http://www.brandhk.gov.hk/brandhk/eindex.htm\"><img width=\"190\" height=\"60\" src=\"../graphics/en/brandhk.gif\" border=\"0\" alt=\"Brand HK\" name=\"Brand HK\"></a></td>");
			document.writeln("  </tr>");
			document.writeln("  <tr valign=\"bottom\">");
			document.writeln("    <td width=\"170\" height=\"19\"><a onMouseOver=\"MM_swapImage('mainbar1','','../graphics/en/mainbar1b_f2.gif',1)\" onMouseOut=MM_swapImgRestore() href=\"http://www.gov.hk/en/residents/\" target=\"_blank\"><img width=\"170\" height=\"20\" src=\"../graphics/en/mainbar1b.gif\" border=\"0\" alt=\"Government Information Centre\" name=\"mainbar1\"></a></td>");
			document.writeln("    <td width=\"67\" height=\"19\"><kanhanbypass><a onMouseOver=\"MM_swapImage('mainbar2','','../graphics/en/mainbar2b_f2.gif',1)\" onMouseOut=MM_swapImgRestore() href=\"../" + entext_path + "/" + find_path() + "\" target=\"_top\"><img width=\"67\" height=\"20\" src=\"../graphics/en/mainbar2b.gif\" border=\"0\" alt=\"Text Only\" name=\"mainbar2\"></a></kanhanbypass></td>");
			document.writeln("    <td width=\"51\" height=\"19\"><kanhanbypass><a onMouseOver=\"MM_swapImage('mainbar3','','../graphics/en/mainbar3b_f2.gif',1)\" onMouseOut=MM_swapImgRestore() href=\"../" + b5_path + "/" + find_path() + "\" target=\"_top\"><img width=\"51\" height=\"20\" src=\"../graphics/en/mainbar3b.gif\" border=\"0\" alt=\"繁體版\" name=\"mainbar3\"></a></kanhanbypass--></td>");
			document.writeln("    <td width=\"49\" height=\"19\"><kanhanbypass><a onMouseOver=\"MM_swapImage('mainbar4','','../graphics/en/mainbar4b_f2.gif',1)\" onMouseOut=MM_swapImgRestore() href=\"" + gb_path  + "www.lcsd.gov.hk/CE/Museum/Apo/b5/" + find_path() +"\" target=\"_top\"><img width=\"49\" height=\"20\" src=\"../graphics/en/mainbar4b.gif\" border=\"0\" alt=\"簡体版\" name=\"mainbar4\"></a></kanhanbypass></td>");
			document.writeln("    <td width=\"154\" height=\"19\"><img width=\"80\" height=\"20\" src=\"../graphics/mainbar5b.gif\" border=\"0\" name=\"mainbar5\"><img width=\"1\" height=\"1\" src=\"../graphics/shim.gif\" border=\"0\"></td>");
			document.writeln("    <td width=\"36\" height=\"19\"><a onmouseover=\"MM_swapImage('mainbar6','','../graphics/en/mainbar6b_f2.gif',1)\" onmouseout=MM_swapImgRestore() href=\"search.html\" target=\"_top\"><img width=\"54\" height=\"20\" src=\"../graphics/en/mainbar6b.gif\" border=\"0\" alt=\"Search\" name=\"mainbar6\"></a></td>");
			document.writeln("    <td valign=\"bottom\" width=\"72\" height=\"19\"><input type=\"text\" name=\"qu\" size=12 value=\"\" class=\"search\"></td>");
			document.writeln("    <td width=\"22\" height=\"19\"><input type=\"image\" width=\"22\" height=\"19\" alt=\"Search\" src=\"../graphics/mainbar8b.gif\" border=\"0\" name=\"mainbar8\" onmouseover=\"MM_swapImage('mainbar8','','../graphics/mainbar8b_f2.gif',1)\" onmouseout=\"MM_swapImgRestore()\"></td>");
			document.writeln("    <td width=\"67\" height=\"19\"><a onmouseover=\"MM_swapImage('mainbar9','','../graphics/en/mainbar9b_f2.gif',1)\" onmouseout=MM_swapImgRestore() href=\"sitemap.html\" target=\"_top\"><img width=\"65\" height=\"20\" src=\"../graphics/en/mainbar9b.gif\" border=\"0\" alt=\"Sitemap\" name=\"mainbar9\"></a></td>");
			document.writeln("    <td width=\"32\" height=\"19\"><a onmouseover=\"MM_swapImage('mainbar10','','../graphics/en/mainbar10_f2.gif',1)\" onmouseout=MM_swapImgRestore() href=\"contactus.html\"><img width=\"29\" height=\"19\" src=\"../graphics/en/mainbar10.gif\" border=\"0\" alt=\"Contact Us\" name=\"mainbar10\"></a></td>");
			break;
			}
			case 2: {
			document.writeln("    <td height=\"65\" colspan=\"5\"><a href=\"../index.html\"><img height=\"65\" src=\"../graphics/b5/branding.gif\" width=\"484\" border=\"0\" alt=\"" + b5title + "\" title=\"" + b5title + "\"></a></td>");
			document.writeln("    <td valign=\"bottom\" colspan=\"5\" height=\"65\" align=\"right\"><a target=\"_top\" href=\"http://www.brandhk.gov.hk/brandhk/index.htm\"><img width=\"190\" height=\"60\" src=\"../graphics/b5/brandhk.gif\" border=\"0\" alt=\"香港品牌\" name=\"Brand HK\"></a></td>");
			document.writeln("  </tr>");
			document.writeln("  <tr valign=\"bottom\">");
			document.writeln("    <td width=\"153\" height=\"19\"><a onMouseOver=\"MM_swapImage('mainbar1','','../graphics/b5/mainbar1b_f2.gif',1)\" onMouseOut=MM_swapImgRestore() href=\"http://www.gov.hk/tc/residents/\" target=\"_blank\"><img width=\"170\" height=\"19\" src=\"../graphics/b5/mainbar1b.gif\" border=\"0\" alt=\"政府資訊中心\" name=\"mainbar1\"></a></td>");
			document.writeln("    <td width=\"77\" height=\"19\"><kanhanbypass><a onMouseOver=\"MM_swapImage('mainbar2','','../graphics/b5/mainbar2_f2.gif',1)\" onMouseOut=MM_swapImgRestore() href=\"../" + b5text_path + "/" + find_path() + "\" target=\"_top\"><img width=\"77\" height=\"19\" src=\"../graphics/b5/mainbar2.gif\" border=\"0\" alt=\"繁體純文字\" name=\"mainbar2\"></a></kanhanbypass></td>");
			document.writeln("    <td width=\"49\" height=\"20\"><kanhanbypass><a onMouseOver=\"MM_swapImage('mainbar3','','../graphics/b5/mainbar3b_f2.gif',1)\" onMouseOut=MM_swapImgRestore() href=\"" + gb_path + full_path +"\" target=\"_top\"><img width=\"49\" height=\"19\" src=\"../graphics/b5/mainbar3b.gif\" border=\"0\" alt=\"簡体版\" name=\"mainbar3\"></a></kanhanbypass></td>");
			document.writeln("    <td width=\"56\" height=\"19\"><kanhanbypass><a onMouseOver=\"MM_swapImage('mainbar4','','../graphics/b5/mainbar4b_f2.gif',1)\" onMouseOut=MM_swapImgRestore() href=\"../" + en_path + "/" + find_path() + "\" target=\"_top\"><img width=\"56\" height=\"19\" src=\"../graphics/b5/mainbar4b.gif\" border=\"0\" alt=\"English\" name=\"mainbar4\"></a></kanhanbypass--></td>");
			document.writeln("    <td width=\"203\" height=\"19\"><img width=\"80\" height=\"19\" src=\"../graphics/mainbar5b.gif\" border=\"0\" name=\"mainbar5\"><img width=\"102\" height=\"1\" src=\"../graphics/shim.gif\" border=\"0\"></td>");
			document.writeln("    <td width=\"36\" height=\"19\"><a onmouseover=\"MM_swapImage('mainbar6','','../graphics/b5/mainbar6b_f2.gif',1)\" onmouseout=MM_swapImgRestore() href=\"search.html\" target=\"_top\"><img width=\"36\" height=\"19\" src=\"../graphics/b5/mainbar6b.gif\" border=\"0\" alt=\"搜尋\" name=\"mainbar6\"></a></td>");
			document.writeln("    <td valign=\"bottom\" width=\"72\" height=\"19\"><input type=\"text\" name=\"qu\" size=12 value=\"\" class=\"search\"></td>");
			document.writeln("    <td width=\"22\" height=\"19\"><input type=\"image\" width=\"22\" height=\"19\" alt=\"搜尋\" src=\"../graphics/mainbar8b.gif\" border=\"0\" name=\"mainbar8\" onmouseover=\"MM_swapImage('mainbar8','','../graphics/mainbar8b_f2.gif',1)\" onmouseout=\"MM_swapImgRestore()\"></td>");
			document.writeln("    <td width=\"67\" height=\"19\"><a onmouseover=\"MM_swapImage('mainbar9','','../graphics/b5/mainbar9b_f2.gif',1)\" onmouseout=MM_swapImgRestore() href=\"sitemap.html\" target=\"_top\"><img width=\"67\" height=\"19\" src=\"../graphics/b5/mainbar9b.gif\" border=\"0\" alt=\"網頁指南\" name=\"mainbar9\"></a></td>");
			document.writeln("    <td width=\"32\" height=\"19\"><a onmouseover=\"MM_swapImage('mainbar10','','../graphics/b5/mainbar10_f2.gif',1)\" onmouseout=MM_swapImgRestore() href=\"contactus.html\"><img width=\"29\" height=\"19\" src=\"../graphics/b5/mainbar10.gif\" border=\"0\" alt=\"聯絡我們\" name=\"mainbar10\"></a></td>");
			break;
			}
			case 3: {
			document.writeln("    <td height=\"65\" colspan=\"5\"><a href=\"../index.html\"><img height=\"65\" src=\"../graphics/gb/branding.gif\" width=\"484\" border=\"0\" alt=\"" + b5title + "\" title=\"" + b5title + "\"></a></td>");
			document.writeln("    <td valign=\"bottom\" colspan=\"5\" height=\"65\" align=\"right\"><a target=\"_top\" href=\"http://sc.lcsd.gov.hk/gb/www.brandhk.gov.hk/brandhk/index.htm\"><img width=\"190\" height=\"60\" src=\"../graphics/gb/brandhk.gif\" border=\"0\" alt=\"香港品牌\" name=\"香港品牌\"></a></td>");
			document.writeln("  </tr>");
			document.writeln("  <tr valign=\"bottom\">");
			document.writeln("    <td width=\"153\" height=\"19\"><a onMouseOver=\"MM_swapImage('mainbar1','','../graphics/gb/mainbar1b_f2.gif',1)\" onMouseOut=MM_swapImgRestore() href=\"http://sc.info.gov.hk/TuniS/www.gov.hk/tc/residents/\" target=\"_blank\"><img width=\"170\" height=\"19\" src=\"../graphics/gb/mainbar1b.gif\" border=\"0\" alt=\"政府資訊中心\" name=\"mainbar1\"></a></td>");
			document.writeln("    <td width=\"77\" height=\"19\"><kanhanbypass><a onMouseOver=\"MM_swapImage('mainbar2','','../graphics/gb/mainbar2b_f2.gif',1)\" onMouseOut=MM_swapImgRestore() href=\"../" + b5text_path + "/" + find_path() + "\" target=\"_top\"><img width=\"77\" height=\"19\" src=\"../graphics/gb/mainbar2b.gif\" border=\"0\" alt=\"簡体純文字\" name=\"mainbar2\"></a></kanhanbypass></td>");
			document.writeln("    <td width=\"49\" height=\"20\"><kanhanbypass><a onMouseOver=\"MM_swapImage('mainbar3','','../graphics/gb/mainbar3_f2.gif',1)\" onMouseOut=MM_swapImgRestore() href=\"http:" + "//www.lcsd.gov.hk/CE/Museum/Apo/" + b5_path +"/" + find_path() + "\" target=\"_top\"><img width=\"49\" height=\"19\" src=\"../graphics/gb/mainbar3.gif\" border=\"0\" alt=\"繁體版\" name=\"mainbar3\"></a></kanhanbypass></td>");
			document.writeln("    <td width=\"56\" height=\"19\"><a onMouseOver=\"MM_swapImage('mainbar4','','../graphics/gb/mainbar4b_f2.gif',1)\" onMouseOut=MM_swapImgRestore() href=\"http:" + "//www.lcsd.gov.hk/CE/Museum/Apo/" + en_path + "/" + find_path() + "\" target=\"_top\"><img width=\"56\" height=\"19\" src=\"../graphics/gb/mainbar4b.gif\" border=\"0\" alt=\"English\" name=\"mainbar4\"></a></td>");
			document.writeln("    <td width=\"203\" height=\"19\"><img width=\"80\" height=\"19\" src=\"../graphics/mainbar5b.gif\" border=\"0\" name=\"mainbar5\"><img width=\"102\" height=\"1\" src=\"../graphics/shim.gif\" border=\"0\"></td>");
			document.writeln("    <td width=\"36\" height=\"19\"><a onmouseover=\"MM_swapImage('mainbar6','','../graphics/gb/mainbar6b_f2.gif',1)\" onmouseout=MM_swapImgRestore() href=\"search.html\" target=\"_top\"><img width=\"36\" height=\"19\" src=\"../graphics/gb/mainbar6b.gif\" border=\"0\" alt=\"搜尋\" name=\"mainbar6\"></a></td>");
			document.writeln("    <td valign=\"bottom\" width=\"72\" height=\"19\"><input type=\"text\" name=\"qu\" size=12 value=\"\" class=\"search\"></td>");
			document.writeln("    <td width=\"22\" height=\"19\"><input type=\"image\" width=\"22\" height=\"19\" alt=\"搜尋\" src=\"../graphics/mainbar8b.gif\" border=\"0\" name=\"mainbar8\" onmouseover=\"MM_swapImage('mainbar8','','../graphics/mainbar8b_f2.gif',1)\" onmouseout=\"MM_swapImgRestore()\"></td>");
			document.writeln("    <td width=\"67\" height=\"19\"><a onmouseover=\"MM_swapImage('mainbar9','','../graphics/gb/mainbar9b_f2.gif',1)\" onmouseout=MM_swapImgRestore() href=\"sitemap.html\" target=\"_top\"><img width=\"67\" height=\"19\" src=\"../graphics/gb/mainbar9b.gif\" border=\"0\" alt=\"網頁指南\" name=\"mainbar9\"></a></td>");
			document.writeln("    <td width=\"32\" height=\"19\"><a onmouseover=\"MM_swapImage('mainbar10','','../graphics/gb/mainbar10_f2.gif',1)\" onmouseout=MM_swapImgRestore() href=\"contactus.html\"><img width=\"29\" height=\"19\" src=\"../graphics/gb/mainbar10.gif\" border=\"0\" alt=\"聯絡我們\" name=\"mainbar10\"></a></td>");
			break;
			}
		}
		document.writeln("  </tr>");
		document.writeln("  <tr bgcolor=\"#BB3333\">");
		document.writeln("    <td height=\"2\" colspan=\"10\"></td>");
		document.writeln("    </tr>");
		document.writeln("</form>");
		document.writeln("</table>");
	} else {
		switch (mode) {
			case 4: {
				document.writeln("<a href=\"../../index.html\">" + entitle + "</a> | <a href=\"http://www.brandhk.gov.hk/brandhk/index.htm\">Brand Hong Kong  </a><br>");
				document.writeln("<a href=\"http://www.info.gov.hk/\">Government Information Centre</a> | <a href=\"../../en/" + find_path() + "\">Graphical Mode </a> | <a href=\"../b5/" + find_path() + "\">Traditional Chinese</a> | <a href=\"" + gb_path + "www.lcsd.gov.hk/CE/Museum/Apo/textmode/b5/" + find_path() + "\">Simplified Chinese </a> | <a href=\"../en/search.html\">Search </a> | <a href=\"sitemap.html\">Site Map </a> | <a href=\"contactus.html\">Contact Us</a> | <a href=\"sitemap.html\">Content</a><br><br>");
				break;
			}
			case 5: {
				document.writeln("<a href=\"../../index.html\">" + b5title + "</a> | <a href=\"http://www.brandhk.gov.hk/brandhk/index.htm\">香 港 品 牌 形 象 </a><br>");
				document.writeln("<a href=\"http://www.info.gov.hk/\">政 府 資 訊 中 心 </a> | <a href=\"../../b5/" + find_path() + "\">圖 文 版 </a> | <a href=\"" + gb_path + full_path + "\">簡 體 版 </a> | <a href=\"../en/" + find_path() + "\">English </a> | <a href=\"../b5/search.html\">搜 尋 </a> | <a href=\"sitemap.html\">網 頁 指 南 </a> | <a href=\"contactus.html\">聯 絡 我 們 </a> | <a href=\"sitemap.html\">目 錄 </a><br><br>");
				break;
			}
			case 6: {
				document.writeln("<a href=\"../../index.html\">" + b5title + "</a> | <a href=\"http://www.brandhk.gov.hk/brandhk/index.htm\">香 港 品 牌 形 象 </a><br>");
				document.writeln("<a href=\"http://www.info.gov.hk/\">政 府 資 訊 中 心 </a> | <a href=\"" + gb_path + "www.lcsd.gov.hk/CE/Museum/Apo/b5/" + find_path() + "\">圖 文 版 </a> | <kanhanbypass><a href=\"http:" + "//www.lcsd.gov.hk/CE/Museum/Apo/textmode/b5/" + find_path() + "\">繁 體 版 </a></kanhanbypass> | <kanhanbypass><a href=\"http:" + "//www.lcsd.gov.hk/CE/Museum/Apo/textmode/en/" + find_path() + "\">English </a></kanhanbypass> | <a href=\"../b5/search.html\">搜 尋 </a> | <a href=\"sitemap.html\">網 頁 指 南 </a> | <a href=\"contactus.html\">聯 絡 我 們 </a> | <a href=\"sitemap.html\">目 錄 </a><br><br>");
				break;
			}
		}
	}
}
-->