var title=new Array();
title[1] = "首 页";
title[2] = "最 新 消 息";
title[3] = "关 于 我 们";
title[4] = "政 策 职 务";
title[14] = "施 政 纲 领";
title[5] = "刊 物 及 新 闻 公 布";
title[6] = "公 开 资 料";
title[7] = "公 用 表 格";
title[8] = "其 他 资 料";
title[9] = "有 关 部 门 / 机 构";
title[10] = "联 络 我 们";
title[11] = "重 要 告 示";
title[12] = "网 页 指 南";
title[99] = "欢 迎 词";
title[15] = "香 港 志 愿 者 在 北 京 奥 运";

var subTitle=new Array();
subTitle[3] = new Array()
subTitle[3][1] = "民 政 事 务 局 局 长 专 栏";
subTitle[3][2] = "民 政 事 务 局 常 任 秘 书 长 讲 辞";
subTitle[3][3] = "理 想 及 使 命";
subTitle[3][4] = "组 织 图";

subTitle[4] = new Array()
subTitle[4][1] = "社 会 和 谐 及 公 民 教 育";
subTitle[4][2] = "地 区 、 社 区 及 公 众 关 系";
subTitle[4][3] = "康 乐 、 体 育 及 娱 乐 事 务 牌 照";
subTitle[4][4] = "文 化";
subTitle[4][5] = "政 策 职 务";
subTitle[4][6] = "政 策 职 务";
subTitle[4][7] = "政 策 职 务";

subTitle[5] = new Array()
subTitle[5][1] = "新 闻 公 布 及 演 辞";
subTitle[5][2] = "刊 物";
subTitle[5][3] = "报 告";
subTitle[5][4] = "谘 询 / 政 策 文 件";

subTitle[6] = new Array()
subTitle[6][1] = "公 开 资 料 守 则";
subTitle[6][2] = "公 开 资 料 程 序";
subTitle[6][3] = "可 提 供 的 资 料 一 览 表";
subTitle[6][4] = "按 类 别 划 分 的 纪 录 一 览 表";	

subTitle[8] = new Array()
subTitle[8][6] = "2010-11 年 政 府 财 政 预 算 案";
subTitle[8][1] = "私 隐 政 策 声 明";
subTitle[8][2] = "环 境 报 告";
subTitle[8][3] = "关 于资 源 增 值 计 划 节 省 开 支 的 报 告";
subTitle[8][4] = "电 子 交 易 条 例";
subTitle[8][5] = "招 标 公 告";
subTitle[8][7] = "招 聘 事 宜";

subTitle[9] = new Array()
subTitle[9][1] = "有 关 政 府 部 门 及 其 他 机 构";
subTitle[9][2] = "民 政 事 务 局 局 长 辖 下 的 谘 询 及 法 定 组 织";


subTitle[99] = new Array()
subTitle[99][1] = "欢 迎 词";
subTitle[99][2] = "简 历";


//switch language version
function langSwitch(lang) {
	var goPath;
	var pagePath=document.location.pathname;

	if(location.href.toString().search('westcom') != -1)
		var translationServer='ht'+'tp://common.westcomzivo.com/gb/';
	else
		var translationServer='http://sc.info.gov.hk/gb/';

	if (lang=='en') { //change to English version
		goPath='/en'+pagePath.substring(4,pagePath.length);
	}
	if (lang=='tc') { //change to traditional chinese version
		goPath='/tc'+pagePath.substring(4,pagePath.length);
	}
	if (lang=='sc') { //change to simplified chinese version
		goPath='/tc'+pagePath.substring(4,pagePath.length);
		goPath=translationServer+location.host+goPath;
	}
	document.location=goPath;
}

function getTitle() {
	var scriptBuffer='';
	scriptBuffer+='<title>';
	scriptBuffer+='民 政 事 务 局 - '+title[selectedSection];
	if(selectedSubSection!=0&&selectedSubSection!='') {
		scriptBuffer+= ' - ' + subTitle[selectedSection][selectedSubSection]
	}
	scriptBuffer+='</title>';
	return scriptBuffer;	
}

function getTopic() {
	var retStr='';
	retStr = title[selectedSection];
	if(selectedSubSection!=0&&selectedSubSection!='') {
		retStr+= ' - ' + subTitle[selectedSection][selectedSubSection];
	}
	return retStr;
}

