var domain_pref ="eabfu";
var domain="test2.westcomzivo.com/"+domain_pref;

if(location.href.search(domain)==-1){
	/*
	domain_pref="censtatd";
	domain="202.64.223.114/"+domain_pref	;
	*/
	domain="www.eabfu.gov.hk";
	if (location.href.search('www.eabfu')!=-1){
		domain="www.eabfu.gov.hk";
	}else if (location.href.search('www0.eabfu')!=-1){
		domain="www0.eabfu.gov.hk";
	}else if (location.href.search('www0.cms.eabfu')!=-1){
		domain="www0.cms.eabfu.gov.hk";
	}else if (location.href.search('www.cms.eabfu')!=-1){
		domain="www.cms.eabfu.gov.hk";
	}else if (location.href.search('active.eabfu')!=-1){
		domain="active.eabfu.gov.hk";
	}else if (location.href.search('staging.eabfu')!=-1){
		domain="staging.eabfu.gov.hk";
	}else if (location.href.search('wip.eabfu')!=-1){
		domain="wip.eabfu.gov.hk";
	}
}


if(document.URL.toString().search('/sc/')!=-1){
	langID=2;
	langFolder='/sc/';
	imgFolder=langFolder;
	docFolder='/doc/';
}else if(document.URL.toString().search('/tc/')!=-1 || document.URL.toString().search('mode=0')!=-1){
	langID=2;
	langFolder='/tc/';
	imgFolder=langFolder;
	docFolder='/doc/';
}else{
	langID=1;
	langFolder='/en/';
	imgFolder=langFolder;
	docFolder=langFolder+'pdf/';
}

if(location.href.toString().search('westcomzivo')!=-1){			//Setting kanhan Server
	gb_urlPath='common.westcomzivo.com/gb/';
}else{
	gb_urlPath='sc.info.gov.hk/gb/';
}

if(document.URL.toString().search('/gb/')!=-1){					//Setting kanhan path
	domain_url = "ht"+"tp://"+gb_urlPath+domain;
}else{
	domain_url = "ht"+"tp://"+domain;
}

if(document.URL.toString().search('/text/')!=-1){					//TEXTONLY VERSION
	langPath = domain_url + '/text' + langFolder;
}else{													//GRAPHIC VERSION
	langPath = domain_url + langFolder;
	imgPath = domain_url + imgFolder;
}
docPath=domain_url + docFolder;

if(location.href.toString().search('search.info.gov.hk') != -1){
	selectedSection=13;
	selectedSubSection=0;
	revisionDate='MM/DD/YYYY'; //Date Format: MM/DD/YYYY
}

// -------------------------------------------------------------    Variable for Common Function for Left Menu -----------------------------------------

//Browser Type var:
var isNS4 = (document.layers) ? true : false;
var isIE4 = (document.all && !document.getElementById) ? true : false;
var isIE5 = (document.all && document.getElementById) ? true : false;
var isNS6 = (!document.all && document.getElementById) ? true : false;
//If not NS4. It should be IE or NS6+
isIE5 =!isNS4;


var leftMenuSectionImageOut = ".jpg";
var leftMenuSectionImageOver = "_o.jpg";
var leftMenuName = "Menu";
var leftMenuImageName = "icon";
var layerCommonName = "Popup";
var leftMenuFlag = false;
var firstLayerFlag = false;
var firstLayerTimerID;
var activeLeftMenuID = "";
var mainTopic = "";

var arLayer = new Array()
var arLayer2 = new Array()

// -------------------------------------------------------------    End of Variable for Common Function for Left Menu -----------------------------------------

// -------------------------------------------------------------    Variable for Common Function for First Level Layers-----------------------------------------

var firstLayerImagesFlag = false;
var secondLayerFlag = false;
var activeFirstLayerImageID = "";
var activeSecondLayerID = "";
var secondLayerTimerID;
var subTopic = "";

var arSecondLayer = new Array()
var arSecondLayer2 = new Array()

// -------------------------------------------------------------    End of Variable for Common Function for First Level Layers -----------------------------------------

// -------------------------------------------------------------    Variable for Common Function for Second Level Layers-----------------------------------------

var secondLayerImagesFlag = false;
var thirdLayerFlag = false;
var activeSecondLayerImageID = "";
var activeThirdLayerID = "";
var thirdLayerTimerID;
var subSubTopic = "";

var arThirdLayer = new Array()
var arThirdLayer2 = new Array()

// -------------------------------------------------------------    End of Variable for Common Function for Second Level Layers -----------------------------------------

// -------------------------------------------------------------    Common Function for Left Menu -----------------------------------------
function getDim(el){
	for (var lx=0,ly=0;el!=null;
		lx+=el.offsetLeft,ly+=el.offsetTop,el=el.offsetParent);
	return {x:lx,y:ly}
}

function moveDivs(layerObj, inObjTop){
layerObj.top  = inObjTop - 1;
//	var objLeft = layerObj.left;
//	objLeft = objLeft.repalce("px");
//	objLeft = int(objLeft)+10;
//	alert(objLeft);
//layerObj.left  = leftMenuWidth;
}

var arLayerPos = new Array()
//arLayerPos[5] = 180;

function setLayerPosition()
{
//	alert (arLayer.length);
	for (var i in arLayer)
	{
			 if(arLayerPos[arLayer2[i]]!=null)
			 {
				 if (document.all){moveDivs(document.all[arLayer[i]].style, arLayerPos[arLayer2[i]]);}
				 if (document.layers){moveDivs(document.layers[arLayer[i]], arLayerPos[arLayer2[i]]);}
				 if (!document.all && document.getElementById) {moveDivs(document.getElementById(arLayer[i]).style, arLayerPos[arLayer2[i]]);}
			}
			else
			{
				 if (document.all){moveDivs(document.all[arLayer[i]].style, getDim(document.images[leftMenuName+arLayer2[i]]).y);}
				 if (document.layers){moveDivs(document.layers[arLayer[i]], document.images[leftMenuName+arLayer2[i]].y);}
				 if (!document.all && document.getElementById) {moveDivs(document.getElementById(arLayer[i]).style, document.images[leftMenuName+arLayer2[i]].y);}
			}
	}
} 

function doShowMenu(imgName)
{
	var iconNo = parseInt(imgName)+1;
	(iconNo<10)?iconNo='0'+iconNo:iconNo=iconNo;
	if(mainTopic != imgName && !leftMenuFlag)

	{
		document.images[leftMenuName+imgName].src=document.images[leftMenuName+imgName].src.replace(leftMenuSectionImageOut, leftMenuSectionImageOver)
		leftMenuFlag = true;
	}
	if (!firstLayerFlag)
	{
		MM_showHideLayers(layerCommonName+iconNo,'','show');
		firstLayerFlag=true;
	}
	activeLeftMenuID = imgName
}

function leftMenuMouseOver(imgName) 
{
	if (activeLeftMenuID == imgName)
	{
		if (firstLayerTimerID) clearTimeout(firstLayerTimerID);
		firstLayerTimerID = null;
	}
	else
	{
		if (firstLayerTimerID) clearTimeout(firstLayerTimerID);
		firstLayerTimerID = null;
		if (activeLeftMenuID!=""){doHideMenu(activeLeftMenuID);}
		doShowMenu(imgName)	
	}
}

function doHideMenu(imgName)
{
	var iconNo = parseInt(imgName)+1;
	(iconNo<10)?iconNo='0'+iconNo:iconNo=iconNo;

	if(mainTopic != imgName)
	{
		document.images[leftMenuName+imgName].src=document.images[leftMenuName+imgName].src.replace(leftMenuSectionImageOver, leftMenuSectionImageOut)
		leftMenuFlag = false;
	}
	if (firstLayerFlag)
	{
		MM_showHideLayers(layerCommonName+iconNo,'','hide')
		firstLayerFlag=false;
	}
	activeLeftMenuID = "";
}

function leftMenuMouseOut(imgName) {
	
	if (activeLeftMenuID == imgName)
	{
		firstLayerTimerID = setTimeout("doHideMenu('"+imgName+"')", 500);
	}
	else
	{
		doHideMenu(imgName);
	}
}

// -------------------------------------------------------------   End of Common Function for Left Menu -----------------------------------------

// -------------------------------------------------------------    Common Function for First Level Layers -----------------------------------------
function findHeightForLayer(layerObj, obj)
{
	var height = 0;
	var flag = true;
	for (i=0;i<layerObj.images.length;i++)
	{
		if (obj==layerObj.images[i].name)
		{flag = false;}
		if (flag)
		{height+=parseInt(layerObj.images[i].height);}
	}
	return height;
}

var arSecondLayerPos = new Array();
arSecondLayerPos[6] = new Array();
arSecondLayerPos[6][11] = 300;

function setSecondLayerPosition()
{
	for (var i in arSecondLayer)
	{
			 var tempLayer = arSecondLayer[i].substring(0, arSecondLayer[i].length-2)
			 var tempImage = leftMenuName+arSecondLayer2[i];
			 var tempImagePos = tempImage.indexOf("_")

			 tempImage = tempImage.substring(0, tempImagePos)
		 
			 var tempFirstNo = parseFloat(arSecondLayer[i].substring(arSecondLayer[i].length-4, arSecondLayer[i].length-2));
			 var tempSecondNo = parseFloat(arSecondLayer[i].substring(arSecondLayer[i].length-2, arSecondLayer[i].length));
			 
			 if (arLayerPos[parseInt(tempFirstNo-1)] != null)
			 {
				if (arSecondLayerPos[parseInt(tempFirstNo)][parseInt(tempSecondNo)] != null)
				{
					if (document.all){moveDivs(document.all[arSecondLayer[i]].style, arSecondLayerPos[parseInt(tempFirstNo)][parseInt(tempSecondNo)]);}
				 	if (document.layers){moveDivs(document.layers[arSecondLayer[i]], arSecondLayerPos[parseInt(tempFirstNo)][parseInt(tempSecondNo)]);}
				 	if (!document.all && document.getElementById) {moveDivs(document.getElementById(arSecondLayer[i]).style, arSecondLayerPos[parseInt(tempFirstNo)][parseInt(tempSecondNo)]);}	
				}
				else
				{
					if (document.all){moveDivs(document.all[arSecondLayer[i]].style, getDim(document.images[leftMenuName+arSecondLayer2[i]]).y);}
				 	if (document.layers){moveDivs(document.layers[arSecondLayer[i]], arLayerPos[parseInt(tempFirstNo-1)] + findHeightForLayer(document.layers[tempLayer].document, leftMenuName+arSecondLayer2[i]) - 1);}
				 	if (!document.all && document.getElementById) {moveDivs(document.getElementById(arSecondLayer[i]).style, document.images[leftMenuName+arSecondLayer2[i]].y);}	
				}
			 }
			 else
			 {
			 	if (document.all){moveDivs(document.all[arSecondLayer[i]].style, getDim(document.images[leftMenuName+arSecondLayer2[i]]).y);}
			 	if (document.layers){moveDivs(document.layers[arSecondLayer[i]], document.images[tempImage].y + findHeightForLayer(document.layers[tempLayer].document, leftMenuName+arSecondLayer2[i]) - 1);}
			 	if (!document.all && document.getElementById) {moveDivs(document.getElementById(arSecondLayer[i]).style, document.images[leftMenuName+arSecondLayer2[i]].y);}	
			 }
	}
} 

function doShowLayer(imgName, layerName)
{
	var tempLayerName = layerName.substring(0, (layerName.length-2))
	var tempLayer = "";
	var tempImage = "";
	var tempPath = "";
	if(subTopic != imgName && !firstLayerImagesFlag)
	{
		if(document.layers) //netscape 4.x version
		{
			tempLayer = document.layers[tempLayerName].document;
			tempImage = tempLayer.images[imgName];
//			tempImage.src=tempImage.src.replace(leftMenuSectionImageOut, leftMenuSectionImageOver)
		}
		else
		{
//			document.images[imgName].src=document.images[imgName].src.replace(leftMenuSectionImageOut, leftMenuSectionImageOver)
		}
		
		firstLayerImagesFlag = true;
	}
	if (!secondLayerFlag )
	{
		MM_showHideLayers(layerName,'','show');
		secondLayerFlag =true;
	}
	activeFirstLayerImageID = imgName
	activeSecondLayerID = layerName
}

function firstLayerMouseOver(imgName, layerName) 
{
	if (activeFirstLayerImageID == imgName && activeSecondLayerID == layerName)
	{
		if (secondLayerTimerID) clearTimeout(secondLayerTimerID);
		secondLayerTimerID = null;
	}
	else
	{
		if (secondLayerTimerID) clearTimeout(secondLayerTimerID);
		secondLayerTimerID = null;
		if (activeFirstLayerImageID!=""){doHideLayer(activeFirstLayerImageID, activeSecondLayerID);}
		doShowLayer(imgName, layerName)	
	}
}

