// Language directory
var chi_path= "/tc_chi/"
var eng_path= "/english/"
var sim_path= "/sc_chi/"


/*
Check if the simplified Chinese version, the update the alt tag value by calling the button.js
*/
if (location.href.toString().search('/sc_chi/') != -1) {
	atgb = true;
} else {
	atgb = false;
}

function chglang(lang){

	org_path=window.location.href;
	des_path="";

	if (isSim()) {
		if (lang == 'tc') {
			des_path = org_path.replace(sim_path,chi_path);
		}	
		if (lang == 'en') {
			des_path = org_path.replace(sim_path,eng_path);
		}	
	}

	if (isChi()) {
		if (lang == 'sc') {
			des_path = org_path.replace(chi_path,sim_path);
		}	
		if (lang == 'en') {
			des_path = org_path.replace(chi_path,eng_path);
		}	
	}

	if (isEng()) {
		if (lang == 'tc') {
			des_path = org_path.replace(eng_path,chi_path);
		}	
		if (lang == 'sc') {
			des_path = org_path.replace(eng_path,sim_path);
		}	
	}

	window.location.href = des_path;
}

function isEng() {
	return (location.href.toString().indexOf(eng_path) != -1) ? true : false;
}

function isChi() {
	return (location.href.toString().indexOf(chi_path) != -1) ? true : false;
}

function isSim() {
	return (location.href.toString().indexOf(sim_path) != -1) ? true : false;
}



