var x = 1;	 //menuObj.length
var y = 1;	 //subMenuObj.length
var z = 1;	 //HomeIconObj.length

var menuObj = new Array();
var subMenuObj = new Array();
var HomeIconObj = new Array();

var Selected_ID;
var Selected_Sub;
var revisionDate;
var reviewDate;

var imagePath;
var locationPath;
var langPath;
var langID;
var isText;

var topButton;
var printPage;

var exLink;

var prodURL='';
var HomePath='';

getLocationPath(); 			// Checking hosting location 

if(document.URL.toString().search('TextOnly.pl')!=-1)
	isText=1;

/*if(location.href.toString().search('westcomzivo')!=-1){		//Setting kanhan Server
	gb_urlPath='common.westcomzivo.com/gb/';
}else{
	gb_urlPath='sc.info.gov.hk/gb/';
}*/

gb_urlPath='';

// if(document.URL.toString().search('tc/')!=-1 || document.URL.toString().search('mode=19')!=-1){
// 2005-11-11 | westcom | sunny.ho
/*if( document.URL.toString().search('/cgi-bin/cab/tc_')!=-1 || 
	document.URL.toString().search('/cgi-bin/tc_')!=-1 || 
	document.URL.toString().search('tc/')!=-1 || 
	document.URL.toString().search('mode=38')!=-1
)*/
if(document.URL.toString().search('/tc/')!=-1){
	langID=2;
	langPath='/tc/';
}
else if(document.URL.toString().search('/gb/')!=-1){
	langID=3;
	langPath='/gb/';
}
else{
	langID=1;
	langPath='/en/';
}

imagePath = locationPath+langPath;

if(window.name=='PrintPage'){
	printPage=1;
}

/********************* Variable defined for generate the CLF top menu *********************/
var arClfTopMenu = new Array()
//English Version
	arClfTopMenu[1] = new Array()
	arClfTopMenu[1][1] = "ht"+"tp://search.gov.hk/search.html";
//	if(isText)
//		arClfTopMenu[1][2] = "289";					/****** Value of variable mode ******/
//	else
	arClfTopMenu[1][2] = "37";	
	arClfTopMenu[1][3] = "Constitutional and Mainland Affairs Bureau - The Government of the Hong Kong Special Administrative Region";	/****** Department Name ******/
	arClfTopMenu[1][4] = "9";  //Size of the search text box
	arClfTopMenu[1][5] = "ht"+"tp://www.brandhk.gov.hk/brandhk/eindex.htm";
	arClfTopMenu[1][6] = "Brand Hong Kong - Asia's world city";
	arClfTopMenu[1][7] = "GovHK &#39321;&#28207;&#25919;&#24220;&#19968;&#31449;&#36890;";
	arClfTopMenu[1][8] = "/eng/";
	arClfTopMenu[1][9] = "/text/";
	arClfTopMenu[1][10] = "Text Only";
	arClfTopMenu[1][11] = "/eng/";
	arClfTopMenu[1][12] = "/tc/";
	arClfTopMenu[1][13] = "Traditional Chinese";	
//	arClfTopMenu[1][13] = "繁體版";	
	arClfTopMenu[1][14] = "/eng/";	
	arClfTopMenu[1][15] = "/gb/";	
	arClfTopMenu[1][16] = "Simplified Chinese";	
//	arClfTopMenu[1][16] = "簡體版";	
	arClfTopMenu[1][17] = "Search";	
	arClfTopMenu[1][18] = "Site Map";	
	arClfTopMenu[1][19] = "Contact Us";	
	arClfTopMenu[1][20] = "cab";			/****** Value of variable gr_1 ******/
	arClfTopMenu[1][21] = "Graphic Version";	
	arClfTopMenu[1][22] = "/graphics/";
	arClfTopMenu[1][23] = "ht"+"tp://www.gov.hk/en/residents/";
	arClfTopMenu[1][24] = "en";
	arClfTopMenu[1][25] = "iso-8859-1";

//Chinese version	
	arClfTopMenu[2] = new Array()
	arClfTopMenu[2][1] = "ht"+"tp://search.gov.hk/search.html";