function getHeader(){
	linkHome='/index.htm';
	linkTC='javascript:langSwitch(\'tc\')';
	linkEN='javascript:langSwitch(\'en\')';
	linkSiteMap='/chs/t_sitemap.htm';
	linkContactUs='/chs/contact_us/t_suggestion.htm';
	linkSearch='javascript:document.search.submit()';
//	linkSearch='javascript:PopWin(\'/popup2.html\', 0, 0, 300, 110)';

	var scriptBuffer='';
	scriptBuffer+='<table width="760" border="0" cellspacing="0" cellpadding="0">';
	scriptBuffer+='<tr>';
	scriptBuffer+='<td colspan="2"><font size="4"><b>民 政 事 务 局</b></font><br><br>';
	scriptBuffer+='</td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='<tr valign="middle">';
	scriptBuffer+='<td><table border="0" cellspacing="0" cellpadding="0">';
	scriptBuffer+='<tr>';
	scriptBuffer+='<td nowrap>[ <a href="'+linkHome+'">首 页</a> ]</td>';
	scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap>[ <a href="'+linkTC+'">繁 體 版</a> ]</td>';
	scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap>[ <a href="'+linkEN+'">English</a> ]</td>';
	scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap>[ <a href="'+linkSiteMap+'">网 页 指 南</a> ]</td>';
	scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap> [ <a href="'+linkContactUs+'">联 络 我 们</a> ] </td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='</table>';
	scriptBuffer+='</td>';
	scriptBuffer+='<td align="right"><table border="0" cellspacing="0" cellpadding="0">';
	scriptBuffer+='<form name="search" action="http://search.gov.hk/search.html" method="get">';
//	scriptBuffer+='<form name="search" action="javascript:PopWin(\'/popup2.html\', 0, 0, 300, 110)">';
	scriptBuffer+='<input type="hidden" name="tpl_id" value="hab">';
	scriptBuffer+='<input type="hidden" name="ui_lang" value="zh-cnhk">';
	scriptBuffer+='<input type="hidden" name="ui_charset" value="utf-8">';
	scriptBuffer+='<input type="hidden" name="gp0" value="hab_home">';
	scriptBuffer+='<input type="hidden" name="gp1" value="hab_home">';
	scriptBuffer+='<input type="hidden" name="web" value="this">';
	scriptBuffer+='<input type="hidden" name="txtonly" value="1">';
	//form hidden field add here
	scriptBuffer+='<tr>';
	scriptBuffer+='<td valign="middle" nowrap>[&nbsp;</td>';
	scriptBuffer+='<td valign="middle" nowrap><input type="text" name="query">';
	scriptBuffer+='</td>';
	scriptBuffer+='<td valign="middle" nowrap>&nbsp;<a href="'+linkSearch+'">搜 寻</a>&nbsp;]</td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='</form>';
	scriptBuffer+='</table>';
	scriptBuffer+='</td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='<tr>';
	scriptBuffer+='<td colspan="2"><hr></td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='</table>';scriptBuffer+='</tr>';
	scriptBuffer+='</table>';
	
	return scriptBuffer;
}