function leftmenu(){

document.writeln("              <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> ");
document.writeln("                <tr>  ");
document.writeln("                  <td valign=\"top\"><a href=\"../../tc_chi/press/press.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('sidebtn01','','../../tc_chi/images/general/side_over_01.gif',1)\"><img name=\"sidebtn01\" border=\"0\" src=\"../../tc_chi/images/general/side_01.gif\" alt=\"新聞稿和演辭\"></a></td> ");
document.writeln("                </tr> ");
document.writeln("                <tr>  ");
document.writeln("                  <td valign=\"top\"><a href=\"http://www.info.gov.hk/eac/ch/legco/2004_notices.htm\" target=\"_blank\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('sidebtn11','','../../tc_chi/images/general/side_over_11.gif',1)\"><img name=\"sidebtn11\" border=\"0\" src=\"../../tc_chi/images/general/side_11.gif\" alt=\"公告\"></a></td> ");
document.writeln("                </tr> ");
document.writeln("                <tr>  ");
document.writeln("                  <td valign=\"top\"><a href=\"../../tc_chi/facts/facts.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('sidebtn02','','../../tc_chi/images/general/side_over_02.gif',1)\"><img name=\"sidebtn02\" border=\"0\" src=\"../../tc_chi/images/general/side_02.gif\" alt=\"選舉便覽\"></a></td> ");
document.writeln("                </tr> ");
document.writeln("                <tr>  ");
document.writeln("                  <td valign=\"top\"><a href=\"../../tc_chi/ebm/ebm.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('sidebtn03','','../../tc_chi/images/general/side_over_03.gif',1)\"><img name=\"sidebtn03\" border=\"0\" src=\"../../tc_chi/images/general/side_03.gif\" alt=\"地方選區分界\"></a></td> ");
document.writeln("                </tr> ");
document.writeln("                <tr>  ");
document.writeln("                  <td valign=\"top\"><a href=\"../../tc_chi/gui/gui.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('sidebtn04','','../../tc_chi/images/general/side_over_04.gif',1)\"><img name=\"sidebtn04\" border=\"0\" src=\"../../tc_chi/images/general/side_04.gif\" alt=\"選舉活動指引\"></a></td> ");
document.writeln("                </tr> ");
document.writeln("                <tr>  ");
document.writeln("                  <td valign=\"top\"><a href=\"../../tc_chi/pub/pub.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('sidebtn05','','../../tc_chi/images/general/side_over_05.gif',1)\"><img name=\"sidebtn05\" border=\"0\" src=\"../../tc_chi/images/general/side_05.gif\" alt=\"宣傳資料\"></a></td> ");
document.writeln("                </tr> ");
document.writeln("                <tr>  ");
document.writeln("                  <td valign=\"top\"><a href=\"../../tc_chi/forms/forms.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('sidebtn06','','../../tc_chi/images/general/side_over_06.gif',1)\"><img name=\"sidebtn06\" border=\"0\" src=\"../../tc_chi/images/general/side_06.gif\" alt=\"表格\"></a></td> ");
document.writeln("                </tr> ");
document.writeln("                <tr>  ");
document.writeln("                  <td valign=\"top\"><a href=\"../../tc_chi/nom/nom.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('sidebtn07','','../../tc_chi/images/general/side_over_07.gif',1)\"><img name=\"sidebtn07\" border=\"0\" src=\"../../tc_chi/images/general/side_07.gif\" alt=\"候選人提名\"></a></td> ");
document.writeln("                </tr> ");
document.writeln("                <tr>  ");
document.writeln("                  <td valign=\"top\"><a href=\"../../tc_chi/links/links.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('sidebtn08','','../../tc_chi/images/general/side_over_08.gif',1)\"><img name=\"sidebtn08\" border=\"0\" src=\"../../tc_chi/images/general/side_08.gif\" alt=\"相關網頁\"></a></td> ");
document.writeln("                </tr> ");
document.writeln("                <tr>  ");
document.writeln("                  <td valign=\"top\"><img src=\"../../tc_chi/images/general/side_09.gif\"></td> ");
document.writeln("                </tr> ");





document.writeln("  <tr>   ");
document.writeln("      <td valign=\"top\"><img src=\"../../tc_chi/images/general/side_box_9_11_01.gif\"></td>  ");
document.writeln("  </tr>  ");
document.writeln("  <tr>  ");
document.writeln("      <td valign=\"top\"><a href=\"../../tc_chi/turnout/tt_gc_overall.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('sidebox02','','../../tc_chi/images/general/side_box_9_11_over_02.gif',1)\"><img name=\"sidebox02\" border=\"0\" src=\"../../tc_chi/images/general/side_box_9_11_02.gif\" alt=\"投票率\"></a></td>  ");
document.writeln("  </tr>  ");
document.writeln("  <tr>   ");
document.writeln("      <td valign=\"top\"><a href=\"../../tc_chi/results/rs_gc.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('sidebox03','','../../tc_chi/images/general/side_box_9_11_over_03.gif',1)\"><img name=\"sidebox03\" border=\"0\" src=\"../../tc_chi/images/general/side_box_9_11_03.gif\" alt=\"選舉結果\"></a></td>  ");
document.writeln("  </tr>  ");
document.writeln("  <tr>   ");
document.writeln("      <td valign=\"top\"><a href=\"../../tc_chi/platforms/platforms.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('sidebox04','','../../tc_chi/images/general/side_box_9_11_over_04.gif',1)\"><img name=\"sidebox04\" border=\"0\" src=\"../../tc_chi/images/general/side_box_9_11_04.gif\" alt=\"候選人簡介\"></a></td>  ");
document.writeln("  </tr>  ");
document.writeln("  <tr>   ");
document.writeln("      <td valign=\"top\"><a href=\"../../tc_chi/counting/counting.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('sidebox05','','../../tc_chi/images/general/side_box_9_11_over_05.gif',1)\"><img name=\"sidebox05\" border=\"0\" src=\"../../tc_chi/images/general/side_box_9_11_05.gif\" alt=\"投票站與點票站\"></a></td>  ");
document.writeln("  </tr>  ");
document.writeln("  <tr>   ");
document.writeln("      <td valign=\"top\"><a href=\"../../tc_chi/counting/exit.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('sidebox06','','../../tc_chi/images/general/side_box_9_11_over_06.gif',1)\"><img name=\"sidebox06\" border=\"0\" src=\"../../tc_chi/images/general/side_box_9_11_06.gif\" alt=\"票站調查\"></a></td>  ");
document.writeln("  </tr>  ");


document.writeln("              </table> ");

}