function doHideLayer(imgName, layerName)
{
	var tempLayerName = layerName.substring(0, layerName.length-2)
	var tempLayer = "";
	var tempImage = "";

	if(subTopic != imgName)
	{
		if(document.layers) //netscape 4.x version
		{
			tempLayer = document.layers[tempLayerName].document;
			tempImage = tempLayer.images[imgName];
//			tempImage.src=tempImage.src.replace(leftMenuSectionImageOver, leftMenuSectionImageOut)
		}
		else
		{
//			document.images[imgName].src=document.images[imgName].src.replace(leftMenuSectionImageOver, leftMenuSectionImageOut)
		}
		
		firstLayerImagesFlag = false;
	}
	if (secondLayerFlag )
	{
		MM_showHideLayers(layerName,'','hide')
		secondLayerFlag =false;
	}
	activeFirstLayerImageID = "";
	activeSecondLayerID = "";
}

function firstLayerMouseOut(imgName, layerName) {
	
	if (activeFirstLayerImageID == imgName && activeSecondLayerID == layerName)
	{
		secondLayerTimerID = setTimeout("doHideLayer('"+imgName+"', '"+layerName+"')", 500);
	}
	else
	{
		doHideLayer(imgName, layerName);
	}
}

// -------------------------------------------------------------   End of Common Function for First Level Layers -----------------------------------------

// -------------------------------------------------------------    Common Function for Second Level Layers -----------------------------------------
function doShowSecondLayer(imgName, layerName)
{
	var tempLayerName = layerName.substring(0, (layerName.length-2))
	var tempLayer = "";
	var tempImage = "";
	var tempPath = "";
	if(subSubTopic != imgName && !secondLayerImagesFlag)
	{
		if(document.layers) //netscape 4.x version
		{
			tempLayer = document.layers[tempLayerName].document;
			tempImage = tempLayer.images[imgName];
//			tempImage.src=tempImage.src.replace(leftMenuSectionImageOut, leftMenuSectionImageOver)
		}
		else
		{
//			document.images[imgName].src=document.images[imgName].src.replace(leftMenuSectionImageOut, leftMenuSectionImageOver)
		}
		
		secondLayerImagesFlag = true;
	}
	if (!thirdLayerFlag )
	{
		MM_showHideLayers(layerName,'','show');
		thirdLayerFlag =true;
	}
	activeSecondLayerImageID = imgName
	activeThirdLayerID = layerName
}

function secondLayerMouseOver(imgName, layerName) 
{
	if (activeSecondLayerImageID == imgName && activeThirdLayerID == layerName)
	{
		if (thirdLayerTimerID) clearTimeout(thirdLayerTimerID);
		thirdLayerTimerID = null;
	}
	else
	{
		if (thirdLayerTimerID) clearTimeout(thirdLayerTimerID);
		thirdLayerTimerID = null;
		if (activeSecondLayerImageID!=""){doHideSecondLayer(activeSecondLayerImageID, activeThirdLayerID);}
		doShowSecondLayer(imgName, layerName)	
	}
}

function doHideSecondLayer(imgName, layerName)
{
	var tempLayerName = layerName.substring(0, layerName.length-2)
	var tempLayer = "";
	var tempImage = "";

	if(subSubTopic != imgName)
	{
		if(document.layers) //netscape 4.x version
		{
			tempLayer = document.layers[tempLayerName].document;
			tempImage = tempLayer.images[imgName];
//			tempImage.src=tempImage.src.replace(leftMenuSectionImageOver, leftMenuSectionImageOut)
		}
		else
		{
//			document.images[imgName].src=document.images[imgName].src.replace(leftMenuSectionImageOver, leftMenuSectionImageOut)
		}
		
		secondLayerImagesFlag = false;
	}
	if (thirdLayerFlag )
	{
		MM_showHideLayers(layerName,'','hide')
		thirdLayerFlag =false;
	}
	activeSecondLayerImageID = "";
	activeThirdLayerID = "";
}

function secondLayerMouseOut(imgName, layerName) {
	
	if (activeSecondLayerImageID == imgName && activeThirdLayerID == layerName)
	{
		thirdLayerTimerID = setTimeout("doHideSecondLayer('"+imgName+"', '"+layerName+"')", 500);
	}
	else
	{
		doHideSecondLayer(imgName, layerName);
	}
}

// -------------------------------------------------------------   End of Common Function for Second Level Layers -----------------------------------------


//print this page
function printPage(){
	if(location.href.toString().search('search.info.gov.hk')!=-1){
		window.open(document.URL+'?p=1','PrintPage','top=10,left=10,height=500,width=650,scrollbars=1');
	}else{
		window.open(document.location.pathname+'?p=1','PrintPage','top=10,left=10,height=500,width=650,scrollbars=1');
	}
}

function getTitle() {
	var scriptBuffer='';
	var scriptBuffer2='';
	
	scriptBuffer2+=sitetitle+' - '+title[selectedID];
	if(selectedSection!=0&&selectedSection!='') {
		scriptBuffer2+= ' - ' + subTitle[selectedID+1][selectedSection]
		if(selectedSubSection>0&&selectedSubSection!='') {
			scriptBuffer2+= ' - ' + subSubTitle[selectedID+1][selectedSection][selectedSubSection]
		}
	}
	
	scriptBuffer+='<title>'+scriptBuffer2+'</title>\n';
	scriptBuffer+='<meta name="Keywords" content="'+scriptBuffer2+'">';
	
	//alert(scriptBuffer);
	return scriptBuffer;	
}


//change to text only version
function textSwitch() {
	document.location = domain_url+ "/index.htm";
	if(location.href.toString().search('search.info.gov.hk') != -1){
		if (location.href.toString().search('mode=0') != -1) { //change to English version
			goPath=location.href.replace("mode=0", "mode=1");
		}
		if (location.href.toString().search('mode=0') != -1) { //change to traditional chinese version
			goPath=location.href.replace("mode=0", "mode=1");
		}
		document.location=goPath;
	}else{
	var arrayEle = new Array()
	arrayEle = document.location.pathname.split('/')
	document.location = 't_'+arrayEle[arrayEle.length-1]
	}
}

//switch language version
var chi_str = document.URL.toString(); 

if(chi_str.search('/gb/') != -1){ 
	chi_str = chi_str.substring( chi_str.indexOf('/gb/')+4, chi_str.length ); 
} 
else {
	chi_str = chi_str.substring( 7, chi_str.length ); 
}


function langSwitch(lang) {
var currentPath=location.href.toString();
var switchTc='/tc/';
var switchEn='/en/';
var switchSc='/sc/';

	if(lang=="graphic"){
		currentPath=currentPath.replace('/text', "");
	}else if(lang=="textonly"){
		currentPath=currentPath.replace(switchEn, '/text'+switchEn);
		currentPath=currentPath.replace(switchTc, '/text'+switchTc);
		currentPath=currentPath.replace(switchSc, '/text'+switchSc);
	}else if(lang=="tc"){
		currentPath=currentPath.replace(switchEn, switchTc);
		currentPath=currentPath.replace(switchSc, switchTc);
		//currentPath=currentPath.replace(gb_urlPath, "");
	}else if(lang=="sc"){
		currentPath=currentPath.replace(switchTc, switchSc);
		currentPath=currentPath.replace(switchEn, switchSc);
	}else if(lang=="en"){
		currentPath=currentPath.replace(switchTc, switchEn);
		currentPath=currentPath.replace(switchSc, switchEn);
		//currentPath=currentPath.replace(gb_urlPath, "");
	}
	location.href=currentPath;
}