function getHeader_chi(){
	linkHome='/index.htm';
	linkTC='javascript:langSwitch(\'tc\')';
	linkEN='javascript:langSwitch(\'en\')';
	linkSiteMap='/chs/t_sitemap.htm';
	linkContactUs='/chs/contact_us/t_suggestion.htm';
	linkSearch='javascript:document.search.submit()';
//	linkSearch='javascript:PopWin(\'/popup2.html\', 0, 0, 300, 110)';

	var scriptBuffer='';
	scriptBuffer+='<table width="760" border="0" cellspacing="0" cellpadding="0">';
	scriptBuffer+='<tr>';
	scriptBuffer+='<td colspan="2"><font size="4"><b>民 政 事 务 局</b></font><br><br>';
	scriptBuffer+='</td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='<tr valign="middle">';
	scriptBuffer+='<td><table border="0" cellspacing="0" cellpadding="0">';
	scriptBuffer+='<tr>';
	scriptBuffer+='<td nowrap>[ <a href="'+linkHome+'">首 页</a> ]</td>';
	scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap>[ <a href="'+linkTC+'">繁 體 版</a> ]</td>';
	scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
	
	scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap>[ <a href="'+linkSiteMap+'">网 页 指 南</a> ]</td>';
	scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap> [ <a href="'+linkContactUs+'">联 络 我 们</a> ] </td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='</table>';
	scriptBuffer+='</td>';
	scriptBuffer+='<td align="right"><table border="0" cellspacing="0" cellpadding="0">';
	scriptBuffer+='<form name="search" action="http://search.gov.hk/search.html" method="get">';
//	scriptBuffer+='<form name="search" action="javascript:PopWin(\'/popup2.html\', 0, 0, 300, 110)">';
	scriptBuffer+='<input type="hidden" name="tpl_id" value="hab">';
	scriptBuffer+='<input type="hidden" name="ui_lang" value="zh-cnhk">';
	scriptBuffer+='<input type="hidden" name="ui_charset" value="utf-8">';
	scriptBuffer+='<input type="hidden" name="gp0" value="hab_home">';
	scriptBuffer+='<input type="hidden" name="gp1" value="hab_home">';
	scriptBuffer+='<input type="hidden" name="web" value="this">';
	scriptBuffer+='<input type="hidden" name="txtonly" value="1">';
	//form hidden field add here
	scriptBuffer+='<tr>';
	scriptBuffer+='<td valign="middle" nowrap>[&nbsp;</td>';
	scriptBuffer+='<td valign="middle" nowrap><input type="text" name="query">';
	scriptBuffer+='</td>';
	scriptBuffer+='<td valign="middle" nowrap>&nbsp;<a href="'+linkSearch+'">搜 寻</a>&nbsp;]</td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='</form>';
	scriptBuffer+='</table>';
	scriptBuffer+='</td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='<tr>';
	scriptBuffer+='<td colspan="2"><hr></td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='</table>';scriptBuffer+='</tr>';
	scriptBuffer+='</table>';
	
	return scriptBuffer;
}

