﻿MM_preloadImages('http://www.yearbook.gov.hk/2004/images/num/home-over.gif','http://www.yearbook.gov.hk/2004/images/num/1-over.gif','http://www.yearbook.gov.hk/2004/images/num/2-over.gif','http://www.yearbook.gov.hk/2004/images/num/3-over.gif','http://www.yearbook.gov.hk/2004/images/num/4-over.gif','http://www.yearbook.gov.hk/2004/images/num/5-over.gif','http://www.yearbook.gov.hk/2004/images/num/6-over.gif','http://www.yearbook.gov.hk/2004/images/num/7-over.gif','http://www.yearbook.gov.hk/2004/images/num/8-over.gif','http://www.yearbook.gov.hk/2004/images/num/9-over.gif','http://www.yearbook.gov.hk/2004/images/num/10-over.gif','http://www.yearbook.gov.hk/2004/images/num/11-over.gif','http://www.yearbook.gov.hk/2004/images/num/12-over.gif','http://www.yearbook.gov.hk/2004/images/num/13-over.gif','http://www.yearbook.gov.hk/2004/images/num/14-over.gif','http://www.yearbook.gov.hk/2004/images/num/15-over.gif','http://www.yearbook.gov.hk/2004/images/num/16-over.gif','http://www.yearbook.gov.hk/2004/images/num/17-over.gif','http://www.yearbook.gov.hk/2004/images/num/18-over.gif','http://www.yearbook.gov.hk/2004/images/num/19-over.gif','http://www.yearbook.gov.hk/2004/images/num/20-over.gif','http://www.yearbook.gov.hk/2004/images/num/21-over.gif','http://www.yearbook.gov.hk/2004/images/num/app-over.gif')

var chapterName = new Array();
chapterName[0]  = '';
chapterName[1]  = '政制和行政';
chapterName[2]  = '法律制度';
chapterName[3]  = '經濟';
chapterName[4]  = '金融財務';
chapterName[5]  = '工商業';
chapterName[6]  = '就業';
chapterName[7]  = '教育';
chapterName[8]  = '衞生';
chapterName[9]  = '食物安全、環境衞生和漁農業';
chapterName[10] = '社會福利';
chapterName[11] = '房屋';
chapterName[12] = '土地、公共工程和公用事業';
chapterName[13] = '運輸';
chapterName[14] = '環境';
chapterName[15] = '旅遊和旅遊業';
chapterName[16] = '公共秩序';
chapterName[17] = '通訊、傳媒和資訊科技';
chapterName[18] = '宗教和風俗';
chapterName[19] = '康體藝術';
chapterName[20] = '人口和入境事務';
chapterName[21] = '歷史';

function addZero(n){
	if(n<10){n="0"+n;}
	return(n);
}

function writeMenu(n){
	document.write('<table width=\"442\" border=\"0\" cellpadding=\"0\" cellspacing=\"5\" background=\"http://www.yearbook.gov.hk/2004/images/t.gif\">');
	document.write('<tr>');
	document.write('<td width=\"14\"><a href=\"http://www.yearbook.gov.hk/2004/tc/index.htm\" onMouseOver=\"MM_swapImage(\'home\',\'\',\'http://www.yearbook.gov.hk/2004/images/num/home-over.gif\',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\"http://www.yearbook.gov.hk/2004/images/num/home.gif\" alt=\"目錄\" name=\"home\" width=\"14\" height=\"14\" border=\"0\" id=\"home\"></a></td>');
	for(i=1;i<=21;i++){
		if(i==n){o=i+"-now";}else{o=i;}
		document.write('<td width=\"14\"><a href=\"http://www.yearbook.gov.hk/2004/tc/'+addZero(i)+'_01.htm" onMouseOver="MM_swapImage(\'toc'+i+'\',\'\',\'http://www.yearbook.gov.hk/2004/images/num/'+i+'-over.gif\',1)" onMouseOut="MM_swapImgRestore()"><img src="http://www.yearbook.gov.hk/2004/images/num/'+o+'.gif" alt="'+chapterName[i]+'" name="toc'+i+'" width="14" height="14" border="0" id="toc'+i+'"></a></td>');
	}
	if(n=='app'){
		document.write('<td width=\"14\"><a href=\"http://www.yearbook.gov.hk/2004/tc/app.htm\" onMouseOver=\"MM_swapImage(\'app\',\'\',\'http://www.yearbook.gov.hk/2004/images/num/app-over.gif\',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\"http://www.yearbook.gov.hk/2004/images/num/app-now.gif\" alt=\"附錄\" name=\"app\" width=\"14\" height=\"14\" border=\"0\"id=\"app\"></a></td>');
	}else{
		document.write('<td width=\"14\"><a href=\"http://www.yearbook.gov.hk/2004/tc/app.htm\" onMouseOver=\"MM_swapImage(\'app\',\'\',\'http://www.yearbook.gov.hk/2004/images/num/app-over.gif\',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\"http://www.yearbook.gov.hk/2004/images/num/app.gif\" alt=\"附錄\" name=\"app\" width=\"14\" height=\"14\" border=\"0\"id=\"app\"></a></td>');
	}
	document.write('</tr>');
	document.write('</table>');
}