function getheaderHTML()
{
	//check not textonly version
	if(document.URL.toString().search('/text/')==-1){
	
	document.writeln(getHeader());
	document.writeln('<table width="760" border="0" cellspacing="0" cellpadding="0">');
/*	document.writeln('<tr>');
	document.writeln('	<td height="116" colspan="2" align="left" valign="top" background="'+imgPath+'images/main_v_bg.jpg"><img src="'+imgPath+'images/main_v.jpg" border="0"></td>');
	document.writeln('</tr>');*/
	document.writeln('<tr>');
	document.writeln('	<td width="153" align="left" valign="top" background="'+imgPath+'images/nav_btn_bg.jpg">');
	document.writeln(getLeftMenu());
	document.writeln('	</td>');
	document.writeln('	<td width="607" align="left" valign="top">');
	document.writeln('		<table width="607" border="0" cellspacing="0" cellpadding="0">');
	document.writeln('		<tr>');
	document.writeln('			<td align="left" valign="top">');
	document.writeln('				<table width="607" border="0" cellspacing="0" cellpadding="0">');
	document.writeln('				<tr>');
	document.writeln('					<td align="left" valign="top"><img src="'+imgPath+'images/title2.jpg" width="260" height="126"></td>');
	document.writeln('					<td align="left" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="347" height="126"><param name="movie" value="'+imgPath+'images/title');
	if (selectedID<=8){
		document.write(selectedID);
	}else{
		document.write('0');
	}
	document.write('.swf"><param name="quality" value="high"><embed src="'+imgPath+'images/title');
	if (selectedID<=9){
		document.write(selectedID);
	}else{
		document.write('0');
	}
	document.writeln('.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="347" height="126"></embed></object></td>');
	document.writeln('				</tr>');
	document.writeln('				</table>');
	document.writeln('			</td>');
	document.writeln('		</tr>');
	document.writeln('		<tr>');
	document.writeln('			<td align="left" valign="top">');
	getTopic();
	document.writeln('			</td>');
	document.writeln('		</tr>');
	document.writeln('		<tr>');
	document.writeln('			<td align="left" valign="top">');
	document.writeln('				<table width="607" border="0" cellspacing="0" cellpadding="0">');
	document.writeln('				<tr>');
	document.writeln('					<td width="36" align="left" valign="top"><img src="'+imgPath+'images/spacer.gif" width="36" height="22"></td>');
	document.writeln('					<td width="547" align="left" valign="top"><img src="'+imgPath+'images/spacer.gif" width="547" height="22"></td>');
	document.writeln('					<td width="24" align="left" valign="top"><img src="'+imgPath+'images/spacer.gif" width="24" height="22"></td>');
	document.writeln('				</tr>');
	document.writeln('				<tr>');
	document.writeln('					<td align="left" valign="top">&nbsp;</td>');
	document.writeln('					<td align="left" valign="top">');
	
	}else{//istextonly version
		document.writeln('<table width="100%" border="0" cellspacing="2" cellpadding="2">');
		document.writeln('<tr><td>');
		document.writeln(getHeader());
		document.writeln('<hr>');
		document.writeln(getLeftMenu());
		document.writeln('<hr>');
		getTopic();
	}//check not textonly version
	SiteMap();
}
//generate common look & feel header
function getHeader(){
	//define the common background image path
	var bkImgPath=domain_url+'/images/bkgdtexture.gif';
	//define the language icon image path
	var textPath=domain_url+'/images/textonly.gif';
	var textOverPath=domain_url+'/images/textonly_over.gif';
	var lang1Path=domain_url+'/images/tc.gif';
	var lang1OverPath=domain_url+'/images/tc_over.gif';
	var lang2Path=domain_url+'/images/sc.gif';
	var lang2OverPath=domain_url+'/images/sc_over.gif';
	//set hyperlink for items
	var brandingLink=domain_url+'/index.html';
	var brandhkLink='javascript:externalLink(\'http://www.brandhk.gov.hk/brandhk/eindex.htm\')';
	var gicLink='javascript:externalLink(\'http://www.gov.hk/\')';
	var textLink='javascript:langSwitch(\'textonly\')';//domain_url+"/index.htm"; //Change to text only version //	var textLink='javascript:textSwitch()'; //Change to text only version
	var graphicLink='javascript:langSwitch(\'graphic\')'; //Graphic
	var SearchLang="";
	var SearchCharset="";

	if(document.URL.toString().search('/sc/')!=-1){
		var lang1Link='javascript:langSwitch(\'tc\')'; //Traditional Chinese
		var lang2Link='javascript:langSwitch(\'en\')'; //English
		//set alternate text for the items
		//var brandingAlt='冪撳煦昴摯源晞茠妀揭';
		var brandhkAlt='Brand Hong Kong';
		var gicAlt='GovHK 香港政府一站通';
		var textAlt='纯文字';
		var lang1Alt='繁体版';
		var lang2Alt='English';
		var searchAlt='搜寻';
		var sitemapAlt='网页指南';	
		var contactusAlt='联络我们';
		var graphicAlt='图像版';
		SearchLang="zh-cn";
		SearchCharset="gb";
	}else if(document.URL.toString().search('/tc/')!=-1 || document.URL.toString().search('mode=0')!=-1){
		var lang1Link='javascript:langSwitch(\'sc\')'; //Simplified Chinese
		var lang2Link='javascript:langSwitch(\'en\')'; //English
		//set alternate text for the items
		//var brandingAlt='經濟分析及方便營商處';
		var brandhkAlt='Brand Hong Kong';
		var gicAlt='GovHK 香港政府一站通';
		var textAlt='純文字';
		var lang1Alt='簡體版';
		var lang2Alt='English';
		var searchAlt='搜尋';
		var sitemapAlt='網頁指南';	
		var contactusAlt='聯絡我們';
		var graphicAlt='圖像版';
		SearchLang="zh-hk";
		SearchCharset="big5";
	}else{
		var lang1Link='javascript:langSwitch(\'tc\')'; //Traditional Chinese
		var lang2Link='javascript:langSwitch(\'sc\')'; //Simplified Chinese
		//set alternate text for the items
		//var brandingAlt='Economic Analysis and Business Facilitation Unit';
		var brandhkAlt='Brand Hong Kong';
		var gicAlt='GovHK 香港政府一站通';
		var textAlt='Text Only';
		var lang1Alt='Traditional Chinese';
		var lang2Alt='Simpilified Chinese';
		var searchAlt='Search';
		var sitemapAlt='Site Map';	
		var contactusAlt='Contact Us';
		var graphicAlt='Graphic Version';
		SearchLang="en";
		SearchCharset="iso-8859-1";
	}	
	var brandingAlt=sitetitle
	var searchLink='javascript:document.forms.search.submit()';
	var sitemapLink=langPath+'sitemap/index.htm';	
	var contactusLink=langPath+'contactus/index.htm';
	//generate the menu to the buffer variable
	var scriptBuffer='';
	
	//form hidden field add here
	var scriptFormBuffer='';
	scriptFormBuffer+='<form name="search" action="http://search.gov.hk/search.html" method="get">';
	scriptFormBuffer+='<INPUT name="exact_q" type="hidden" value="">';
	scriptFormBuffer+='<INPUT name="any_q" type="hidden" value="">';
	scriptFormBuffer+='<INPUT name="none_q" type="hidden" value="">';
	scriptFormBuffer+='<INPUT name="gp0" type="hidden" value="eabfu_home">';
	scriptFormBuffer+='<INPUT name="gp1" type="hidden" value="eabfu_home">';
	scriptFormBuffer+='<INPUT name="p_size" type="hidden" value="10">';
	scriptFormBuffer+='<INPUT name="doc_type" type="hidden" value="all">';
	scriptFormBuffer+='<INPUT name="last_mod" type="hidden" value="#-1">';
	scriptFormBuffer+='<INPUT name="ui_lang" type="hidden" value="'+SearchLang+'">';
	scriptFormBuffer+='<INPUT name="r_lang" type="hidden" value="all">';
	scriptFormBuffer+='<INPUT name="ui_charset" type="hidden" value="'+SearchCharset+'">';
	scriptFormBuffer+='<INPUT name="tpl_id" type="hidden" value="eabfu">';
	scriptFormBuffer+='<INPUT name="a_submit" type="hidden" value="false">';
	scriptFormBuffer+='<INPUT name="web" type="hidden" value="this">';
//	scriptFormBuffer+='<INPUT name="txtonly" type="hidden" value="0">';
	/*
	if(document.URL.toString().search('/sc/')!=-1){
		scriptFormBuffer+='<form name="search" action="http://sc.info.gov.hk/gb/search.info.gov.hk/cgi-bin/se.cgi" method="get">';
	} else {
		scriptFormBuffer+='<form name="search" action="http://search.info.gov.hk/cgi-bin/se.cgi" method="get">';
	}
	if(document.URL.toString().search('/tc/')!=-1 || document.URL.toString().search('/sc/')!=-1){
		scriptFormBuffer+='<input name=mode type=hidden value=0>';
	} else {
		scriptFormBuffer+='<input name=mode type=hidden value=1>';
	}
	scriptFormBuffer+='<input name=la type=hidden value=1>';
	scriptFormBuffer+='<input name=gr_1 type=hidden value="eabfu">';
	scriptFormBuffer+='<input name=ma type=hidden value=100>';
	scriptFormBuffer+='<input name=ft_1 type=hidden value="alltype">';
	scriptFormBuffer+='<input name=so type=hidden value=0>';
	scriptFormBuffer+='<input name=nu type=hidden value=10>';
	scriptFormBuffer+='<input name=ca type=hidden value=0>';
	scriptFormBuffer+='<input name=ta type=hidden value="all">';
	scriptFormBuffer+='<input name=fu type=hidden value="">';
	scriptFormBuffer+='<input name=fd type=hidden value="">';
	*/
	//form hidden field add here

	//check not textonly version
	if(document.URL.toString().search('/text/')==-1){
	
	scriptBuffer+='<table width="760" border="0" cellpadding="0" cellspacing="0" background="'+imgPath+'images/bkgdtexture.gif">';
	scriptBuffer+=scriptFormBuffer;
	scriptBuffer+='<tr align="left" valign="top">';
	scriptBuffer+='<td>';
	scriptBuffer+='<table border="0" cellpadding="0" cellspacing="0">';
	scriptBuffer+='<tr align="left" valign="top">';
	scriptBuffer+='<td>';
	scriptBuffer+='<td class="sidebar" background="'+imgPath+'images/bkgdtexture.gif"><a href="'+domain_url+'"><img src="'+imgPath+'images/branding.gif" alt="'+brandingAlt+'" title="'+brandingAlt+'" border="0"></a></td>';
	scriptBuffer+='<td><img src="'+imgPath+'images/spacer.gif" width="86" height="1" border="0"></td>';
	scriptBuffer+='<td background="'+imgPath+'images/bkgdtexture.gif" valign="bottom"><div align="right"><a href="'+brandhkLink+'"><img name="BrandHK" src="'+imgPath+'images/BrandHK.gif" border="0" alt="'+brandhkAlt+'"></a></div></td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='</table>';
	scriptBuffer+='</td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='<tr align="left" valign="top">';
	scriptBuffer+='<td>';
	scriptBuffer+='<table border="0" cellpadding="0" cellspacing="0">';
	scriptBuffer+='<tr align="left" valign="bottom">';
	scriptBuffer+='<td>';
	scriptBuffer+='<td background="'+imgPath+'images/bkgdtexture.gif"><a href="'+gicLink+'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar1\',\'\',\''+imgPath+'images/mainbar1_f2.gif\',1)" ><img name="mainbar1" src="'+imgPath+'images/mainbar1.gif" border="0" alt="'+gicAlt+'"></a></td>';
	scriptBuffer+='<td align="left"><a href="'+textLink+'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar2\',\'\',\''+imgPath+'images/mainbar2_f2.gif\',1)" ><img name="mainbar2" src="'+imgPath+'images/mainbar2.gif" border="0" alt="'+textAlt+'"></a></td>';
	scriptBuffer+='<td align="left"><a href="'+lang1Link+'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar3\',\'\',\''+imgPath+'images/mainbar3_f2.gif\',1)" ><img name="mainbar3" src="'+imgPath+'images/mainbar3.gif" border="0" title="'+lang1Alt+'" alt="'+lang1Alt+'"></a></td>';
	scriptBuffer+='<td align="left"><a href="'+lang2Link+'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar4\',\'\',\''+imgPath+'images/mainbar4_f2.gif\',1)" ><img name="mainbar4" src="'+imgPath+'images/mainbar4.gif" border="0" title="'+lang2Alt+'" alt="'+lang2Alt+'"></a></td>';
	scriptBuffer+='<td><img name="mainbar5" src="'+imgPath+'images/mainbar5.gif" border="0"></td>';
	scriptBuffer+='<td><img src="'+imgPath+'images/spacer.gif" width="40" height="20" border="0"></td>';
	scriptBuffer+='<td background="'+imgPath+'images/bkgdtexture.gif"><a href="'+searchLink+'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar6\',\'\',\''+imgPath+'images/mainbar6_f2.gif\',1)" ><img name="mainbar6" src="'+imgPath+'images/mainbar6.gif" border="0" alt="'+searchAlt+'"></a></td>';
	scriptBuffer+='<td background="'+imgPath+'images/bkgdtexture.gif" width="99">';
	scriptBuffer+='<div align="center">';
	scriptBuffer+='<INPUT name="txtonly" type="hidden" value="0"><input name="query" type="text" id="qu" size="12" class="search">';
//	scriptBuffer+='<input class="search" type="text" name="search" size="12">';
	scriptBuffer+='</div>';
	scriptBuffer+='</td>';
	scriptBuffer+='<td background="'+imgPath+'images/bkgdtexture.gif"><a href="'+searchLink+'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar8\',\'\',\''+imgPath+'images/mainbar8_f2.gif\',1)" ><img name="mainbar8" src="'+imgPath+'images/mainbar8.gif" border="0" alt="'+searchAlt+'"></a></td>';
	scriptBuffer+='<td background="'+imgPath+'images/bkgdtexture.gif"><a href="'+sitemapLink+'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar9\',\'\',\''+imgPath+'images/mainbar9_f2.gif\',1)" ><img name="mainbar9" src="'+imgPath+'images/mainbar9.gif" border="0" alt="'+sitemapAlt+'"></a></td>';
	scriptBuffer+='<td background="'+imgPath+'images/bkgdtexture.gif"><a href="'+contactusLink+'" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar10\',\'\',\''+imgPath+'images/mainbar10_f2.gif\',1)" ><img name="mainbar10" src="'+imgPath+'images/mainbar10.gif" border="0" alt="'+contactusAlt+'"></a></td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='</table>';
	scriptBuffer+='</td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='<tr align="left" valign="top" bgcolor="#BB3333">';
	scriptBuffer+='<td height="2"><img src="'+imgPath+'images/reddot.gif" width="1" height="1"></td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='</form>';
	scriptBuffer+='</table>';
//	scriptBuffer+='<img src="'+domain_url+'/images/top_view.jpg"><br>';
	}else{//textonly version
		scriptBuffer+='<p><b><a href="'+domain_url+'">'+brandingAlt+'</a></b></p>';
		scriptBuffer+='<table width="100%" border="0" cellpadding="0" cellspacing="0">';
		scriptBuffer+=scriptFormBuffer;
		scriptBuffer+='<tr><td>';
		scriptBuffer+='[<a href="'+gicLink+'">'+gicAlt+'</a>] ';
		scriptBuffer+='[<a href="'+graphicLink+'">'+graphicAlt+'</a>] ';
		scriptBuffer+='[<a href="'+lang1Link+'">'+lang1Alt+'</a>] ';
		scriptBuffer+='[<a href="'+lang2Link+'">'+lang2Alt+'</a>] ';
		scriptBuffer+='[<a href="'+searchLink+'">'+searchAlt+'</a>] <INPUT name="txtonly" type="hidden" value="0"><input name="query" type="text" id="qu" size="12" class="search"> ';
		scriptBuffer+='[<a href="'+sitemapLink+'">'+sitemapAlt+'</a>] ';
		scriptBuffer+='[<a href="'+contactusLink+'">'+contactusAlt+'</a>] ';
		scriptBuffer+='</td></tr>';
		scriptBuffer+='</form>';
		scriptBuffer+='</table>';
	
	}//check not textonly version
	
	return scriptBuffer;
}

function indexpage(){//print a bulletin sub section link

	if (selectedSection==0){
		document.writeln('<p><ul>\n');
		for (var i in SubLink[selectedID])		
			document.writeln('<li><a href="'+SubLink[selectedID][i]+'">'+subTitle[parseInt(selectedID)+1][i]+'</a><br><br>\n');
		document.writeln('</ul></p>\n');
		
	}
}