function getNavMenu(){
	var sectionlink = new Array();
	sectionlink[1]='/chs/home/t_index.htm';
	sectionlink[2]='/chs/whats_new/t_index.htm';
	sectionlink[3]='/chs/about_us/t_about.htm';
	sectionlink[4]='/chs/policy_responsibilities/t_policy.htm';
	sectionlink[14] = "/en/policy_initiatives/t_policy_initiatives.htm";
	sectionlink[5]='/chs/publications_and_press_releases/t_pubpress.htm';
	sectionlink[6]='/chs/access_to_information/t_access_to_information.htm';
	sectionlink[7]='/chs/public_forms/t_forms.htm';
	sectionlink[8]='/chs/other_information/t_other.htm';
	sectionlink[9]='/chs/related_departments_organizations/t_index.htm';
	sectionlink[10]='/chs/contact_us/t_suggestion.htm';

	var subSectionlink =new Array();
	subSectionlink [3] = new Array()
	subSectionlink [3][1] = "/chs/about_us/t_shadesk.htm";
	subSectionlink [3][2] = "/chs/about_us/t_pshaspeech.htm";
	subSectionlink [3][3] = "/chs/about_us/t_vision.htm";
	subSectionlink [3][4] = "/chs/about_us/t_haborg.htm";
	
	subSectionlink [4] = new Array()
	subSectionlink [4][1] = "/chs/policy_responsibilities/t_policy1.htm";
	subSectionlink [4][2] = "/chs/policy_responsibilities/t_policy2.htm";
	subSectionlink [4][3] = "/chs/policy_responsibilities/t_policy3.htm";
	subSectionlink [4][4] = "/chs/policy_responsibilities/t_policy4.htm";
	subSectionlink [4][5] = "/chs/policy_responsibilities/t_policy.htm";
	subSectionlink [4][6] = "/chs/policy_responsibilities/t_policy.htm";
	subSectionlink [4][7] = "/chs/policy_responsibilities/t_policy.htm";
	
	subSectionlink [5] = new Array()
	subSectionlink [5][1] = "/chs/publications_and_press_releases/t_index.htm";
	subSectionlink [5][2] = "/chs/publications_and_press_releases/t_publications.htm";
	subSectionlink [5][3] = "/chs/publications_and_press_releases/t_reports.htm";
	subSectionlink [5][4] = "/chs/publications_and_press_releases/t_consultation.htm";
	
	subSectionlink [6] = new Array()
	subSectionlink [6][1] = "/chs/access_to_information/t_rule.htm";
	subSectionlink [6][2] = "/chs/access_to_information/t_code.htm";	
	subSectionlink [6][3] = "/chs/access_to_information/list_of_available_information/t_listpub.htm";
	subSectionlink [6][4] = "/chs/access_to_information/list_of_records_by_category/t_listrec.htm";	
	
	subSectionlink [8] = new Array()
	subSectionlink [8][1] = "/chs/other_information/t_privacy.htm";
	subSectionlink [8][2] = "/chs/other_information/t_er02.htm";
	subSectionlink [8][3] = "/chs/other_information/t_epp.htm";
	subSectionlink [8][4] = "/chs/other_information/t_eto.htm";
	subSectionlink [8][5] = "/chs/other_information/t_tender.htm";
	subSectionlink [8][7] = "/chs/other_information/t_recruitment.htm";

	subSectionlink [9] = new Array()
	subSectionlink [9][1] = "/chs/related_departments_organizations/t_related.htm";
	subSectionlink [9][2] = "/chs/related_departments_organizations/t_asb.htm";

	subSectionlink [99] = new Array()
	subSectionlink [99][1] = "/chs/home/t_index.htm";
	subSectionlink [99][2] = "/chs/home/t_bio.htm";

	//generate the topic image to the buffer variable
	var scriptBuffer='';
	scriptBuffer+='<table width="760" border="0" cellspacing="0" cellpadding="0">';
	scriptBuffer+='<tr>';
	scriptBuffer+='<td colspan="2"><br>';
	scriptBuffer+='<br>';
	scriptBuffer+='<hr></td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='<tr>';
	scriptBuffer+='<td>[ <a href="#top">页 首</a> ]</td>';
	if(backLink!='') scriptBuffer+='<td align="right">[ <a href="'+backLink+'">回 上 页</a> ]</td>';
	else scriptBuffer+='<td align="right">&nbsp;</td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='<tr>';
	scriptBuffer+='<td colspan="2"><hr></td>';
	scriptBuffer+='</tr>';
	if(selectedSubSection!=0&&selectedSubSection!='') {
		scriptBuffer+='<tr>';
		scriptBuffer+='<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">';
		switch(selectedSection) {
			case 3:
				scriptBuffer+='<tr>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][1]+'">'+subTitle[selectedSection][1]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][2]+'">'+subTitle[selectedSection][2]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][3]+'">'+subTitle[selectedSection][3]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][4]+'">'+subTitle[selectedSection][4]+'</a> ]</td>';
				scriptBuffer+='</tr>';
				break;
			case 4:
				scriptBuffer+='<tr>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][4]+'">'+subTitle[selectedSection][4]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][2]+'">'+subTitle[selectedSection][2]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][5]+'">'+subTitle[selectedSection][5]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][6]+'">'+subTitle[selectedSection][6]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][7]+'">'+subTitle[selectedSection][7]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][3]+'">'+subTitle[selectedSection][3]+'</a> ]</td>';				
				scriptBuffer+='</tr>';
				break;
			case 5:
				scriptBuffer+='<tr>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][1]+'">'+subTitle[selectedSection][1]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][2]+'">'+subTitle[selectedSection][2]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][3]+'">'+subTitle[selectedSection][3]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][4]+'">'+subTitle[selectedSection][4]+'</a> ]</td>';
				scriptBuffer+='</tr>';
				break;
			case 6:
				scriptBuffer+='<tr>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][1]+'">'+subTitle[selectedSection][1]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][2]+'">'+subTitle[selectedSection][2]+'</a> ]</td>';
				scriptBuffer+='</tr>';
				break;
			case 8:
				scriptBuffer+='<tr>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][1]+'">'+subTitle[selectedSection][1]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][2]+'">'+subTitle[selectedSection][2]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][3]+'">'+subTitle[selectedSection][3]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][4]+'">'+subTitle[selectedSection][4]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][5]+'">'+subTitle[selectedSection][5]+'</a> ]</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][7]+'">'+subTitle[selectedSection][7]+'</a> ]</td>';
				scriptBuffer+='</tr>';
				break;
			case 9:
				scriptBuffer+='<tr>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][1]+'">'+subTitle[selectedSection][1]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][2]+'">'+subTitle[selectedSection][2]+'</a> ]</td>';
				scriptBuffer+='</tr>';
				break;
			case 99:
				scriptBuffer+='<tr>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][1]+'">'+subTitle[selectedSection][1]+'</a> ]</td>';
				scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
				scriptBuffer+='<td nowrap>[ <a href="'+subSectionlink[selectedSection][2]+'">'+subTitle[selectedSection][2]+'</a> ]</td>';
				scriptBuffer+='</tr>';
	            break;
			default:
				scriptBuffer+='<td><h3><font color="red">Error Occured</font></h3></td>';
		}
		scriptBuffer+='</table></td>';
		scriptBuffer+='</tr>';
		scriptBuffer+='<tr>';
		scriptBuffer+='<td colspan="2"><hr></td>';
		scriptBuffer+='</tr>';
	}
	scriptBuffer+='<tr>';
	scriptBuffer+='<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">';
	scriptBuffer+='<tr>';
	scriptBuffer+='<td nowrap>[ <a href="'+sectionlink[1]+'">'+title[1]+'</a> ]</td>';
	scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap>[ <a href="'+sectionlink[2]+'">'+title[2]+'</a> ]</td>';
	scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap>[ <a href="'+sectionlink[3]+'">'+title[3]+'</a> ]</td>';
	scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap>[ <a href="'+sectionlink[4]+'">'+title[4]+'</a> ]</td>';
	scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap>[ <a href="'+sectionlink[5]+'">'+title[5]+'</a> ]</td>';
	scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap>[ <a href="'+sectionlink[6]+'">'+title[6]+'</a> ] </td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='<tr>';
	scriptBuffer+='<td nowrap>[ <a href="'+sectionlink[7]+'">'+title[7]+'</a> ]</td>';
	scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap>[ <a href="'+sectionlink[8]+'">'+title[8]+'</a> ]</td>';
	scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap>[ <a href="'+sectionlink[9]+'">'+title[9]+'</a> ]</td>';
	scriptBuffer+='<td width="10" nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap>[ <a href="'+sectionlink[10]+'">'+title[10]+'</a> ]</td>';
	scriptBuffer+='<td nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap>&nbsp;</td>';
	scriptBuffer+='<td nowrap>&nbsp;</td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='</table></td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='<tr>';
	scriptBuffer+='<td colspan="2"><hr></td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='</table>';
	
	return scriptBuffer;
}