//	if(isText)
//		arClfTopMenu[2][2] = "290";					/****** Value of variable mode ******/
//	else
	arClfTopMenu[2][2] = "38";
	arClfTopMenu[2][3] = "香港特別行政區政府 - 政制及內地事務局";		/****** Department Name ******/
	arClfTopMenu[2][4] = "9";  //Size of the search text box
	arClfTopMenu[2][5] = "ht"+"tp://www.brandhk.gov.hk/brandhk/index.htm";
	arClfTopMenu[2][6] = "香港品牌形象 - 亞洲國際都會";
	arClfTopMenu[2][7] = "GovHK 香港政府一站通";
	arClfTopMenu[2][8] = "/chi/";
	arClfTopMenu[2][9] = "/text/";
	arClfTopMenu[2][10] = "繁體純文字";
	arClfTopMenu[2][11] = "/tc/";
	arClfTopMenu[2][12] = "/gb/";
	arClfTopMenu[2][13] = "簡體版";	
	arClfTopMenu[2][14] = "/chi/";	
	arClfTopMenu[2][15] = "/en/";	
	arClfTopMenu[2][16] = "English";	
	arClfTopMenu[2][17] = "搜尋";	
	arClfTopMenu[2][18] = "網頁指南";	
	arClfTopMenu[2][19] = "聯絡我們";
	arClfTopMenu[2][20] = "cab";				/****** Value of variable gr_1 ******/
	arClfTopMenu[2][21] = "繁體圖像版";	
	arClfTopMenu[2][22] = "/graphics/";
	arClfTopMenu[2][23] = "ht"+"tp://www.gov.hk/tc/residents/";
	arClfTopMenu[2][24] = "zh-hk";
	arClfTopMenu[2][25] = "big5";
	
	arClfTopMenu[3] = new Array()
	arClfTopMenu[3][1] = "ht"+"tp://search.gov.hk/search.html";
	arClfTopMenu[3][2] = "38";
	arClfTopMenu[3][3] = "香港特别行政区政府 - 政制及内地事务局";		/****** Department Name ******/
	arClfTopMenu[3][4] = "10";  //Size of the search text box
	arClfTopMenu[3][5] = "ht"+"tp://www.brandhk.gov.hk/brandhk/index.htm";
	arClfTopMenu[3][6] = "香港品牌形象 - 亚洲国际都会";
	arClfTopMenu[3][7] = "GovHK 香港政府一站通";
	arClfTopMenu[3][8] = "/chi/";
	arClfTopMenu[3][9] = "/text/";
	arClfTopMenu[3][10] = "简体纯文字";
	arClfTopMenu[3][11] = "/gb/";
	arClfTopMenu[3][12] = "/tc/";
	arClfTopMenu[3][13] = "繁体版";	
	arClfTopMenu[3][14] = "/gb/";	
	arClfTopMenu[3][15] = "/en/";	
	arClfTopMenu[3][16] = "English";
	arClfTopMenu[3][17] = "搜寻";	
	arClfTopMenu[3][18] = "网页指南";	
	arClfTopMenu[3][19] = "联络我们";
	arClfTopMenu[3][20] = "cab";				/****** Value of variable gr_1 ******/
	arClfTopMenu[3][21] = "简体图像版";	
	arClfTopMenu[3][22] = "/graphics/";
	arClfTopMenu[3][23] = "ht"+"tp://www.gov.hk/sc/residents/";
	arClfTopMenu[3][24] = "zh-cnhk";
	arClfTopMenu[3][25] = "utf-8";

/********************* End of Variable defined for generate the CLF top menu *********************/

/***** Add Section Start *****/

//addMenu(Section ID, English Name, Chinese Name, Path, Normal Image, MouseOver Image, hasChild, visible in sitemap, visible in navigationMenu)
addMenu(1, "Home","主頁","主页", "about/welcome.htm","nav_01.gif","nav_01-over.gif","N","Y","Y");
addMenu(2, "What's New","最新消息","最新消息", "news/index.htm","nav_02.gif","nav_02-over.gif","N","N","N");
addMenu(3, "About Us","關於我們","关于我们", "about/index.htm","nav_03.gif","nav_03-over.gif","Y","Y","Y");
addMenu(4, "Topical Issues","專題資料","专题资料", "issues/index.htm","nav_04.gif","nav_04-over.gif","Y","Y","Y");
addMenu(5, "Publications and Press Releases","刊物及新聞公報","刊物及新闻公报", "press/index.htm","nav_06.gif","nav_06-over.gif","Y","Y","Y");
addMenu(6, "Legislative Council Business","立法會事宜","立法会事宜", "legco/index.htm","nav_11.gif","nav_11-over.gif","N","Y","Y");
addMenu(7, "Access to Information","公開資料","公开资料", "access/index.htm","nav_07.gif","nav_07-over.gif","N","Y","Y");
addMenu(8, "Tender Notices","招標公告","招标公告", "tender/index.htm","nav_08.gif","nav_08-over.gif","N","Y","Y");
addMenu(9, "Related Departments / Organisations","有關部門 / 機構","有关部门 / 机构", "links/index.htm","nav_09.gif","nav_09-over.gif","N","Y","Y");
addMenu(10, "Contact Us","聯絡我們","联络我们", "contact/index.htm","nav_10.gif","nav_10-over.gif","N","Y","Y");