function SiteMap(){
	if(document.URL.toString().search('/sitemap/')!=-1){
		document.writeln('<table border="0" cellpadding="2" cellspacing="0"><tr><td>');
		document.writeln('<ul>');
		for (var i in MainLink){
			if (i<12){
				document.writeln('<li><a href="'+MainLink[i]+'">'+title[i]+'</a>');
				if (SubLink[i]!=null){
					document.writeln('<ul>');
					for (var k in SubLink[i]){
						document.writeln('<li><a href="'+SubLink[i][k]+'">'+subTitle[parseInt(i)+1][k]+'</a>');
						if (SubLink2[i][k]!=null){
							document.writeln('<ul>');
							for (var m in SubLink2[i][k]){
								document.writeln('<li><a href="'+SubLink2[i][k][m]+'">'+subSubTitle[parseInt(i)+1][k][m]+'</a>');
							}
							document.writeln('</ul>');
						}
					}
					document.writeln('</ul>');
				}
				document.writeln('</li><br><br>');
				//for insert the new section after the section 4
				if(i==4){
					tempcount=12;
					if(typeof(MainLink[tempcount])!="undefined"){
						document.writeln('<li><a href="'+MainLink[tempcount]+'">'+title[tempcount]+'</a>');
						document.writeln('</li><br><br>');
					}
				}
				//for insert the new section after the section 4
			}
		}
		document.writeln('</ul>');
		document.writeln('</td></tr></table>');
			
	}
}
//generate the left side menu
function getLeftMenu(){
	var scriptBuffer='';
	var isOver='';
	var iconNo = '';
	var title_image_alt = sitetitle;
	
	//check not textonly version
	if(document.URL.toString().search('/text/')==-1){
	
	scriptBuffer+='<table border="0" cellspacing="0" cellpadding="0">\n';
	scriptBuffer+='<tr>\n';
	scriptBuffer+='	<td><img src="'+imgPath+'images/title1.jpg" width="153" height="100" alt="'+title_image_alt+'" title="'+title_image_alt+'"></td>\n';
	scriptBuffer+='</tr>\n';
	scriptBuffer+='<tr>\n';
	scriptBuffer+='	<td><img src="'+imgPath+'images/branding-08.jpg" width="153" height="16"></td>\n';
	scriptBuffer+='</tr>\n';
	scriptBuffer+='<tr>\n';
	scriptBuffer+='	<td>&nbsp;</td>\n';
	scriptBuffer+='</tr>\n';
	for (var i in MainLink)
	{
		//alert(leftMenuName+i)
		//if (i<11){
			iconNo = parseInt(i) + 1;
			(iconNo<10)?iconNo='0'+iconNo:iconNo=iconNo;
			(selectedID==i)?isOver='_o':isOver='';
			if (selectedID==i){mainTopic=i;}
			scriptBuffer+='<tr><td><a href="'+MainLink[i]+'" onmouseout="leftMenuMouseOut(\''+i+'\')" onmouseover="leftMenuMouseOver(\''+i+'\')">';
			scriptBuffer+='<img src="'+imgPath+'images/btn_'+iconNo+isOver+'.jpg" name="'+leftMenuName+i+'" border="0" alt="'+title[i]+'" title="'+title[i]+'"></a></td></tr>\n';
			//for insert the new section after the section 4
			/*
			if(i==4){
				tempcount=11;
				iconNo = parseInt(tempcount) + 1;
				(iconNo<10)?iconNo='0'+iconNo:iconNo=iconNo;
				(selectedID==tempcount)?isOver='_o':isOver='';
				if (selectedID==tempcount){mainTopic=tempcount;}
				scriptBuffer+='<tr><td><a href="'+MainLink[tempcount]+'" onmouseout="leftMenuMouseOut(\''+tempcount+'\')" onmouseover="leftMenuMouseOver(\''+tempcount+'\')">';
				scriptBuffer+='<img src="'+imgPath+'images/btn_'+iconNo+isOver+'.jpg" name="'+leftMenuName+tempcount+'" border="0" alt="'+title[tempcount]+'" title="'+title[tempcount]+'"></a></td></tr>\n';
			}
			*/
			//for insert the new section
		//}
	}
	scriptBuffer+='</table>\n';
	
	}else{//istextonly version
	
		//mainmenu
		scriptBuffer+='<table border="0" cellspacing="0" cellpadding="2">\n';
		scriptBuffer+='<tr><td>';
		for (var i in MainLink){
			iconNo = parseInt(i) + 1;
			(iconNo<10)?iconNo='0'+iconNo:iconNo=iconNo;
			(selectedSection==i)?isOver='_o':isOver='';
			if(i!=selectedID){
				scriptBuffer+='[<a href="'+MainLink[i]+'">'+title[i]+'</a>]\n';
			}else{
				scriptBuffer+='['+title[i]+']\n';
			}
			/*for insert the new section after the section 4
			if (i<11){
				iconNo = parseInt(i) + 1;
				(iconNo<10)?iconNo='0'+iconNo:iconNo=iconNo;
				(selectedSection==i)?isOver='_o':isOver='';
				if(i!=selectedID){
					scriptBuffer+='[<a href="'+MainLink[i]+'">'+title[i]+'</a>]\n';
				}else{
					scriptBuffer+='['+title[i]+']\n';
				}
				//for insert the new section after the section 4
				if(i==4){
					tempcount=11;
					iconNo = parseInt(tempcount) + 1;
					(iconNo<10)?iconNo='0'+iconNo:iconNo=iconNo;
					if(tempcount!=selectedID){
						scriptBuffer+='[<a href="'+MainLink[tempcount]+'">'+title[tempcount]+'</a>]\n';
					}else{
						scriptBuffer+='['+title[tempcount]+']\n';
					}
				}
			}
			*/
		}
		scriptBuffer+='</td></tr>';
		scriptBuffer+='</table>\n';
		//mainmenu
	

		//submenu
		
		
		var TempSelectedID=selectedID+1;
		if (SubLink[selectedID]!=null){
			
			scriptBuffer+='<table border="0" cellspacing="0" cellpadding="2">\n';
			scriptBuffer+='<tr><td>';
		
		  	for (var k in SubLink[selectedID]){
		  		if(k!=selectedSection){
					scriptBuffer+='[<a href="'+SubLink[selectedID][k]+'">'+subTitle[TempSelectedID][k]+'</a>] ';
				}else{
					scriptBuffer+='['+subTitle[TempSelectedID][k]+'] ';
				}//end if
		  	}//end for
			
			scriptBuffer+='</td></tr>';
			scriptBuffer+='</table>\n';
		}
			
		
		//submenu
		
		//Sub Submenu
		if (SubLink[selectedID]!=null){
		
		scriptBuffer+='<table border="0" cellspacing="0" cellpadding="2">\n';
		scriptBuffer+='<tr><td>';
		if (SubLink2[selectedID]!=null){
			for (var l in SubLink2[selectedID][selectedSection]){
				if(l!=selectedSubSection){
					scriptBuffer+='[<a href="'+SubLink2[selectedID][selectedSection][l]+'">'+subSubTitle[TempSelectedID][selectedSection][l]+'</a>] ';
				}else{
					scriptBuffer+='['+subSubTitle[TempSelectedID][selectedSection][l]+'] ';
				}
			}
		}
		scriptBuffer+='</td></tr>';
		scriptBuffer+='</table>\n';
		
		}//Sub Submenu

		
	}//check not textonly version

	return scriptBuffer;
}

function getLayer()
{
	var scriptBuffer='';
	var isOver='';
	var iconNo = '';
	var subIconNo = '';
	
	//check not textonly version
	if(document.URL.toString().search('/text/')==-1){
	
	for (var j in MainLink)
	{
		if (SubLink[j]!=null)
		{
			
			//Start Layer
			iconNo = parseInt(j) + 1;
			(iconNo<10)?iconNo='0'+iconNo:iconNo=iconNo;
			arLayer[arLayer.length] = layerCommonName+iconNo;
			arLayer2[arLayer2.length] = j;
			
			if (document.layers)
			{document.writeln('<layer name="'+layerCommonName+iconNo+'" top=0 left='+(leftOffSet+147)+' width=180 height=58 visibility="hide" onMouseOver="leftMenuMouseOver(\''+j+'\')" onMouseOut="leftMenuMouseOut(\''+j+'\')">');}
			else
			{document.writeln('<div id="'+layerCommonName+iconNo+'" style="position:absolute; left:'+(leftOffSet+147)+'; top:0; width:180; height:58; z-index:2; visibility: hidden"> ');}
			
			//content for Layers
			document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0" onMouseOver="leftMenuMouseOver(\''+j+'\')" onMouseOut="leftMenuMouseOut(\''+j+'\')">');
			document.writeln('<tr valign=top>');
			document.writeln('	<td><img src="'+imgPath+'images/btn_lv1_top.jpg" border="0"></td>');
			document.writeln('</tr>');
			
			for (var k in SubLink[j])
			{
				(selectedSection==j && selectedSubSection==k)?isOver='_over':isOver='';
				subIconNo = parseInt(k);
				(subIconNo<10)?subIconNo='0'+subIconNo:subIconNo=subIconNo;
				if (selectedSection==j && selectedSubSection==k){subTopic=leftMenuName+j+'_'+k;}

				document.writeln('<tr valign=top>');
				document.writeln('	<td><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td align="left" width="100%" class="menu"><a href="'+SubLink[j][k]+'" onMouseOver="MM_swapImage(\''+leftMenuName+j+'_'+k+'\',\'\',\''+imgPath+'images/btn_lv1_'+iconNo+subIconNo+'_o.jpg\',1); firstLayerMouseOver(\''+leftMenuName+j+'_'+k+'\', \''+layerCommonName+iconNo+subIconNo+'\');" onMouseOut="MM_swapImgRestore(); firstLayerMouseOut(\''+leftMenuName+j+'_'+k+'\', \''+layerCommonName+iconNo+subIconNo+'\');"><img name="'+leftMenuName+j+'_'+k+'" src="'+imgPath+'images/btn_lv1_'+iconNo+subIconNo+'.jpg" alt="'+subTitle[parseInt(j)+1][k]+'" title="'+subTitle[parseInt(j)+1][k]+'" border="0"></a></td></tr></table></td>');
//				document.writeln('	<td bgcolor="#2365C3" onMouseover="this.style.backgroundColor=\'348FEA\',this.style.color=\'FFFFFF\';"  onMouseout="this.style.backgroundColor=\'2365C3\',this.style.color=\'B9CBE7\';"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td colspan="2"><img src="images/nav_sub_Line.gif" alt="'+subTitle[parseInt(j)+1][k]+'" height="1" border="0" name="'+leftMenuName+j+'_'+k+'"></td></tr><tr><td><img src="images/spacer.gif" width="5"	></td><td align="left" width="100%" ><a href="'+SubLink[j][k]+'" onMouseOver="firstLayerMouseOver(\''+leftMenuName+j+'_'+k+'\', \''+layerCommonName+iconNo+subIconNo+'\');"  onMouseOut="firstLayerMouseOut(\''+leftMenuName+j+'_'+k+'\', \''+layerCommonName+iconNo+subIconNo+'\');"><span style="color:#B9CBE7;text-decoration:none" onMouseover="this.style.color=\'FFFFFF\';" onMouseout="this.style.color=\'B9CBE7\';">'+subTitle[parseInt(j)+1][k]+'</span></a></td></tr></table></td>');

				document.writeln('</tr>');
			}
			document.writeln('<tr valign=top>');
			document.writeln('	<td><img src="'+imgPath+'images/btn_lv1_bottom.jpg" border="0"></td>');
			document.writeln('</tr>');
			document.writeln('</table>');
			
			//Close Layer
			if (document.layers)
			{document.writeln('</layer>');}
			else
			{document.writeln('</div>');}
		}
	}
	
	}//check not textonly version
	
	return scriptBuffer;
}

function getSecondLayer()
{
	var scriptBuffer='';
	var isOver='';
	var iconNo = '';
	var subIconNo = '';
	var subSubIconNo = '';
	
	//check not textonly version
	if(document.URL.toString().search('/text/')==-1){
	
	for (var j in MainLink)
	{
		if (SubLink[j]!=null)
		{
			
			//Start Layer
			iconNo = parseInt(j) + 1;
			(iconNo<10)?iconNo='0'+iconNo:iconNo=iconNo;
			
			for (var k in SubLink[j])
			{
				if (SubLink2[j][k]!=null)
				{
					subIconNo = parseInt(k);
					(subIconNo<10)?subIconNo='0'+subIconNo:subIconNo=subIconNo;
					arSecondLayer[arSecondLayer.length] = layerCommonName+iconNo+subIconNo;
					arSecondLayer2[arSecondLayer2.length] = j+'_'+k;
					
					if (document.layers)
					{document.writeln('<layer name='+layerCommonName+iconNo+subIconNo+' top=0 left='+(leftOffSet+350)+' width=120 height=58 visibility="hide" onMouseOver="leftMenuMouseOver(\''+j+'\');firstLayerMouseOver(\''+leftMenuName+j+'_'+k+'\', \''+layerCommonName+iconNo+subIconNo+'\');" onMouseOut="leftMenuMouseOut(\''+j+'\');firstLayerMouseOut(\''+leftMenuName+j+'_'+k+'\', \''+layerCommonName+iconNo+subIconNo+'\');">');}
					else
					{document.writeln('<div id="'+layerCommonName+iconNo+subIconNo+'" style="position:absolute; left:'+(leftOffSet+350)+'; top:0; width:120; height:58; z-index:2; visibility: hidden"> ');}
					
					//content for Layers
					document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0" onMouseOver="leftMenuMouseOver(\''+j+'\');firstLayerMouseOver(\''+leftMenuName+j+'_'+k+'\', \''+layerCommonName+iconNo+subIconNo+'\');" onMouseOut="leftMenuMouseOut(\''+j+'\');firstLayerMouseOut(\''+leftMenuName+j+'_'+k+'\', \''+layerCommonName+iconNo+subIconNo+'\');">');
					document.writeln('<tr valign=top>');
					document.writeln('	<td><img src="'+imgPath+'images/btn_lv2_top.jpg" border="0"></td>');
					document.writeln('</tr>');
					
					for (var l in SubLink2[j][k])
					{
						subSubIconNo = parseInt(l);
						(subSubIconNo<10)?subSubIconNo='0'+subSubIconNo:subSubIconNo=subSubIconNo;
						
						document.writeln('<tr valign=top>');
						document.writeln('	<td><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td width="100%" class="menu"><a href="'+SubLink2[j][k][l]+'" onMouseOver="MM_swapImage(\''+leftMenuName+j+'_'+k+'_'+l+'\',\'\',\''+imgPath+'images/btn_lv2_'+iconNo+subIconNo+subSubIconNo+'_o.jpg\',1); secondLayerMouseOver(\''+leftMenuName+j+'_'+k+'_'+l+'\', \''+layerCommonName+iconNo+subIconNo+subSubIconNo+'\');" onMouseOut="MM_swapImgRestore(); secondLayerMouseOut(\''+leftMenuName+j+'_'+k+'_'+l+'\', \''+layerCommonName+iconNo+subIconNo+subSubIconNo+'\');"><img name="'+leftMenuName+j+'_'+k+'_'+l+'" src="'+imgPath+'images/btn_lv2_'+iconNo+subIconNo+subSubIconNo+'.jpg" alt="'+subSubTitle[parseInt(j)+1][k][l]+'" border="0"></a></td></tr></table></td>');
//						document.writeln('	<td bgcolor="#2365C3" onMouseover="this.style.backgroundColor=\'348FEA\',this.style.color=\'FFFFFF\';smenuTitle'+parseInt(j)+"_"+k+l+'.style.color=\'ffffff\';"  onMouseout="this.style.backgroundColor=\'2365C3\',this.style.color=\'B9CBE7\';smenuTitle'+parseInt(j)+"_"+k+l+'.style.color=\'B9CBE7\';"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td colspan="3" width="100%" background="images/nav_sub_Line.gif"><img src="images/nav_sub_Line.gif" alt="'+subSubTitle[parseInt(j)+1][k][l]+'" border="0" name="'+leftMenuName+j+'_'+k+'_'+l+'" width="180"></td></tr><tr><td><img src="images/spacer.gif" width="5"></td><td width="100%" class="menu"><a href="'+SubLink2[j][k][l]+'" onMouseOver="secondLayerMouseOver(\''+leftMenuName+j+'_'+k+'_'+l+'\', \''+layerCommonName+iconNo+subIconNo+subSubIconNo+'\');"  onMouseOut="secondLayerMouseOut(\''+leftMenuName+j+'_'+k+'_'+l+'\', \''+layerCommonName+iconNo+subIconNo+subSubIconNo+'\');"><span style="color:#B9CBE7;font-family:Verdana; text-decoration:none"  onMouseover="this.style.color=\'FFFFFF\';" onMouseout="this.style.color=\'B9CBE7\';" name="smenuTitle'+parseInt(j)+"_"+k+l+'"  id="smenuTitle'+parseInt(j)+"_"+k+l+'">'+subSubTitle[parseInt(j)+1][k][l]+'</span></a></td></tr></table></td>');
						document.writeln('</tr>');
					}
					document.writeln('<tr valign=top>');
					document.writeln('	<td><img src="'+imgPath+'images/btn_lv2_bottom.jpg" border="0"></td>');
					document.writeln('</tr>');
					document.writeln('</table>');		
			
					//Close Layer
					if (document.layers)
					{document.writeln('</layer>');}
					else
					{document.writeln('</div>');}
				}
			}
		}
	}
	
	
	}//check not textonly version
	
	return scriptBuffer;
}