function getFooter() {
	var copyYear='2008';
	var noticesLink='/chs/t_notice.htm';
	var PrivacyLink='/chs/other_information/t_privacy.htm';
	
	if (revisionDate==''||revisionDate=='MM/DD/YYYY') revisionDate='8/24/2009';
	var monthArray=new Array();
	monthArray[0]='1';
	monthArray[1]='2';
	monthArray[2]='3';
	monthArray[3]='4';
	monthArray[4]='5';
	monthArray[5]='6';
	monthArray[6]='7';
	monthArray[7]='8';
	monthArray[8]='9';
	monthArray[9]='10';
	monthArray[10]='11';
	monthArray[11]='12';
	var reDate=new Date(Date.parse(revisionDate))
	var showDate=reDate.getFullYear()+'年'+monthArray[reDate.getMonth()]+'月'+reDate.getDate()+'日';
	//generate the topic image to the buffer variable
	var scriptBuffer='';
	scriptBuffer+='<table width="760" border="0" cellspacing="0" cellpadding="0">';
	scriptBuffer+='<tr>';
	scriptBuffer+='<td>版 权 所 有 2008 | <a href="'+noticesLink+'">重 要 告 示</a> | <a href="'+PrivacyLink+'">私 隐 政 策</A><br>';
	scriptBuffer+='</td>';
	scriptBuffer+='<td align="right">最 新 修 订 日 期 : '+showDate+'</td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='</table>';
	
	return scriptBuffer;
}
function PopWin(url, x, y, w, h){
    eval("popup0 = window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,pageXOffset=300,pageYOffset=500,top=" + y + ",left=" + x +",width=" + w + ",height=" + h + "')");
        if ( popup0.focus != null){
        popup0.focus();
    }
   // return true;
}

function externalLink(url)
{eval("nw = window.open(url, 'external','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,pageXOffset=0,pageYOffset=0,top=0,left=0,width=400,height=600')");
	if ( nw.focus != null)
	{nw.focus();}
}

function documentPopUp(url){
if(location.href.toString().search('/gb/') != -1){
	var pathName = document.location.pathname;
	var PathAdd = pathName.indexOf("/chs/");
	var Main_url = pathName.substr(0, PathAdd);
	url = Main_url + url
	if(url.toString().search('.pdf') != -1){
		url = url.replace('/chs/', '/sc/');
	}
//	alert(url);
}

//eval("nw = window.open(url, 'document','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,pageXOffset=0,pageYOffset=0,top=0,left=0,width=400,height=600')");
//	if ( nw.focus != null)
//	{nw.focus();}
	
	var nw = window.open(url, 'document','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,pageXOffset=0,pageYOffset=0,top=0,left=0,width=400,height=600');
	nw.focus();
}