addMenu(11, "Search","搜尋","搜寻", "","nav_11.gif","nav_11-over.gif","N","N","N");
addMenu(12, "Site Map","網頁指南","网页指南", "","nav_12.gif","nav_12-over.gif","N","N","N");
addMenu(13, "Contact Us","聯絡我們","联络我们", "","nav_14.gif","nav_13-over.gif","N","N","N");
addMenu(14, "Important notices","重要告示","重要告示", "","","","N","N","N");
addMenu(15, "Search","搜尋","搜寻", "","","","N","N","N");

/***** Add Section End *****/

/***** Add Sub Section Start *****/
//addSubMenu(Section ID, Sub-Section ID, English Name, Chinese Name, Path, Visible in sitemap, Visible in navigationMenu)
addSubMenu(3, 1, "Welcome Message","歡迎詞","欢迎词", "about/welcome.htm","Y","N");
addSubMenu(3, 2, "Organisation","組織圖","组织图", "about/organization.htm","Y","N");

addSubMenu(4, 1, "The Joint Declaration", "聯合聲明","联合声明", "issues/joint.htm","Y","N");
addSubMenu(4, 2, "The Basic Law", "基本法","基本法", "issues/basic.htm","Y","N");
addSubMenu(4, 3, "HKSAR's Official exchanges with Mainland authorities", "香港特別行政區政府與內地的官方聯繫","香港特别行政区政府与内地的官方联系", "issues/official.htm","Y","N");
addSubMenu(4, 4, "HKSAR's External Affairs", "香港特別行政區的對外事務","香港特别行政区的对外事务", "issues/external.htm","Y","N");
addSubMenu(4, 5, "Electoral Matters","選舉事務","选举事务", "issues/electoral.htm","Y","N");
addSubMenu(4, 6, "Constitutional Development", "政制發展","政制发展", "issues/electoral4.htm","Y","N");
addSubMenu(4, 11, "Further Development of the Political Appointment System","進一步發展政治委任制度","进一步发展政治委任制度", "issues/pa_report.htm","Y","N");
if (langID == 1){
	addSubMenu(4, 13, "Information on PPRD Industrial Upgrading, Restructuring and Relocation","泛珠三角產業升級、轉型及轉移資訊","泛珠三角产业升级、转型及转移资讯", "http://www.gdeto.gov.hk/en/prd/index.htm","Y","N");
}else if (langID == 2){
	addSubMenu(4, 13, "Information on PPRD Industrial Upgrading, Restructuring and Relocation","泛珠三角產業升級、轉型及轉移資訊","泛珠三角产业升级、转型及转移资讯", "http://www.gdeto.gov.hk/tc/prd/index.htm","Y","N");
}else if (langID == 3){
	addSubMenu(4, 13, "Information on PPRD Industrial Upgrading, Restructuring and Relocation","泛珠三角產業升級、轉型及轉移資訊","泛珠三角产业升级、转型及转移资讯", "http://www.gdeto.gov.hk/sc/prd/index.htm","Y","N");
}
addSubMenu(4, 10, "The Greater Pearl River Delta Business Council","大珠三角商務委員會","大珠三角商务委员会", "issues/council.htm","Y","N");
addSubMenu(4, 12, "The Rights of the Individuals","個人權利","个人权利", "issues/individuals.htm","Y","N");

addSubMenu(5, 1, "Speeches","演講詞","演讲词", "speech/speech.htm","Y","N");
addSubMenu(5, 2, "Press Releases","新聞公報","新闻公报", "press/press.htm","Y","N");
addSubMenu(5, 3, "Environmental Report","環保報告","环保报告", "environment_report.pdf","Y","N");
addSubMenu(5, 5, "Human Rights Report","人權報告","人权报告", "press/reports_human.htm","Y","N");
addSubMenu(5, 4, "Publications","刊物","刊物", "press/publications.htm","Y","N");

addSubMenu(7, 1, "Code on Access to Information","公開資料守則","公开资料守则", "access/code.htm","Y","N");
addSubMenu(7, 2, "Procedures for Access to Information","公開資料程序","公开资料程序", "access/procedures.htm","Y","N");
addSubMenu(7, 3, "List of Records","備存紀錄一覽表","备存纪录一览表", "access/list.htm","Y","N");
addSubMenu(7, 4, "List of Information available to the Public Free or at Cost","向公眾提供的免費 / 收費資料","向公众提供的免费 / 收费资料", "access/free.htm","Y","N");

addSubMenu(9, 1, "Advisory Committee under the Purview of<br>Secretary for Constitutional and Mainland Affairs","政制及內地事務局局長轄下的諮詢組織","政制及内地事务局局长辖下的谘询组织", "links/asb7.htm","N","N");

/***** Add Sub Section End *****/

styleSheet();