function getTopic()
{
	/*
	if(document.URL.toString().search('/en/')!=-1){
		var sitemapAlt='Site Map';
	}else if(document.URL.toString().search('/sc/')!=-1){
		var sitemapAlt='厙珜硌鰍';
	}else{
		var sitemapAlt='網頁指南';
	}
	*/
	//check not textonly version
	if(document.URL.toString().search('/text/')==-1){
	
	document.writeln('<table width="607" border="0" cellspacing="0" cellpadding="0">');
	document.writeln('<tr>');
	document.writeln('	<td width="21" height="31" rowspan="3" align="left" valign="top"><img src="'+imgPath+'images/spacer.gif" width="21" height="31" border="0"></td>');
	document.writeln('	<td height="14" align="left" valign="top" colspan="2">');
	/*if(document.URL.toString().search('/sitemap/')!=-1){
		document.writeln('	<IMG src="'+imgPath+'images/heading10.jpg" alt="'+sitemapAlt+'" title="'+sitemapAlt+'" border="0">');
		*/
		//document.writeln('<b>'+sitemapAlt+'</b>');
	//}else{
		document.writeln('	<IMG src="'+imgPath+'images/heading'+selectedID+'.jpg" alt="'+title[selectedID]+'" title="'+title[selectedID]+'" border="0">');
	//}
	document.writeln('</td>');
	document.writeln('</tr>');
	document.writeln('<tr>');
	document.writeln('	<td height="3" align="left" valign="top" colspan="2"><IMG src="'+imgPath+'images/title_line.jpg" ALT="" border="0"></td>');
	document.writeln('</tr>');
	document.writeln('<tr>');
	document.writeln('	<td align="left" valign="top" colspan="2"><IMG src="'+imgPath+'images/title_line_left.jpg" ALT="" border="0">');
	
	if (typeof(subTitle[parseInt(selectedID)+1]) !='undefined'){
		if (typeof(subTitle[parseInt(selectedID)+1][selectedSection]) !='undefined'){
			if (subSubTitle[parseInt(selectedID)+1].length>1){
				if (subSubTitle[parseInt(selectedID)+1][selectedSection].length>1){
					//alert(subTitle[parseInt(selectedID)+1][selectedSection].length);
					if (typeof(subSubTitle[parseInt(selectedID)+1][selectedSection][selectedSubSection]) !='undefined'){
						document.write('<a href="'+SubLink[selectedID][selectedSection]+'"><IMG src="'+imgPath+'images/sub_title_0'+(parseInt(selectedID)+1)+'_0'+selectedSection+'.jpg" title="'+subTitle[parseInt(selectedID)+1][selectedSection]+'" ALT="'+subTitle[parseInt(selectedID)+1][selectedSection]+'" border="0"></a>');
						document.write('<img src="'+imgPath+'images/sub_title_arr.jpg" border="0" title="&gt;" alt="&gt;"><img src="'+imgPath+'images/sub_title_0'+(parseInt(selectedID)+1)+'_0'+selectedSection+'_0'+selectedSubSection+'.jpg" border="0" title="'+subSubTitle[parseInt(selectedID)+1][selectedSection][selectedSubSection]+'" alt="'+subSubTitle[parseInt(selectedID)+1][selectedSection][selectedSubSection]+'">');
					}else{
						document.write('<IMG src="'+imgPath+'images/sub_title_0'+(parseInt(selectedID)+1)+'_0'+selectedSection+'.jpg" title="'+subTitle[parseInt(selectedID)+1][selectedSection]+'" ALT="'+subTitle[parseInt(selectedID)+1][selectedSection]+'" border="0">');
					}
				}else{
					document.write('<IMG src="'+imgPath+'images/sub_title_0'+(parseInt(selectedID)+1)+'_0'+selectedSection+'.jpg" title="'+subTitle[parseInt(selectedID)+1][selectedSection]+'" ALT="'+subTitle[parseInt(selectedID)+1][selectedSection]+'" border="0">');
				}
			}else{
				document.write('<IMG src="'+imgPath+'images/sub_title_0'+(parseInt(selectedID)+1)+'_0'+selectedSection+'.jpg" title="'+subTitle[parseInt(selectedID)+1][selectedSection]+'" ALT="'+subTitle[parseInt(selectedID)+1][selectedSection]+'" border="0">');
			}
		}else{
			document.write('&nbsp;');
		}
	}else{
		document.write('&nbsp;');
	}
	document.write('</td>');
	document.writeln('</tr>');
	document.writeln('</table>');
	
	}else{//istextonly version
		var TempSelectedID=selectedID + 1;
		if(document.URL.toString().search('/sitemap/')!=-1){//check sitemap
			document.writeln('<b>'+title[selectedID]+'</b>');
		}else{
			if (SubLink[selectedID]!=null && selectedSection!=0) {//check main
				document.writeln('<p><a href="'+MainLink[selectedID]+'">'+title[selectedID]+'</a>');

				if (SubLink2[selectedID].length > 1){//check SubLink2
					if (SubLink2[selectedID][selectedSection]!=null && selectedSubSection!=0){
				
						document.writeln(' > <a href="'+SubLink[selectedID][selectedSection]+'">'+subTitle[TempSelectedID][selectedSection]+'</a>');
						if (SubLink2[selectedID][selectedSection][selectedSubSection]!=null) {
							document.writeln(' > '+subSubTitle[TempSelectedID][selectedSection][selectedSubSection]+'</p>');
						}else{
							document.writeln('</p>');
						}
				
					}else{
						document.writeln(' > <b>'+subTitle[TempSelectedID][selectedSection]+'</b></p>');
					}
			
				}else{
					document.writeln(' > <b>'+subTitle[TempSelectedID][selectedSection]+'</b></p>');
				}//end check SubLink2
			}else{
				document.writeln('<p><b>'+title[selectedID]+'</b></p>');
			}//end check main
		

		}//end check sitemap
		
	}//check not textonly version
}

//generate the current topic
function getCurrentTopic(){
	//set image path for the topics
	var imagePath=domain_url+'/images/topic/'
	var topicPath = new Array();
	topicPath[1]='title02';
	topicPath[2]='title03';
	topicPath[3]='title04';
	topicPath[4]='title05';
	topicPath[5]='title06';
	topicPath[6]='title07';
	topicPath[7]='title08';
	topicPath[8]='title09';
	topicPath[9]='title10';
	topicPath[10]='title11';
	topicPath[11]='title12';
	topicPath[12]='title13';
	topicPath[13]='title14';
	//generate the topic image to the buffer variable
	var scriptBuffer='';
	var altTitle='';
	if(selectedSubSection != 0){
		if (selectedSubSection < 10){
			imagePath = imagePath+topicPath[selectedSection] + '_0' + selectedSubSection;
		}else{
			imagePath = imagePath+topicPath[selectedSection] + '_' + selectedSubSection;
		}

		if (subLevelSection > 0){
			if (subLevelSection < 10){
				imagePath = imagePath + '_0' + subLevelSection;
			}else{
				imagePath = imagePath + '_' + subLevelSection;	
			}

		altTitle = subTitle[selectedSection+1][selectedSubSection]+' > '+subSubTitle[selectedSection+1][selectedSubSection][subLevelSection];			

		}else{
			altTitle = title[selectedSection]+' > '+subTitle[selectedSection+1][selectedSubSection];
		}

	}else{
		imagePath = imagePath+topicPath[selectedSection];
		altTitle = title[selectedSection];
	}
	
	scriptBuffer+='<a name="top"></a>';
	scriptBuffer+='<img src="'+imagePath+'.gif" alt="'+altTitle+'">'
	return scriptBuffer;
}

function getPrintButton() {
	var scriptBuffer='';
//	scriptBuffer+='<a href="javascript:printPage();"><img src="'+domain_url+'/images/common/but_print.gif" alt="Print This Page" border="0"></a>';
	if(p==0)
	scriptBuffer+='<a href="javascript:printPage();" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btnprint\',\'\',\'images/btn_print_over.gif\',1)"><img src="images/btn_print.gif" name="btnprint" alt="Print This Page" border="0"></a>';
	return scriptBuffer;
}


//generate the page footer to show the notices and revision date
function getFooter() {
	var copyYear='2007';
	var noticesLink=langPath+'notice/index.htm';
	//alert(noticesLink);
	if (revisionDate==''||revisionDate=='MM/DD/YYYY') revisionDate='03/25/2011';
	var reDate=new Date(Date.parse(revisionDate))
	
	//set language format
	if(document.URL.toString().search('/en/')!=-1){
		var txtLastRevisionDate='Last revision date: ';
		var txtImportantNotices='Important notices';
		var monthArray=new Array();
		monthArray[0]='January';
		monthArray[1]='February';
		monthArray[2]='March';
		monthArray[3]='April';
		monthArray[4]='May';
		monthArray[5]='June';
		monthArray[6]='July';
		monthArray[7]='August';
		monthArray[8]='September';
		monthArray[9]='October';
		monthArray[10]='November';
		monthArray[11]='December';
		var showDate=reDate.getDate()+' '+monthArray[reDate.getMonth()]+' '+reDate.getFullYear();
	}else if(document.URL.toString().search('/sc/')!=-1){
		var txtLastRevisionDate='修订日期';
		var txtImportantNotices='重要告示';
		var showMonth=reDate.getMonth()+1;
		var showDate=reDate.getFullYear()+'年'+showMonth+'月'+reDate.getDate()+'日';
	}else{
		var txtLastRevisionDate='修訂日期:';
		var txtImportantNotices='重要告示';
		var showMonth=reDate.getMonth()+1;
		var showDate=reDate.getFullYear()+'年'+showMonth+'月'+reDate.getDate()+'日';
	}
	//generate the topic image to the buffer variable
	var scriptBuffer='';
	
	//check not textonly version
	if(document.URL.toString().search('/text/')==-1){
	
	scriptBuffer+='<table width="100%" border="0" cellspacing="0" cellpadding="0">';
	
	if(!p) {
		scriptBuffer+='<tr>';
		scriptBuffer+='<td colspan="2" align="right" class="footer">'; 

		if (selectedSubSection != 0) {
			var thisLink;
			thisLink = '';
			if (selectedSubSubSection > 0 ) {
				thisLink = 'javascript: history.go(-1);';
			}else if (isArrayContain(document.location.pathname)){
				thisLink = MainLink[selectedID];
			}else {
				thisLink = SubLink[selectedID][selectedSection];
			}
			
			if((selectedSection==2)&&(selectedSubSection==2)&&(subLevelSection==2))
				thisLink = '/about_us/organization/responsibilities/major.htm';
			
			if((selectedSection==2)&&(selectedSubSection==2)&&(subLevelSection==1)&&(selectedSubSubSection==1))
				thisLink = '/about_us/organization/orgainzation_chart/chart.htm';
				
			if((selectedSection==5)&&(selectedSubSection==2)&&(subLevelSection==2)&&(selectedSubSubSection==1))
				thisLink = '/public_services/community_halls_centres/ccch.htm';
	
			if (vLink != '') {
				thisLink = vLink;
			}
			
//			scriptBuffer+='<a href="'+thisLink+'"><img src="'+domain_url+'/images/common/but_back.gif" border=0 align=top alt="Back"></a>&nbsp;&nbsp;&nbsp;';
		}
		if((selectedSection==1)&&(selectedSubSection==0)){
			thisLink = MainLink[selectedSection];
//			scriptBuffer+='<a href="'+thisLink+'"><img src="'+domain_url+'/images/common/but_back.gif" border=0 align=top alt="Back"></a>&nbsp;&nbsp;&nbsp;';
		}
//		scriptBuffer+='<a href="#"><img src="'+domain_url+'/images/common/but_top.gif" border=0 align=top alt="Top"></a></td>';
		scriptBuffer+='</tr>';
	}
	scriptBuffer+='<tr>';
	scriptBuffer+='<td colspan="2"><img src="'+imgPath+'images/spacer.gif" width="16" height="16"></td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='<tr>';
	scriptBuffer+='<td colspan="2" background="'+imgPath+'images/botdot.jpg"><img src="'+imgPath+'images/botdot.jpg"></td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='<tr>';
	scriptBuffer+='<td colspan="2"><img src="'+imgPath+'images/spacer.gif" width="1" height="4"></td>';
	scriptBuffer+='</tr>';
	scriptBuffer+='<tr>';
	scriptBuffer+='<td class="footer" align="left">&nbsp;'+copyYear+'<img src="'+imgPath+'images/copy.gif" align="absmiddle"> | <a href="'+noticesLink+'" class="notices">'+txtImportantNotices+'</a></td>';
	scriptBuffer+='<td align="right" class="reDate"><div align=right>'+txtLastRevisionDate+showDate+'&nbsp;</div></td>';
	scriptBuffer+='</tr>';
/*	scriptBuffer+='<tr>';
	scriptBuffer+='<td colspan="2"><img src="'+imgPath+'images/spacer.gif" width="1" height="16"></td>';
	scriptBuffer+='</tr>';*/
	scriptBuffer+='</table>';
	
	}else{// istextonly version
	
		scriptBuffer+='<table width="100%" border="0" cellspacing="0" cellpadding="0">';
		scriptBuffer+='<tr>';
		scriptBuffer+='<td>'+copyYear+' | <a href="'+noticesLink+'" class="notices">'+txtImportantNotices+'</a></td><td align="right"><div align=right>'+txtLastRevisionDate+showDate+'</div></td>';
		scriptBuffer+='</tr>';
		scriptBuffer+='</table>';
	
	}//check not textonly version
	
	return scriptBuffer;
}

function PdfReader(){
	
	var scriptBuffer='';
	var PdfText='';
	var PdfLogoAlt='';
	var PdfLogo='';
	var checker=false;
	var CheckPdfSection = new Array();
	CheckPdfSection[3]  = new Array();
	CheckPdfSection[3][1]  = true;
	CheckPdfSection[3][5]  = new Array();
	CheckPdfSection[3][5][0] = false;
	CheckPdfSection[3][5][1] = true;
	CheckPdfSection[3][5][2] = true;
	CheckPdfSection[3][5][3] = true;
	CheckPdfSection[3][5][4] = true;
	
	CheckPdfSection[6]  = true;
	
	
	if (typeof(CheckPdfSection[selectedID]) !='undefined'){
		if (CheckPdfSection[selectedID].length>1){
			if (typeof(CheckPdfSection[selectedID][selectedSection]) !='undefined'){
				if (CheckPdfSection[selectedID][selectedSection]){
					checker=true;
				}
				if (CheckPdfSection[selectedID][selectedSection].length>1){
					if (typeof(CheckPdfSection[selectedID][selectedSection][selectedSubSection]) !='undefined'){
						
						//check isTrue add content here
						if (CheckPdfSection[selectedID][selectedSection][selectedSubSection]){
							checker=true;
						}else{
							checker=false;
						}
						//check isTrue add content
						
					}//check defind 3-lv
				}//check length 2-lv
			} //check defind 2-lv
		}else{
			if(CheckPdfSection[selectedID]){
				checker=true;
			}
		}//check length 1-lv
	}//check defind 1-lv
		
	
	if (checker){
	if(document.URL.toString().search('/en/')!=-1){
		PdfText='To view the above document, you need to use an Adobe Acrobat Reader. Please click <a href="http://www.adobe.com/products/acrobat/readstep2.html" target="_blank">here</a> to download the latest version and install the <a href="http://www.adobe.com/products/acrobat/acrrasianfontpack.html" target="_blank">Asian Font Pack</a> if necessary.';
		PdfLogoAlt='Get Adobe Acrobat Reader';
	}else if(document.URL.toString().search('/sc/')!=-1){
		PdfText='以上文件以PDF 格式储存，你需要使用Adobe Acrobat Reader 来阅览。如需安装，可按<a href="http://www.chinese-t.adobe.com/products/acrobat/readstep2.html?c=hk" target="_blank">森揭</a> 狟婥蜆璃摯<a href="http://www.chinese-t.adobe.com/products/acrobat/acrrasianfontpack.html?c=hk">捚粔趼倰杶璃</a> ﹝';
		PdfLogoAlt='假蚾 Acrobat Reader';
	}else{
		PdfText='以上文件以PDF 格式儲存，你需要使用Adobe Acrobat Reader 來閱覽。如需安裝，可按<a href="http://www.chinese-t.adobe.com/products/acrobat/readstep2.html?c=hk" target="_blank">此處</a> 下載該軟件及其<a href="http://www.chinese-t.adobe.com/products/acrobat/acrrasianfontpack.html?c=hk">亞洲字型套件</a> 。';
		PdfLogoAlt='安裝 Acrobat Reader';
	}
	//check not textonly version
	if(document.URL.toString().search('/text/')==-1){
		PdfLogo='<img src="'+domain_url+'/images/pdficon.gif" width="88" height="31" border="0" title="'+PdfLogoAlt+'" alt="'+PdfLogoAlt+'">';
	}else{//istextonly version
		PdfLogo=PdfLogoAlt;
	}
	scriptBuffer+='<table border="0" cellpadding="2" cellspacing="0" width="100%">';
	scriptBuffer+='<tr><td><a href="http://www.adobe.com/products/acrobat/readstep2.html" target="_blank">'+PdfLogo+'</a></td><td>';
	scriptBuffer+=PdfText;
	scriptBuffer+='</td></tr>';
	scriptBuffer+='</table>';
	}
	
	return scriptBuffer;
}
function PdfReader2(){
	
	var scriptBuffer='';
	var PdfText='';
	var PdfLogoAlt='';
	var PdfLogo='';

	if(document.URL.toString().search('/en/')!=-1){
		PdfText='To view the above document, you need to use an Adobe Acrobat Reader. Please click <a href="http://www.adobe.com/products/acrobat/readstep2.html" target="_blank">here</a> to download the latest version and install the <a href="http://www.adobe.com/products/acrobat/acrrasianfontpack.html" target="_blank">Asian Font Pack</a> if necessary.';
		PdfLogoAlt='Get Adobe Acrobat Reader';
	}else if(document.URL.toString().search('/sc/')!=-1){
		PdfText='以上文件以PDF 格式储存，你需要使用Adobe Acrobat Reader 来阅览。如需安装，可按<a href="http://www.chinese-t.adobe.com/products/acrobat/readstep2.html?c=hk" target="_blank">森揭</a> 狟婥蜆璃摯<a href="http://www.chinese-t.adobe.com/products/acrobat/acrrasianfontpack.html?c=hk">捚粔趼倰杶璃</a> ﹝';
		PdfLogoAlt='假蚾 Acrobat Reader';
	}else{
		PdfText='以上文件以PDF 格式儲存，你需要使用Adobe Acrobat Reader 來閱覽。如需安裝，可按<a href="http://www.chinese-t.adobe.com/products/acrobat/readstep2.html?c=hk" target="_blank">此處</a> 下載該軟件及其<a href="http://www.chinese-t.adobe.com/products/acrobat/acrrasianfontpack.html?c=hk">亞洲字型套件</a> 。';
		PdfLogoAlt='安裝 Acrobat Reader';
	}
	//check not textonly version
	if(document.URL.toString().search('/text/')==-1){
		PdfLogo='<img src="'+domain_url+'/images/pdficon.gif" width="88" height="31" border="0" title="'+PdfLogoAlt+'" alt="'+PdfLogoAlt+'">';
	}else{//istextonly version
		PdfLogo=PdfLogoAlt;
	}
	scriptBuffer+='<table border="0" cellpadding="2" cellspacing="0" width="100%">';
	scriptBuffer+='<tr><td><a href="http://www.adobe.com/products/acrobat/readstep2.html" target="_blank">'+PdfLogo+'</a></td><td>';
	scriptBuffer+=PdfText;
	scriptBuffer+='</td></tr>';
	scriptBuffer+='</table>';
	
	//alert(scriptBuffer);
	document.writeln(scriptBuffer);
}
function GenTopid(){
	for (i=1; i<100; i++){
		if (document.getElementById('Image'+i)==null){
			//alert(i);
			return 'Image'+i
		}
	}
}
function Back_gotoTop(type)
{
	//type 2 = back + gotoTop, type 1 = gotoTop
	if(document.URL.toString().search('/sc/')!=-1){
		var backalt='上一页';
		var topalt='回页首';
	}else if(document.URL.toString().search('/tc/')!=-1){
		var backalt='上一頁';
		var topalt='回頁首';
	}else{
		var backalt='Back';
		var topalt='Top^';
	}
	
	GenTopidtxt=GenTopid();
	
	//check not textonly version
	if(document.URL.toString().search('/text/')==-1){
		document.writeln('	        <table border="0" cellpadding="0" cellspacing="0" width="100%">');
		document.writeln('	        	<tr valign="middle">');
		if (type == 2){
			document.writeln('	        		<td align="left"><!-- <div align="right"> --><a href="javascript:history.go(-1);" onMouseOver="MM_swapImage(\'back\',\'\',\''+imgPath+'images/btn_back_o.jpg\',1)" onMouseOut="MM_swapImgRestore()"><img src="'+imgPath+'images/btn_back.jpg" id="back" alt="'+backalt+'" title="'+backalt+'" border="0"></a><!-- </div> --></td>');
		}
		document.writeln('	        		<td align="right"><div align="right"><a href="#top" onMouseOver="MM_swapImage(\''+GenTopidtxt+'\',\'\',\''+imgPath+'images/btn_top_o.jpg\',1)" onMouseOut="MM_swapImgRestore()"><img src="'+imgPath+'images/btn_top.jpg" id="'+GenTopidtxt+'" alt="'+topalt+'" title="'+topalt+'" border="0"></a></div></td>');
		document.writeln('	        	</tr>');
		document.writeln('	        </table>');
	}else{//is textonly version
		document.writeln('	<table border="0" cellpadding="2" cellspacing="2" width="100%">');
		document.writeln('		<tr valign="middle">');
		if (type == 2){
			document.writeln('		<td><a href="javascript:history.go(-1);">'+backalt+'</a></td>');
		}
		document.writeln('		<td align="right"><div align="right"><a href="#top">'+topalt+'</a></td></div></tr>');
		document.writeln('	</table>');
	}
}

function getfooterHTML()
{
	//check not textonly version
	if(document.URL.toString().search('/text/')==-1){
	
		document.writeln(PdfReader());
		document.writeln('		        	</td>');
		document.writeln('		        	<td align="left" valign="top">&nbsp;</td>');
		document.writeln('		        </tr>');
		document.writeln('		        </table>');
		document.writeln('			</td>');
		document.writeln('      </tr>');
		document.writeln('      <tr>');
		document.writeln('	        <td valign="top">');
		Back_gotoTop(2);
		document.writeln('	        </td>');
		document.writeln('      <tr>');
		document.writeln('      <tr>');
		document.writeln('	        <td align="center" valign="top">');
		document.writeln(getFooter());
		/*document.writeln('				<!-- Footer begin -->');
		document.writeln('				<table width="607" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">');
		document.writeln('				<tr>');
		document.writeln('		            <td width="5" height="2"><img src="'+imgPath+'images/shim.gif" width="1" height="1"></td>');
		document.writeln('		            <td align="left" valign="top" height="3" colspan="2"><img src="'+imgPath+'images/botdot.jpg" width="602" height="3"></td>');
		document.writeln('		            <td width="1"></td>');
		document.writeln('				</tr>');
		document.writeln('				<tr>');
		document.writeln('		            <td width="5" height="15"><img src="'+imgPath+'images/shim.gif" width="1" height="1"></td>');
		document.writeln('		            <td height="15" width="301" bgcolor="#FFFFFF"><font size="-1"><b>2007</b> <img src="'+imgPath+'images/copy.gif" alt="Copyright" width="12" height="11">| <b><a href="#">Important notices</a></b></font></td>');
		document.writeln('		            <td height="15" width="301" bgcolor="#FFFFFF"><div align="right"><font size="-1">Last revision date:&lt;insert date here&gt;</font></div></td>');
		document.writeln('		            <td width="1" height="15"></td>');
		document.writeln('				</tr>');
		document.writeln('				</table>');
		document.writeln('				<!-- Footer end -->');*/
		document.writeln('			</td>');
		document.writeln('		</tr>');
		document.writeln('		</table>');
		document.writeln('	</td>');
		document.writeln('</tr>');
		document.writeln('</table>');
	
	}else{//istextonly version
		document.writeln(PdfReader());
		Back_gotoTop(2);
		document.writeln('<hr>');
		document.writeln(getFooter());
		
		document.writeln('</td></tr>');
		document.writeln('</table>');

	}//check not textonly version
}

function isArrayContain(sLink) {
	for (var i in SubLink[selectedSection]){
		if (SubLink[selectedSection][i].indexOf(sLink)!=-1) {
			return true;
		}
	}
	return false;
}


function getSubSectionList() {
	var scriptBuffer;
	var bulletPath;
	bulletPath = 'images/bullet_1.gif';
	
	scriptBuffer = '';
	scriptBuffer+='<table cellspacing="0" cellpadding="0" border="0" width="100%">';
	if (selectedSubSection==0){
		for (i=1; i<SubLink[selectedSection].length;i++ ) {
			scriptBuffer+='<tr>';
			scriptBuffer+='<td width="10%" align="right" valign="top"><img src="'+bulletPath+'" border=0 align=middle alt="*">&nbsp;&nbsp;&nbsp;</td>';
			scriptBuffer+='<td width="90%" align="left" valign="top"><a href="'+SubLink[selectedSection][i]+'">'+subTitle[selectedSection+1][i]+'</a><br><br></td>';
			scriptBuffer+='</tr>';
		}
	} else {
		for (i=1; i<SubLink2[selectedSection][selectedSubSection].length;i++ ) {
			scriptBuffer+='<tr>';
			scriptBuffer+='<td width="10%" align="right" valign="top"><img src="'+bulletPath+'" border=0 align=middle alt="*">&nbsp;&nbsp;&nbsp;</td>';
			scriptBuffer+='<td width="90%" align="left" valign="top"><a href="'+SubLink2[selectedSection][selectedSubSection][i]+'">'+subSubTitle[selectedSection+1][selectedSubSection][i]+'</a><br><Br></td>';
			scriptBuffer+='</tr>';
		}
	}
	scriptBuffer+='</table>';
	return scriptBuffer;
}


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=760,height=580')");
	if ( nw.focus != null)
	{nw.focus();}
}

function documentPopUp(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=800,height=300')");
	if ( nw.focus != null)
	{nw.focus();}
}

function setVistorTopPos(){
	if(!isNS4){
		document.getElementById('rightMenuTop').style.visibility = "visible";
		document.getElementById('rightMenuTop').style.left=getDim(document.images.ptest).x;
	}
}

function changeSubBg(obj){
}

function restoreSubBg(obj){
}


function changeSubSubBg(obj){
}

function restoreSubSubBg(obj){
}

//Dreamweaver Code
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function PopWin(url, x, y, w, h){
	url = domain_url + url;
    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();
    }
}

function customPreload(pageType){
	if(pageType==0)
		MM_preloadImages('images/spacer.gif','images/spacer_over.gif','images/nav_sub_Line.gif','images/nav_sub_Line_over.gif','images/top_view.jpg','images/btn_01.gif' ,'images/btn_01_over.gif' ,'images/btn_02.gif' ,'images/btn_02_over.gif' ,'images/btn_03.gif' ,'images/btn_03_over.gif' ,'images/btn_04.gif' ,'images/btn_04_over.gif' ,'images/btn_05.gif' ,'images/btn_05_over.gif' ,'images/btn_06.gif' ,'images/btn_06_over.gif' ,'images/btn_07.gif' ,'images/btn_07_over.gif' ,'images/btn_08.gif' ,'images/btn_08_over.gif' ,'images/btn_09.gif' ,'images/btn_09_over.gif' ,'images/btn_10.gif' ,'images/btn_10_over.gif' ,'images/btn_11.gif' ,'images/btn_11_over.gif' ,'images/btn_12.gif' ,'images/btn_12_over.gif',"btn_gotoTop.gif","btn_gotoTop_over.gif","btn_logIn.gif","btn_logIn_over.gif","btn_next.gif","btn_next_over.gif","btn_previous.gif","btn_previous_over.gif","btn_signUp.gif","btn_signUp_over.gif","btn_visit.gif","btn_visit_over.gif","btn_visit_top.gif","key_pix_01.gif","key_pix_01.jpg","key_pix_01_over.gif","key_pix_01_over.jpg","title_pop_R_On.gif","title_pop_R.gif","title_key_R.gif","title_key_R_On.gif","title_highlight_bg.gif","sub_title_R.gif","subHead_bg_01.gif","subHead_bg_02.gif","subHead_pix_top.gif","sub_title_bg.gif","stat_low.gif","sub_R.gif","stat_bgR.gif","stat_bgL.gif","smal_low_L.gif","smal_low_R.gif","RSS.gif","reg_right.jpg","regist_bgL.gif","reg_left.jpg","regist_bgR.gif","new.gif")
	else	
		MM_preloadImages('images/spacer.gif','images/spacer_over.gif','images/nav_sub_Line.gif','images/nav_sub_Line_over.gif','images/top_view.jpg','images/btn_01.gif' ,'images/btn_01_over.gif' ,'images/btn_02.gif' ,'images/btn_02_over.gif' ,'images/btn_03.gif' ,'images/btn_03_over.gif' ,'images/btn_04.gif' ,'images/btn_04_over.gif' ,'images/btn_05.gif' ,'images/btn_05_over.gif' ,'images/btn_06.gif' ,'images/btn_06_over.gif' ,'images/btn_07.gif' ,'images/btn_07_over.gif' ,'images/btn_08.gif' ,'images/btn_08_over.gif' ,'images/btn_09.gif' ,'images/btn_09_over.gif' ,'images/btn_10.gif' ,'images/btn_10_over.gif' ,'images/btn_11.gif' ,'images/btn_11_over.gif' ,'images/btn_12.gif' ,'images/btn_12_over.gif');
}


function genRightSpacer(){
	document.write('<img src="images/spacer.gif" width="8">');
}

//print style sheet

if(document.URL.toString().search('/en/')!=-1){
	var css_file='style_sheet.css';
} else{
	var css_file='style_sheet_tc.css';
}
if(document.URL.toString().search('/text/')!=-1){
	document.writeln('<link href="../../../css/'+css_file+'" rel="stylesheet" type="text/css">');
}else{
	document.writeln('<link href="../../css/'+css_file+'" rel="stylesheet" type="text/css">');
} 

function IndexIcon(){

var iconBrandHK='BrandHK_c.gif';
var iconCepa='cepa_c.gif';
var iconGst='gst_c.jpg';
var iconInfo='infogov.gif';
var iconPolicy='pa2011_tc.gif';
var iconNews='news_c.gif';
var iconBudget='2012budget_c.gif';
var iconTax='efiling_c.gif';
var iconVoter='voter2007.jpg';

var txt5day='政府五天工作周';
var txtBrandHK='亞洲國際都會';
var txtBuiz='營商網';
var txtBudget='2012-13財政預算案';
var txtCepa='更緊密經貿關係的安排';
var txtGst='稅制改革';
var txtInfo='香港政府一站通';
var txtPolicy='施政報告';
var txtNews='政府新聞網';
var txtTax='電子報稅';
var txtVoter='2007選民登記';

var linkCepa='http://www.tid.gov.hk/tc_chi/cepa/';
var linkbuiz='http://www.business.gov.hk/';
var linkBrandHK='http://www.brandhk.gov.hk/';
var linkBudget='http://www.budget.gov.hk/2012/chi/speech.html';
var linkInfo='http://www.info.gov.hk/';
var linkGst='http://www.taxreform.gov.hk/';
var linkPolicy='http://www.policyaddress.gov.hk/';
var linkNews='http://www.news.gov.hk/';
var linkTax='http://www.ird.gov.hk/chi/ese/e_ctr.htm';
var linkVoter='http://www.voterregistration.gov.hk';

if(document.URL.toString().search('/sc/')!=-1){
	txt5day='政府五天工作周';
	txtBrandHK='亚洲国际都会';
	txtBuiz='营商网';
	txtBudget='2012-13财政预算案';
	txtCepa='更紧密经贸关系的安排';
	txtGst='税制改革';
	txtInfo='香港政府一站通';
	txtPolicy='施政报告';
	txtNews='政府新闻网';
	txtTax='电子报税';
	txtVoter='2007选民登记';
	
	iconTax='efiling_gb.gif';
	iconPolicy='pa2011_sc.gif';
	iconBudget='2012budget_s.gif';
	
	linkCepa='http://www.tid.gov.hk/sc_chi/cepa/';
	linkTax='http://sc.info.gov.hk/gb/www.ird.gov.hk/chi/ese/e_ctr.htm';
	linkBudget='http://www.budget.gov.hk/2012/sim/speech.html';
	
}else if(document.URL.toString().search('/en/')!=-1){
	txt5day='5 days work';
	txtBrandHK='HK Brand';
	txtBuiz='business.gov.hk';
	txtBudget='2012-13 Budget';
	txtCepa='CEPA';
	txtGst='Tax Reform';
	txtInfo='GovHK';
	txtPolicy='Policy Address';
	txtNews='News';
	iconBrandHK='BrandHK.jpg';
	iconBudget='2012budget_e.gif';
	iconCepa='cepa.gif';
	iconGst='gst.jpg';
	iconInfo='infogovhkeng.gif';
	iconPolicy='pa2011_e.gif';
	iconNews='news.gif';
	txtTax='Internet Filing of Tax Return';
	txtVoter='2007 Voter Registration';
	
	iconTax='efiling_e.gif';
	
	linkTax='http://www.ird.gov.hk/eng/ese/e_ctr.htm';
	linkCepa='http://www.tid.gov.hk/english/cepa/';
	linkBudget='http://www.budget.gov.hk/2012/eng/speech.html';
}
if(document.URL.toString().search('/text/')!=-1){
	document.write('<div align="center"><table border="0" cellpadding="2" cellspacing="2">');
	document.write('<tr align="center">');
	document.write('	<td><a href="javascript:PopWin(\''+langFolder+'5day.htm\', 0, 0, 260, 169);">'+txt5day+'</a></td>');
	document.write('	<td><a href="'+linkbuiz+'" target="_blank">'+txtBuiz+'</a></td>');
	document.write('	<td><a href="'+linkBrandHK+'" target="_blank">'+txtBrandHK+'</a></td>');
	document.write('	<td><a href="'+linkBudget+'" target="_blank">'+txtBudget+'</a></td>');
	document.write('</tr>');
	document.write('<tr align="center">');
	document.write('	<td><a href="'+linkCepa+'" target="_blank">'+txtCepa+'</a></td>');
	document.write('	<td><a href="'+linkInfo+'" target="_blank">'+txtInfo+'</a></td>');
	document.write('	<td><a href="'+linkGst+'" target="_blank">'+txtGst+'</a></td>');
	document.write('	<td><a href="'+linkPolicy+'" target="_blank">'+txtPolicy+'</a></td>');
	document.write('</tr>');
	document.write('<tr align="center">');
	document.write('	<td><a href="'+linkNews+'" target="_blank">'+txtNews+'</a></td>');
	document.write('	<td><a href="'+linkTax+'" target="_blank">'+txtTax+'</a></td>');
	document.write('	<td><a href="'+linkVoter+'" target="_blank">'+txtVoter+'</a></td>');
	document.write('	<td>&nbsp;</td>');
	document.write('</tr>');
	document.write('</table></div>');
}else {
	document.write('<div align="center"><table border="0" cellpadding="2" cellspacing="2">');
	document.write('<tr align="center">');
	document.write('	<td><a href="javascript:PopWin(\''+langFolder+'5day.htm\', 0, 0, 260, 169);"><img src="'+domain_url+'/images/icon/5day_icon.jpg" border="0" title="'+txt5day+'" alt="'+txt5day+'"></a></td>');
	document.write('	<td><a href="'+linkbuiz+'" target="_blank"><img src="'+domain_url+'/images/icon/bep_logo.gif" border="0" title="'+txtBuiz+'" alt="'+txtBuiz+'"></a></td>');
	document.write('	<td><a href="'+linkBrandHK+'" target="_blank"><img src="'+domain_url+'/images/icon/'+iconBrandHK+'" border="0" title="'+txtBrandHK+'" alt="'+txtBrandHK+'"></a></td>');
	document.write('	<td><a href="'+linkBudget+'" target="_blank"><img src="'+domain_url+'/images/icon/'+iconBudget+'" border="0" title="'+txtBudget+'" alt="'+txtBudget+'"></a></td>');
	document.write('</tr>');
	document.write('<tr align="center">');
	document.write('	<td><a href="'+linkCepa+'" target="_blank"><img src="'+domain_url+'/images/icon/'+iconCepa+'" border="0" title="'+txtCepa+'" alt="'+txtCepa+'"></a></td>');
	document.write('	<td><a href="'+linkInfo+'" target="_blank"><img src="'+domain_url+'/images/icon/'+iconInfo+'" border="0" title="'+txtInfo+'" alt="'+txtInfo+'"></a></td>');
	document.write('	<td><a href="'+linkGst+'" target="_blank"><img src="'+domain_url+'/images/icon/'+iconGst+'" border="0" title="'+txtGst+'" alt="'+txtGst+'"></a></td>');
	document.write('	<td><a href="'+linkPolicy+'" target="_blank"><img src="'+domain_url+'/images/icon/'+iconPolicy+'" border="0" title="'+txtPolicy+'" alt="'+txtPolicy+'"></a></td>');
	document.write('</tr>');
	document.write('<tr align="center">');
	document.write('	<td><a href="'+linkNews+'" target="_blank"><img src="'+domain_url+'/images/icon/'+iconNews+'" border="0" title="'+txtNews+'" alt="'+txtNews+'"></a></td>');
	document.write('	<td><a href="'+linkTax+'" target="_blank"><img src="'+domain_url+'/images/icon/'+iconTax+'" border="0" title="'+txtTax+'" alt="'+txtTax+'"></a></td>');
	document.write('	<td><img src="'+domain_url+'/images/icon/civil.gif" border="0" title="" alt=""></td>');
	document.write('	<td><a href="'+linkVoter+'" target="_blank"><img src="'+domain_url+'/images/icon/'+iconVoter+'" border="0" title="'+txtVoter+'" alt="'+txtVoter+'"></a></td>');
	document.write('</tr>');
	document.write('</table></div>');
}
/*
<div align="center"><table border="0" cellpadding="2" cellspacing="2">
<tr align="center">
	<td><a href="http://www.info.gov.hk/fso/eabfu/eng/5day.htm " target="_blank"><img src="../../images/icon/5day_icon.jpg" border="0" title="5 days work" alt="5 days work"></a></td>
	<td><a href="http://www.business.gov.hk/bep/opencms/release/chi " target="_blank"><img src="../../images/icon/bep_logo.gif" border="0" title="business.gov.hk" alt="business.gov.hk"></a></td>
	<td><a href="http://www.brandhk.gov.hk/brandhk/eindex.htm" target="_blank"><img src="../../images/icon/BrandHK_c.gif" border="0" title="亞洲國際都會" alt="亞洲國際都會"></a></td>
	<td><a href="http://www.budget.gov.hk/2012/chi/speech.html" target="_blank"><img src="../../images/icon/2012budget_c.gif" border="0" title="2012-13財政預算案" alt="2012-13財政預算案"></a></td>
	<td><a href="http://www.tid.gov.hk/english/cepa/ " target="_blank"><img src="../../images/icon/cepa_c.gif" border="0" title="CEPA" alt="CEPA"></a></td>
</tr>
<tr align="center">
	<td><a href="http://www.info.gov.hk/ " target="_blank"><img src="../../images/icon/infogov.gif" border="0" title=" info.gov.hk" alt=" info.gov.hk"></a></td>
	<td><a href="http://www.taxreform.gov.hk/ " target="_blank"><img src="../../images/icon/gst_c.jpg" border="0" title="tax reform" alt="tax reform"></a></td>
	<td><a href="http://www.policyaddress.gov.hk/ " target="_blank"><img src="../../images/icon/report.gif" border="0" title="policy address" alt="policy address"></a></td>
	<td><a href="http://www.news.gov.hk/" target="_blank"><img src="../../images/icon/news_c.gif" border="0" title="政府新聞網" alt="政府新聞網"></a></td>
	<td><a href="#" target="_blank"><img src="../../images/icon/civil.gif" border="0" title="" alt=""></a></td>
</tr>
</table></div>
*/
}

function ShowNewsList(){
	//var MainLink = new Array();
	var NewsTitle = new Array();

	if(document.URL.toString().search('/en/')!=-1){
//      NewsTitle[0]='The Latest Business Facilitation Advisory Committee Meeting';
//		NewsTitle[1]='4th meeting of '+title[3];
//      NewsTitle[1]='Press Release on 9th Business Facilitation Advisory Committee Meeting';
//      NewsTitle[2]=subTitle[5][1];
		NewsTitle[3]='Legislative Amendment on Occupant Protection Regulations of Road Traffic (Construction and Maintenance of Vehicles) Regulation, Cap. 374A';
		NewsTitle[4]='Draft framework of the Voluntary Water Efficiency Labelling Scheme on Washing Machines ';
	NewsTitle[5]='Draft Scheme Document of the Voluntary Water Efficiency Labelling Scheme on Water Taps (Closing Date: 21 Apr 2010)';
        NewsTitle[6]='Public Consultation on Legislation to Enhance Protection for Consumers Against Unfair Trade Practices ';
		NewsTitle[7]='Code of Practice on keeping records relating to food';
		NewsTitle[8]='Proposed Establishment of an Independent Insurance Authority';
		NewsTitle[9]='Public Consultation on Hong Kong’s Climate Change Strategy and Action Agenda ';
		NewsTitle[10]='Review of Local Access Charge (Closing Date: 9 Apr 2010) ';
		

	}else if(document.URL.toString().search('/sc/')!=-1){
//      NewsTitle[0]='最新一次方便营商咨询委员会会议';
//      NewsTitle[1]='有关第九次方便营商咨询委员会会议的新闻发布';
//		NewsTitle[1]=title[3] +' - 菴侐棒頗祜';
// 		NewsTitle[2]=subTitle[5][1];
 	   NewsTitle[3]='《道路交通(车辆构造及保养)规例》(第374A章) 有关乘客保护系统的相关规例的修订事宜';
		NewsTitle[4]='《自愿参与用水效益标签计划–洗衣机》草拟体制文件 ';
        NewsTitle[5]='《自愿参与用水效益标签计划–水龙头》草拟计划文件 (截止日期：二零一零年四月二十一日) ';
        NewsTitle[6]='打击不良营商手法立法保障消费权益公众咨询';
        NewsTitle[7]='备存食物纪录的实务守则';
        NewsTitle[8]='建议成立独立保险业监管局 ';
        NewsTitle[9]='香港应对气候变化策略及行动纲领公众咨询';
		NewsTitle[10]='检讨本地接驳费(截止日期：二零一零年四月九日) ';



		

		
	}else{
//      NewsTitle[0]='最新一次方便營商諮詢委員會會議';
//      NewsTitle[1]='有關第九次方便營商諮詢委員會會議的新聞發佈';
//		NewsTitle[1]=title[3] +' - 第四次會議';
// 		NewsTitle[2]=subTitle[5][1];
		NewsTitle[3]='《道路交通(車輛構造及保養)規例》(第374A章) 有關乘客保護系統的相關規例的修訂事宜';
		NewsTitle[4]='《自願參與用水效益標籤計劃–洗衣機》草擬體制文件 ';
        NewsTitle[5]='《自願參與用水效益標籤計劃–水龍頭》草擬計劃文件 (截止日期：二零一零年四月二十一日) ';
        NewsTitle[6]='打擊不良營商手法立法保障消費權益公眾諮詢';
        NewsTitle[7]='備存食物紀錄的實務守則';
        NewsTitle[8]='建議成立獨立保險業監管局 ';
        NewsTitle[9]='香港應對氣候變化策略及行動綱領公眾諮詢';
		NewsTitle[10]='檢討本地接駁費(截止日期：二零一零年四月九日) ';
		
	}

	 
		
	var NewsLink = new Array();

	if(document.URL.toString().search('/en/')!=-1){
//		NewsLink[1]=domain_url+'/en/pdf/bfac-press25July07.doc';
		NewsLink[0] = 'http://www.gov.hk/en/business/supportenterprises/bf/advisory/index.htm#2008';
		NewsLink[2]='http://www.gov.hk/en/business/supportenterprises/bf/new/index.htm';
		NewsLink[1]='http://www.info.gov.hk/gia/general/200811/13/P200811130202.htm';
		NewsLink[3]='http://www.gov.hk/en/theme/bf/consultation/upcoming.htm#09021';
		NewsLink[4]='http://www.gov.hk/en/theme/bf/consultation/upcoming.htm#10003';
		NewsLink[5]='http://www.gov.hk/en/theme/bf/consultation/current.htm#10002';
        NewsLink[6]='http://www.gov.hk/en/theme/bf/consultation/10013.htm';
		NewsLink[7]='http://www.gov.hk/en/theme/bf/consultation/10010.htm';
		NewsLink[8]='http://www.gov.hk/en/theme/bf/consultation/10011.htm';
		NewsLink[9]='http://www.gov.hk/en/theme/bf/consultation/10014.htm';
		NewsLink[10]='http://www.info.gov.hk/gia/general/201003/15/P201003150158.htm';
NewsLink[11]='http://www.gov.hk/en/theme/bf/consultation/current.htm#09012';


	}else if(document.URL.toString().search('/sc/')!=-1){
//		NewsLink[1]=domain_url+'/sc/pdf/bfac-press25July07.doc';
		NewsLink[0] = 'http://sc.info.gov.hk/TuniS/www.gov.hk/tc/business/supportenterprises/bf/advisory/index.htm#2008';
		NewsLink[2]='http://sc.info.gov.hk/TuniS/www.gov.hk/tc/business/supportenterprises/bf/new/index.htm';
		NewsLink[1]='http://sc.info.gov.hk/gb/www.info.gov.hk/gia/general/200811/13/P200811130204.htm';
		NewsLink[3]='http://www.gov.hk/sc/theme/bf/consultation/upcoming.htm#09021';
		NewsLink[4]='http://www.gov.hk/sc/theme/bf/consultation/upcoming.htm#10003';
		NewsLink[5]='http://www.gov.hk/sc/theme/bf/consultation/current.htm#10002';
        NewsLink[6]='http://www.gov.hk/sc/theme/bf/consultation/10013.htm';
		NewsLink[7]='http://www.gov.hk/sc/theme/bf/consultation/10010.htm';
		NewsLink[8]='http://www.gov.hk/sc/theme/bf/consultation/10011.htm';
		NewsLink[9]='http://www.gov.hk/sc/theme/bf/consultation/10014.htm';
		NewsLink[10]='http://sc.info.gov.hk/gb/www.info.gov.hk/gia/general/201003/15/P201003150167.htm';
NewsLink[11]='http://www.gov.hk/sc/theme/bf/consultation/current.htm#09012';

		
	}else{
//		NewsLink[1]=domain_url+'/tc/pdf/bfac-press25July07.doc';
		NewsLink[0] = 'http://www.gov.hk/tc/business/supportenterprises/bf/advisory/index.htm#2008';
		NewsLink[2]='http://www.gov.hk/tc/business/supportenterprises/bf/new/index.htm';
		NewsLink[1]='http://www.info.gov.hk/gia/general/200811/13/P200811130204.htm';
		NewsLink[3]='http://www.gov.hk/tc/theme/bf/consultation/upcoming.htm#09021';
		NewsLink[4]='http://www.gov.hk/tc/theme/bf/consultation/upcoming.htm#10003';
		NewsLink[5]='http://www.gov.hk/tc/theme/bf/consultation/current.htm#10002';
        NewsLink[6]='http://www.gov.hk/tc/theme/bf/consultation/10013.htm';
		NewsLink[7]='http://www.gov.hk/tc/theme/bf/consultation/10010.htm';
		NewsLink[8]='http://www.gov.hk/tc/theme/bf/consultation/10011.htm';
		NewsLink[9]='http://www.gov.hk/tc/theme/bf/consultation/10014.htm';
		NewsLink[10]='http://www.info.gov.hk/gia/general/201003/15/P201003150167.htm';
NewsLink[11]='http://www.gov.hk/tc/theme/bf/consultation/current.htm#09012';

	}
	
	
	
	
	document.writeln('<ul\n>');
	for(var i in NewsTitle){
		document.write('<li>');
		
		if  (NewsLink[i].toString().search(domain_url)!=-1) {
			if ( (NewsLink[i].toString().search('.doc')!=-1) || (NewsLink[i].toString().search('.ppt')!=-1) || (NewsLink[i].toString().search('.xls')!=-1) || (NewsLink[i].toString().search('.pdf')!=-1) ){
				document.write('<a href="javascript:externalLink(\''+NewsLink[i]+'\')">'+NewsTitle[i]+'</a>');
			}else{
				document.write('<a href="'+NewsLink[i]+'">'+NewsTitle[i]+'</a>');
			}
		}else{
			//document.write('<a href="'+NewsLink[i]+'">'+NewsTitle[i]+'</a>');
			document.write('<a href="javascript:externalLink(\''+NewsLink[i]+'\')">'+NewsTitle[i]+'</a>');
		}
		
		document.write('<br><br></li>\n');
	}
	document.writeln('</ul>\n');
}

function newlink(abc){
	
	tlink=abc.replace("javascript:externalLink('", "")
	externalLink(tlink.replace("')", ""));
}