﻿document.write('<meta http-equiv="expires" content="0"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="pragma" content="no-cache, no-store, must-revalidate">');


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

if(location.href.toString().search('www.hab.gov.hk/wkcd/') != -1)
{
	var domain_url2 = 'ht'+'tp://www.hab.gov.hk/wkcd/';
}
else if (location.href.toString().search('hab_WKCD') != -1)
{
	var domain_url2 = '../../';
}
else
{
	var domain_url2 = 'ht'+'tp://www0.hab.gov.hk/wkcd/';
}


//alert(domain_url2);

//var domain_url2 = '';


/*if(location.href.toString().search('search.info.gov.hk') != -1){
	selectedSection=23;
	selectedSubSection=0;
}*/


// -------------------------------------------------------------    Variable for Common Function for Left Menu -----------------------------------------

var leftMenuSectionImageOut = ".gif";
var leftMenuSectionImageOver = "on.gif";
var leftMenuName = "Menu";
var leftMenuImageName = "icon";
var layerCommonName = "Popup";
var leftMenuFlag = false;
var firstLayerFlag = false;
var firstLayerTimerID;
var activeLeftMenuID = "";
var mainTopicNo;
var mainTopic = mainTopicNo;


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 -----------------------------------------

// -------------------------------------------------------------    Common Function for Left Menu -----------------------------------------

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function doShowMenu(imgName)
{
	var iconNo = parseInt(imgName);
	(iconNo<10)?iconNo='0'+iconNo:iconNo=iconNo;
	
	if (imgName==1){imgName=1;}
	
	if(mainTopic != imgName && !leftMenuFlag)
	//if(!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);
	(iconNo<10)?iconNo='0'+iconNo:iconNo=iconNo;
	//if(true)
	if (imgName==1){imgName=1;}
	
	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 doShowLayer(imgName, layerName)
{
	//var tempLayerName = layerName.substring(0, (layerName.length-2))
	var tempLayerName = layerName
	var tempLayer = "";
	var tempImage = "";
	var tempPath = "";
	if(subTopic != imgName && !firstLayerImagesFlag)
	//if(!leftMenuFlag)
	{
		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 tempLayerName = layerName
	var tempLayer = "";
	var tempImage = "";
	//if(true)
	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 -----------------------------------------


var title = new Array()
title[1] = "Introduction";
title[2] = "What's New";
title[3] = "Consultative Committee";
title[4] = "Advisory Groups";
title[5] = "Performing Arts and Tourism Advisory Group";
title[6] = "Museums Advisory Group";
title[7] = "Financial Matters Advisory Group";
title[8] = "Press Announcements";
title[9] = "Contact Us";
title[10] = "Meetings";
title[11] = "Consultative Forums";
title[12] = "Focus Group Meetings";
title[120] = "Site Map";
title[121] = "Search";
title[122] = "Search result";
/*title[10] = "Discussion Forums";
title[11] = "Comment Card";
title[12] = "Proposals";
*/







var left_menu_img_path='eng/images/cc/';
var link_path='eng/cc/';
var link_path2='eng/';


var topOffSet=89; //position + icon top
var leftOffSet=0;

function getTitle() {
	//generate the menu to the buffer variable
	var scriptBuffer='';
	scriptBuffer+='<title>';
	scriptBuffer+='West Kowloon Cultural District - Consultative Committee';
	if (mainTopicNo!=''&&mainTopicNo!=0) {
		scriptBuffer+=' - ';
		scriptBuffer+=title[mainTopicNo];
	}
	if (subTopic!='' && subTopic!=0) {
		scriptBuffer+=' - ';
		scriptBuffer+=subTitle[mainTopicNo][subTopic];
	}
	scriptBuffer+='</title>';
	return scriptBuffer;
}

//only using in chineses verison for replace the dummy space between the character
function replaceSpace(str) {
	var retStr=str;
	for (var i=0; i<str.length-1; i++) {
		retStr = retStr.replace(' ','');
	}
	return retStr;
}

//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');	
	}
}

//change to text only version
function textSwitch() {
	if(location.href.toString().search('search.info.gov.hk') != -1){
		if (location.href.toString().search('mode=176') != -1) { //change to English version
			goPath=location.href.replace("mode=176", "mode=16");
		}
		if (location.href.toString().search('mode=177') != -1) { //change to traditional chinese version
			goPath=location.href.replace("mode=177", "mode=15");
		}
		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 goPath;
	var pagePath=document.location.pathname;

	if(location.href.toString().search('search.info.gov.hk') != -1){
		if (lang=='en') { //change to English version
			goPath=location.href.replace("mode=177", "mode=176");
		}
		if (lang=='tc') { //change to traditional chinese version
			goPath=location.href.replace("mode=176", "mode=177");
		}
		if (lang=='sc') { //change to simplified chinese version
			if(location.href.toString().search('westcom') != -1){
				goPath= 'ht'+'tp://common.westcomzivo.com/'+ chi_str.replace("mode=176", "mode=177");
			}else{
				goPath= 'ht'+'tp://sc.info.gov.hk/gb/'+ chi_str.replace("mode=176", "mode=177");
			}
		}
	}else{
		if(location.href.toString().search('westcom') != -1)
			var translationServer='ht'+'tp://common.westcomzivo.com/gb/';
		else
			var translationServer='http://sc.info.gov.hk/gb/';
	
		if (lang=='en') { //change to English version
			goPath='/en'+pagePath.substring(3,pagePath.length);
		}
		if (lang=='tc') { //change to traditional chinese version
			goPath='/tc'+pagePath.substring(3,pagePath.length);
		}
		if (lang=='sc') { //change to simplified chinese version
			goPath='/tc'+pagePath.substring(3,pagePath.length);
			goPath=translationServer+location.host+goPath;
		}
	}
	document.location=goPath;
}

//generate common look & feel header



function getLeftbg()

{
var scriptBuffer='';
	scriptBuffer+='<td rowspan="3" background="'+domain_url2+left_menu_img_path+'leftbg.gif"><img src="'+domain_url2+left_menu_img_path+'Spacer.gif" width="44" height="1"></td>';

return scriptBuffer;
}

function getcontent_bg_left()

{
var scriptBuffer='';
	scriptBuffer+='<img src="'+domain_url2+left_menu_img_path+'title' + mainTopic + '/title' + mainTopic + '_bg_left.gif">';

return scriptBuffer;
}

function getTopbar()

{
	
	var scriptBuffer='';
	scriptBuffer+='<img src="'+domain_url2+left_menu_img_path+'photo.gif" alt="West Kowloon Cultural District"  border="0">';

return scriptBuffer;
}


function getLeftMenu(){
	var scriptBuffer='';
	var isOver='';

	//scriptBuffer+='<table border="0" cellpadding="0" cellspacing="0">';

	scriptBuffer+='<table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="'+domain_url2+left_menu_img_path+'photo1.gif" alt="Consultative Committee" border="0"></td></tr><tr><td valign="top"><table border="0" cellpadding="0" cellspacing="0">';


	
	
	(mainTopicNo==1)?isOver='on':isOver='';
	scriptBuffer+='<td><a href="'+domain_url2+link_path+'intro.htm" onmouseout="leftMenuMouseOut(\'1\')" onmouseover="leftMenuMouseOver(\'1\')"><img src="'+domain_url2+left_menu_img_path+'newsleftmenu1'+isOver+'.gif" name="Menu1" border="0" alt="'+title[1]+'"></a></td>';
	scriptBuffer+='</tr>';	

	
   
	


	
	(mainTopicNo==3)?isOver='on':isOver='';
	scriptBuffer+='<td><a href="'+domain_url2+link_path+'committee.htm" onmouseout="leftMenuMouseOut(\'3\')" onmouseover="leftMenuMouseOver(\'3\')"><img src="'+domain_url2+left_menu_img_path+'newsleftmenu3'+isOver+'.gif" name="Menu3" border="0" alt="'+title[3]+'"></a></td>';
	scriptBuffer+='</tr>';	

	scriptBuffer+='<tr>';
	(mainTopicNo==4)?isOver='':isOver='';
	scriptBuffer+='<td><img src="'+domain_url2+left_menu_img_path+'newsleftmenu4'+'.gif" name="Menu4" border="0" alt="'+title[4]+'"</td>';
	scriptBuffer+='</tr>';	
	
	scriptBuffer+='<tr>';
	(mainTopicNo==5)?isOver='on':isOver='';
	scriptBuffer+='<td><a href="'+domain_url2+link_path+'group1.htm" onmouseout="leftMenuMouseOut(\'5\')" onmouseover="leftMenuMouseOver(\'5\')"><img src="'+domain_url2+left_menu_img_path+'newsleftmenu5'+isOver+'.gif" name="Menu5" border="0" alt="'+title[5]+'"></a></td>';
	scriptBuffer+='</tr>';	

	scriptBuffer+='<tr>';
	(mainTopicNo==6)?isOver='on':isOver='';
	scriptBuffer+='<td><a href="'+domain_url2+link_path+'group2.htm" onmouseout="leftMenuMouseOut(\'6\')" onmouseover="leftMenuMouseOver(\'6\')"><img src="'+domain_url2+left_menu_img_path+'newsleftmenu6'+isOver+'.gif" name="Menu6" border="0" alt="'+title[6]+'"></a></td>';
	scriptBuffer+='</tr>';	

	(mainTopicNo==7)?isOver='on':isOver='';
	scriptBuffer+='<td><a href="'+domain_url2+link_path+'group3.htm" onmouseout="leftMenuMouseOut(\'7\')" onmouseover="leftMenuMouseOver(\'7\')"><img src="'+domain_url2+left_menu_img_path+'newsleftmenu7'+isOver+'.gif" name="Menu7" border="0" alt="'+title[7]+'"></a></td>';
	scriptBuffer+='</tr>';	
	
	(mainTopicNo==10)?isOver='on':isOver='';
	scriptBuffer+='<td><a href="'+domain_url2+link_path+'meeting.htm" onmouseout="leftMenuMouseOut(\'10\')" onmouseover="leftMenuMouseOver(\'10\')"><img src="'+domain_url2+left_menu_img_path+'newsleftmenu10'+isOver+'.gif" name="Menu10" border="0" alt="'+title[10]+'"></a></td>';
	scriptBuffer+='</tr>';	

	(mainTopicNo==11)?isOver='on':isOver='';
	scriptBuffer+='<td><a href="'+domain_url2+link_path+'conforums.htm" onmouseout="leftMenuMouseOut(\'11\')" onmouseover="leftMenuMouseOver(\'11\')"><img src="'+domain_url2+left_menu_img_path+'newsleftmenu11'+isOver+'.gif" name="Menu11" border="0" alt="'+title[11]+'"></a></td>';
	scriptBuffer+='</tr>';	

	(mainTopicNo==12)?isOver='on':isOver='';
	scriptBuffer+='<td><a href="'+domain_url2+link_path+'focus.htm" onmouseout="leftMenuMouseOut(\'12\')" onmouseover="leftMenuMouseOver(\'12\')"><img src="'+domain_url2+left_menu_img_path+'newsleftmenu12'+isOver+'.gif" name="Menu12" border="0" alt="'+title[12]+'"></a></td>';
	scriptBuffer+='</tr>';	

	(mainTopicNo==8)?isOver='on':isOver='';
	scriptBuffer+='<td><a href="'+domain_url2+link_path+'press.htm" onmouseout="leftMenuMouseOut(\'8\')" onmouseover="leftMenuMouseOver(\'8\')"><img src="'+domain_url2+left_menu_img_path+'newsleftmenu8'+isOver+'.gif" name="Menu8" border="0" alt="'+title[8]+'"></a></td>';
	scriptBuffer+='</tr>';	
             
	
	(mainTopicNo==9)?isOver='on':isOver='';
	scriptBuffer+='<td><a href="'+domain_url2+link_path+'contact.htm" onmouseout="leftMenuMouseOut(\'9\')" onmouseover="leftMenuMouseOver(\'9\')"><img src="'+domain_url2+left_menu_img_path+'newsleftmenu9'+isOver+'.gif" name="Menu9" border="0" alt="'+title[9]+'"></a></td>';
	scriptBuffer+='</tr>';	

	
	
	scriptBuffer+='<tr><td valign="bottom" ><img src="'+domain_url2+left_menu_img_path+'bot.gif" alt="image" name="Image5" border="0" id="Image5"></p></td></tr>';
	
	
	
	scriptBuffer+='</table></td></tr></table>';
	//scriptBuffer+='</table>';
	
	return scriptBuffer;
}

function getLayer()
{
	var scriptBuffer='';
	var isOver='';

if (document.layers)
	{document.writeln('<layer name="Popup99" top='+(topOffSet+12)+' left='+(leftOffSet+78)+' width=150 height=58 visibility="hide" onMouseOver="leftMenuMouseOver(\'99\')" onMouseOut="leftMenuMouseOut(\'99\')">');}
	else
	{document.writeln('<div id="Popup99" style="position:absolute; left:'+(leftOffSet+78)+'; top:'+(topOffSet+12)+'; width:150; height:58; z-index:1; visibility: hidden;">');}
	
	document.writeln('<table width="100%" border="0" alt="" cellspacing="0" cellpadding="0" onMouseOver="leftMenuMouseOver(\'99\')" onMouseOut="leftMenuMouseOut(\'99\')">');
	(mainTopicNo==99 && subTopic==1)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../intro/intro1.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'99_1\', \''+layerCommonName+'99\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'99_1\', \''+layerCommonName+'99\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu99_1'+isOver+'.gif" name="Menu99_1" border="0" alt="'+subTitle[99][1]+'" class="layer_filter"></a></td></tr>');
	
	(mainTopicNo==99 && subTopic==2)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../intro/intro2.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'99_2\', \''+layerCommonName+'99\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'99_2\', \''+layerCommonName+'99\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu99_2'+isOver+'.gif" name="Menu99_2" border="0" alt="'+subTitle[99][2]+'" class="layer_filter"></a></td></tr>');
	

document.writeln('</table>');
	
	if (document.layers)
	{document.writeln('</layer>');}
	else
	{document.writeln('</div>');}



if (document.layers)
	{document.writeln('<layer name="Popup02" top='+(topOffSet+12)+' left='+(leftOffSet+226)+' width=150 height=58 visibility="hide" onMouseOver="leftMenuMouseOver(\'2\')" onMouseOut="leftMenuMouseOut(\'2\')">');}
	else
	{document.writeln('<div id="Popup02" style="position:absolute; left:'+(leftOffSet+226)+'; top:'+(topOffSet+12)+'; width:150; height:58; z-index:2; visibility: hidden;">');}
	
	document.writeln('<table width="100%" border="0" alt="" cellspacing="0" cellpadding="0" onMouseOver="leftMenuMouseOver(\'2\')" onMouseOut="leftMenuMouseOut(\'2\')">');
	(mainTopicNo==2 && subTopic==1)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../customer/customer1.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'2_1\', \''+layerCommonName+'02\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'2_1\', \''+layerCommonName+'02\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu2_1'+isOver+'.gif" name="Menu2_1" border="0" alt="'+subTitle[2][1]+'" class="layer_filter"></a></td></tr>');
	(mainTopicNo==2 && subTopic==2)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../customer/customer2.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'2_2\', \''+layerCommonName+'02\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'2_2\', \''+layerCommonName+'02\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu2_2'+isOver+'.gif" name="Menu2_2" border="0" alt="'+subTitle[2][2]+'" class="layer_filter"></a></td></tr>');


	(mainTopicNo==2 && subTopic==3)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../customer/customer3.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'2_3\', \''+layerCommonName+'02\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'2_3\', \''+layerCommonName+'02\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu2_3'+isOver+'.gif" name="Menu2_3" border="0" alt="'+subTitle[2][3]+'" class="layer_filter"></a></td></tr>');

	(mainTopicNo==2 && subTopic==4)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../customer/customer4.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'2_4\', \''+layerCommonName+'02\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'2_4\', \''+layerCommonName+'02\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu2_4'+isOver+'.gif" name="Menu2_4" border="0" alt="'+subTitle[2][4]+'" class="layer_filter"></a></td></tr>');

	(mainTopicNo==2 && subTopic==5)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../customer/customer5.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'2_5\', \''+layerCommonName+'02\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'2_5\', \''+layerCommonName+'02\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu2_5'+isOver+'.gif" name="Menu2_5" border="0" alt="'+subTitle[2][5]+'" class="layer_filter"></a></td></tr>');

	(mainTopicNo==2 && subTopic==6)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../customer/customer6.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'2_6\', \''+layerCommonName+'02\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'2_6\', \''+layerCommonName+'02\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu2_6'+isOver+'.gif" name="Menu2_6" border="0" alt="'+subTitle[2][6]+'" class="layer_filter"></a></td></tr>');

	(mainTopicNo==2 && subTopic==7)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../customer/customer7.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'2_7\', \''+layerCommonName+'02\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'2_7\', \''+layerCommonName+'02\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu2_7'+isOver+'.gif" name="Menu2_7" border="0" alt="'+subTitle[2][7]+'" class="layer_filter"></a></td></tr>');


	(mainTopicNo==2 && subTopic==8)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../customer/customer8.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'2_8\', \''+layerCommonName+'02\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'2_8\', \''+layerCommonName+'02\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu2_8'+isOver+'.gif" name="Menu2_8" border="0" alt="'+subTitle[2][8]+'" class="layer_filter"></a></td></tr>');


document.writeln('</table>');
	
	if (document.layers)
	{document.writeln('</layer>');}
	else
	{document.writeln('</div>');}

if (document.layers)
	{document.writeln('<layer name="Popup03" top='+(topOffSet+12)+' left='+(leftOffSet+290)+' width=150 height=58 visibility="hide" onMouseOver="leftMenuMouseOver(\'3\')" onMouseOut="leftMenuMouseOut(\'3\')">');}
	else
	{document.writeln('<div id="Popup03" style="position:absolute; left:'+(leftOffSet+290)+'; top:'+(topOffSet+12)+'; width:150; height:58; z-index:2; visibility: hidden;">');}
	
	document.writeln('<table width="100%" border="0" alt="" cellspacing="0" cellpadding="0" onMouseOver="leftMenuMouseOver(\'3\')" onMouseOut="leftMenuMouseOut(\'3\')">');
	(mainTopicNo==3 && subTopic==1)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../producer/producer_1.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'3_1\', \''+layerCommonName+'03\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'3_1\', \''+layerCommonName+'03\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu3_1'+isOver+'.gif" name="Menu3_1" border="0" alt="'+subTitle[3][1]+'" class="layer_filter"></a></td></tr>');
	(mainTopicNo==3 && subTopic==2)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../producer/producer_2.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'3_2\', \''+layerCommonName+'03\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'3_2\', \''+layerCommonName+'03\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu3_2'+isOver+'.gif" name="Menu3_2" border="0" alt="'+subTitle[3][2]+'" class="layer_filter"></a></td></tr>');
	(mainTopicNo==3 && subTopic==3)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../producer/producer_3.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'3_3\', \''+layerCommonName+'03\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'3_3\', \''+layerCommonName+'03\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu3_3'+isOver+'.gif" name="Menu3_3" border="0" alt="'+subTitle[3][3]+'" class="layer_filter"></a></td></tr>');
	(mainTopicNo==3 && subTopic==4)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../producer/producer_4.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'3_4\', \''+layerCommonName+'03\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'3_4\', \''+layerCommonName+'03\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu3_4'+isOver+'.gif" name="Menu3_4" border="0" alt="'+subTitle[3][4]+'" class="layer_filter"></a></td></tr>');
	(mainTopicNo==3 && subTopic==5)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../producer/producer_5.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'3_5\', \''+layerCommonName+'03\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'3_5\', \''+layerCommonName+'03\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu3_5'+isOver+'.gif" name="Menu3_5" border="0" alt="'+subTitle[3][5]+'" class="layer_filter"></a></td></tr>');
	document.writeln('</table>');
	
	if (document.layers)
	{document.writeln('</layer>');}
	else
	{document.writeln('</div>');}
	
	

if (document.layers)
	{document.writeln('<layer name="Popup05" top='+(topOffSet+12)+' left='+(leftOffSet+484)+' width=150 height=58 visibility="hide" onMouseOver="leftMenuMouseOver(\'5\')" onMouseOut="leftMenuMouseOut(\'5\')">');}
	else
	{document.writeln('<div id="Popup05" style="position:absolute; left:'+(leftOffSet+484)+'; top:'+(topOffSet+12)+'; width:150; height:58; z-index:2; visibility: hidden;">');}
	
	document.writeln('<table width="100%" border="0" alt="" cellspacing="0" cellpadding="0" onMouseOver="leftMenuMouseOver(\'5\')" onMouseOut="leftMenuMouseOut(\'5\')">');
	(mainTopicNo==5 && subTopic==1)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../resource/resource_1.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'5_1\', \''+layerCommonName+'05\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'5_1\', \''+layerCommonName+'05\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu5_1'+isOver+'.gif" name="Menu5_1" border="0" alt="'+subTitle[5][1]+'" class="layer_filter"></a></td></tr>');
	(mainTopicNo==5 && subTopic==2)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../resource/resource_2.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'5_2\', \''+layerCommonName+'05\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'5_2\', \''+layerCommonName+'05\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu5_2'+isOver+'.gif" name="Menu5_2" border="0" alt="'+subTitle[5][2]+'" class="layer_filter"></a></td></tr>');
	
	
	document.writeln('</table>');
	
	if (document.layers)
	{document.writeln('</layer>');}
	else
	{document.writeln('</div>');}
	

	

	if (document.layers)
	{document.writeln('<layer name="Popup06" top='+(topOffSet+12)+' left='+(leftOffSet+559)+' width=150 height=58 visibility="hide" onMouseOver="leftMenuMouseOver(\'6\')" onMouseOut="leftMenuMouseOut(\'6\')">');}
	else
	{document.writeln('<div id="Popup06" style="position:absolute; left:'+(leftOffSet+559)+'; top:'+(topOffSet+12)+'; width:150; height:58; z-index:2; visibility: hidden;">');}
	
	document.writeln('<table width="100%" border="0" alt="" cellspacing="0" cellpadding="0" onMouseOver="leftMenuMouseOver(\'6\')" onMouseOut="leftMenuMouseOut(\'6\')">');
	(mainTopicNo==6 && subTopic==1)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../info/info_1.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'6_1\', \''+layerCommonName+'06\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'6_1\', \''+layerCommonName+'06\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu6_1'+isOver+'.gif" name="Menu6_1" border="0" alt="'+subTitle[6][1]+'" class="layer_filter"></a></td></tr>');
	(mainTopicNo==6 && subTopic==2)?isOver='_on':isOver='';document.writeln('<tr><td><a href="'+domain_url2+link_path+'../info/info_2.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'6_2\', \''+layerCommonName+'06\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'6_2\', \''+layerCommonName+'06\');"><img src="'+domain_url2+left_menu_img_path+'layer/sub_menu6_2'+isOver+'.gif" name="Menu6_2" border="0" alt="'+subTitle[6][2]+'" class="layer_filter"></a></td></tr>');
	
	
	document.writeln('</table>');
	
	if (document.layers)
	{document.writeln('</layer>');}
	else
	{document.writeln('</div>');}
		
	//return scriptBuffer;
}





function getChangeVer(){



if(location.href.toString().search('search.info.gov.hk') != -1) {	


var scriptBuffer='';
	

scriptBuffer+="<img src=\""+domain_url2+left_menu_img_path+"photo2.gif\"><a href=\""+domain_url2+link_path+"sitemap.htm\" onMouseOver=\"MM_swapImage('sitemap','',''+domain_url2+left_menu_img_path+'c_sitemapon.gif',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\""+domain_url2+left_menu_img_path+"c_sitemap.gif\" alt=\"sitemap\" name=\"sitemap\" border=\"0\" id=\"sitemap\"></a>";




scriptBuffer+="<a href=\""+domain_url2+link_path+"search.htm\" onMouseOver=\"MM_swapImage('search1','',''+domain_url2+left_menu_img_path+'c_searchon.gif',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\""+domain_url2+left_menu_img_path+"c_search.gif\" alt=\"Search\" name=\"search1\" border=\"0\" id=\"search1\"></a>";


scriptBuffer+="<a href=\""+domain_url2+link_path2+"main.htm\" onMouseOver=\"MM_swapImage('home','',''+domain_url2+left_menu_img_path+'c_homeon.gif',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\""+domain_url2+left_menu_img_path+"c_home.gif\" alt=\"Home\" name=\"home\" border=\"0\" id=\"home\"></a>";

//scriptBuffer+="<img src=\""+domain_url2+left_menu_img_path+"c_email.gif\"  border=\"0\" id=\"email\" width=\"129\" height=\"29\">";

//scriptBuffer+="<a href=\"javascript:changeVer('c_text')\" onMouseOver=\"MM_swapImage('imagetext','',''+domain_url2+left_menu_img_path+'c_texton.gif',1)\" onMouseOut=\"MM_swapImgRestore()\"><IMG SRC=\""+domain_url2+left_menu_img_path+"c_text.gif\" name=\"imagetext\"  border=\"0\"  id=\"imagetext\" alt=\"Text only\"></a>";

scriptBuffer+="<a href=\"mailto:wkcd@hab.gov.hk\" onMouseOver=\"MM_swapImage('email','',''+domain_url2+left_menu_img_path+'c_emailon.gif',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\""+domain_url2+left_menu_img_path+"c_email.gif\" alt=\"E-mail\" name=\"email\" border=\"0\" id=\"email\"></a><a href=\"javascript:changeVer('e_text');\" onMouseOver=\"MM_swapImage('Image1','',''+domain_url2+left_menu_img_path+'c_texton.gif',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\""+domain_url2+left_menu_img_path+"c_text.gif\" alt=\"Text only\" name=\"Image1\" border=\"0\" id=\"Image1\"></a>";


scriptBuffer+="<a href=\"http://www.hab.gov.hk/wkcd/chi/cc/search.htm\" onMouseOver=\"MM_swapImage('t_chinese','',\''+domain_url2+left_menu_img_path+'t_chineseon.gif',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\""+domain_url2+left_menu_img_path+"t_chinese.gif\" alt=\"Traditional Chinese\" name=\"t_chinese\" border=\"0\" id=\"t_chinese\"></a><a href=\"http://sc.info.gov.hk/gb/www.hab.gov.hk/wkcd/chi/cc/search.htm\" onMouseOver=\"MM_swapImage('s_chinese','',''+domain_url2+left_menu_img_path+'s_chineseon.gif',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\""+domain_url2+left_menu_img_path+"s_chinese.gif\" alt=\"Simplified Chinese\" name=\"s_chinese\" border=\"0\" id=\"s_chinese\"></a>";

return scriptBuffer;
} 

else  {

var scriptBuffer='';
	
scriptBuffer+="<img src=\""+domain_url2+left_menu_img_path+"photo2.gif\"><a href=\""+domain_url2+link_path+"sitemap.htm\" onMouseOver=\"MM_swapImage('sitemap','',''+domain_url2+left_menu_img_path+'c_sitemapon.gif',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\""+domain_url2+left_menu_img_path+"c_sitemap.gif\" alt=\"sitemap\" name=\"sitemap\" border=\"0\" id=\"sitemap\"></a>";




scriptBuffer+="<a href=\""+domain_url2+link_path+"search.htm\" onMouseOver=\"MM_swapImage('search1','',''+domain_url2+left_menu_img_path+'c_searchon.gif',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\""+domain_url2+left_menu_img_path+"c_search.gif\" alt=\"Search\" name=\"search1\" border=\"0\" id=\"search1\"></a>";


//scriptBuffer+="<img src=\""+domain_url2+left_menu_img_path+"c_search.gif\" alt=\"Search\" name=\"search1\" border=\"0\" id=\"search1\">";



scriptBuffer+="<a href=\""+domain_url2+link_path2+"main.htm\" onMouseOver=\"MM_swapImage('home','',''+domain_url2+left_menu_img_path+'c_homeon.gif',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\""+domain_url2+left_menu_img_path+"c_home.gif\" alt=\"Home\" name=\"home\" border=\"0\" id=\"home\"></a>";

//scriptBuffer+="<img src=\""+domain_url2+left_menu_img_path+"c_email.gif\"  border=\"0\" id=\"email\" width=\"129\" height=\"29\">";

scriptBuffer+="<a href=\"mailto:wkcd@hab.gov.hk\" onMouseOver=\"MM_swapImage(\'email\','',\''+domain_url2+left_menu_img_path+'c_emailon.gif\',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\""+domain_url2+left_menu_img_path+"c_email.gif\" alt=\"E-mail\" name=\"email\" border=\"0\" id=\"email\"></a><a href=\"javascript:changeVer('e_text')\" onMouseOver=\"MM_swapImage('imagetext','',''+domain_url2+left_menu_img_path+'c_texton.gif',1)\" onMouseOut=\"MM_swapImgRestore()\"><IMG SRC=\""+domain_url2+left_menu_img_path+"c_text.gif\" name=\"imagetext\"  border=\"0\"  id=\"imagetext\" alt=\"Text only\"></a>";

//scriptBuffer+="<a href=\"mailto:wkcd@hab.gov.hk\" onMouseOver=\"MM_swapImage('email','',''+domain_url2+left_menu_img_path+'c_emailon.gif',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\""+domain_url2+left_menu_img_path+"c_email.gif\" alt=\"E-mail\" name=\"email\" border=\"0\" id=\"email\"></a><a href=\"javascript:changeVer('e_text');\" onMouseOver=\"MM_swapImage('Image1','',''+domain_url2+left_menu_img_path+'c_texton.gif',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\""+domain_url2+left_menu_img_path+"c_text.gif\" alt=\"Text only\" name=\"Image1\" border=\"0\" id=\"Image1\"></a>";


scriptBuffer+="<a href=\"javascript:changeVer('c');\" onMouseOver=\"MM_swapImage('t_chinese','',\''+domain_url2+left_menu_img_path+'t_chineseon.gif',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\""+domain_url2+left_menu_img_path+"t_chinese.gif\" alt=\"Traditional Chinese\" name=\"t_chinese\" border=\"0\" id=\"t_chinese\"></a><a href=\"javascript:changeVer('s');\" onMouseOver=\"MM_swapImage('s_chinese','',''+domain_url2+left_menu_img_path+'s_chineseon.gif',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\""+domain_url2+left_menu_img_path+"s_chinese.gif\" alt=\"Simplified Chinese\" name=\"s_chinese\" border=\"0\" id=\"s_chinese\"></a>";

return scriptBuffer;


}

/*else if (atgb == "textchi") {
document.write("<A HREF=\"javascript:changeVer('c_Gra')\">繁體圖文版</A> | <A HREF=\"javascript:changeVer('s')\">簡體版</A> | <A href=\"javascript:changeVer('e')\">English</A>");

}

else if (atgb == "sc_textchi") {
document.write("<A HREF=\"javascript:changeVer('s_Gra')\">簡體圖文版</A> | <A HREF=\"javascript:changeVer('c')\">繁體版</A> | <A href=\"javascript:changeVer('e')\">English</A>");

}


else if (atgb == "texteng") {
document.write("<A HREF=\"javascript:changeVer('e_Gra')\">Graphical Mode</A> | <A HREF=\"javascript:changeVer('c')\">Traditional Chinese</A> | <A href=\"javascript:changeVer('s')\">Simplified Chinese</A>");

}*/


}



//generate the current topic
function getCurrentTopic(){


	if(location.href.toString().search('search.info.gov.hk') != -1){
	
	
	document.writeln('<img src="http://www.hab.gov.hk/wkcd/eng/images/cc/title122.gif" alt="Search result" border=0 >');

	

}


	//set image path for the topics
	var imagePath=domain_url2+left_menu_img_path;
	var topicImg = new Array();
	topicImg[1]='title1.gif';
	topicImg[2]='title2.gif';
	topicImg[3]='title3.gif';
	topicImg[4]='title4.gif';
	topicImg[5]='title5.gif';
	topicImg[6]='title6.gif';
	topicImg[7]='title7.gif';
	topicImg[8]='title8.gif';
	topicImg[9]='title9.gif';
	topicImg[10]='title10.gif';
	topicImg[11]='title11.gif';
	topicImg[12]='title12.gif';
	topicImg[13]='title13.gif';
	topicImg[14]='title14.gif';
	topicImg[15]='title15.gif';
	topicImg[16]='title16.gif';
	topicImg[17]='title17.gif';
	topicImg[18]='title18.gif';
	topicImg[19]='title19.gif';
	topicImg[20]='title20.gif';
	topicImg[21]='title21.gif';
	topicImg[22]='title22.gif';
	topicImg[23]='title23.gif';
	topicImg[24]='title24.gif';
	topicImg[25]='title25.gif';
	topicImg[120]='title120.gif';
	topicImg[121]='title121.gif';
	topicImg[122]='title122.gif';

	
	var subTopicImg = new Array();

	subTopicImg[99] = new Array();
	subTopicImg[99][1]='sub_title99_1.gif';
	subTopicImg[99][2]='sub_title99_2.gif';
	

	subTopicImg[2] = new Array();
	subTopicImg[2][1]='sub_title2_1.gif';
	subTopicImg[2][2]='sub_title2_2.gif';
	subTopicImg[2][3]='sub_title2_3.gif';
	subTopicImg[2][4]='sub_title2_4.gif';
	subTopicImg[2][5]='sub_title2_5.gif';
	subTopicImg[2][6]='sub_title2_6.gif';
	subTopicImg[2][7]='sub_title2_7.gif';
	subTopicImg[2][8]='sub_title2_8.gif';

	subTopicImg[3] = new Array();
	subTopicImg[3][1]='sub_title3_1.gif';
	subTopicImg[3][2]='sub_title3_2.gif';
	subTopicImg[3][3]='sub_title3_3.gif';
	subTopicImg[3][4]='sub_title3_4.gif';
	subTopicImg[3][5]='sub_title3_5.gif';

	subTopicImg[5] = new Array();
	subTopicImg[5][1]='sub_title5_1.gif';
	subTopicImg[5][2]='sub_title5_2.gif';
	subTopicImg[5][3]='sub_title5_3.gif';
	
	subTopicImg[6] = new Array();
	subTopicImg[6][1]='sub_title6_1.gif';
	subTopicImg[6][2]='sub_title6_2.gif';
	



	var topicMap = new Array();

	topicMap[1]='<map name="Map'+ mainTopic + '"><area shape="rect" coords="83,26,389,85" href="../intro/intro.htm"></map>';
	topicMap[2]='<map name="Map'+ mainTopic + '"><area shape="rect" coords="85,22,187,63" href="../customer/customer.htm"></map>';	
	topicMap[3]='<map name="Map'+ mainTopic + '"><area shape="rect" coords="85,22,187,63" href="../producer/producer.htm"></map>';
	topicMap[4]='<map name="Map'+ mainTopic + '"><area shape="rect" coords="85,22,187,63" href="#"></map>';
	topicMap[5]='<map name="Map'+ mainTopic + '"><area shape="rect" coords="77,9,202,54" href="../resource/resource.htm"></map>';
	topicMap[6]='<map name="Map'+ mainTopic + '"><area shape="rect" coords="77,9,202,54" href="../info/info.htm"></map>';
	topicMap[7]='<map name="Map'+ mainTopic + '"><area shape="rect" coords="77,9,202,54" href="../activity/activity.htm"></map>';
	topicMap[8]='<map name="Map'+ mainTopic + '"><area shape="rect" coords="87,19,212,64" href="../links/links.htm"></map>';
	topicMap[9]='<map name="Map'+ mainTopic + '"><area shape="rect" coords="87,19,212,64" href="../contact/contact.php"></map>';
	topicMap[10]='<map name="Map'+ mainTopic + '"><area shape="rect" coords="87,19,212,64" href="../sitemap/sitemap.htm"></map>';
	topicMap[11]='<map name="Map'+ mainTopic + '"><area shape="rect" coords="87,19,212,64" href="../disclaimer/disclaimer.htm"></map>';
	topicMap[12]='<map name="Map'+ mainTopic + '"><area shape="rect" coords="87,19,212,64" href="../links/links.htm"></map>';
	topicMap[13]='<map name="Map'+ mainTopic + '"><area shape="rect" coords="87,19,212,64" href="../contact/contact.php"></map>';
	topicMap[14]='<map name="Map'+ mainTopic + '"><area shape="rect" coords="87,19,212,64" href="../sitemap/sitemap.htm"></map>';
	topicMap[15]='<map name="Map'+ mainTopic + '"><area shape="rect" coords="87,19,212,64" href="../disclaimer/disclaimer.htm"></map>';

	var subtopicMap = new Array();

	subtopicMap[2] = new Array();
	subtopicMap[2][7]='<map name="Map'+ mainTopic + subtopicMapNO + '"><area shape="rect" coords="85,22,187,63" href="../customer/customer.htm"><area shape="rect" coords="204,31,345,64" href="../customer/customer7.htm"></map>';	
	subtopicMap[3] = new Array();
	subtopicMap[3][4]='<map name="Map'+ mainTopic + subtopicMapNO + '"><area shape="rect" coords="85,22,187,63" href="../producer/producer.htm"><area shape="rect" coords="204,36,374,68" href="../producer/producer_4.htm"></map>';
	subtopicMap[3][5]='<map name="Map'+ mainTopic + subtopicMapNO + '"><area shape="rect" coords="85,22,187,63" href="../producer/producer.htm"><area shape="rect" coords="203,36,254,63" href="../producer/producer_5.htm"></map>';
	
	
	//generate the topic image to the buffer variable
	var scriptBuffer='';
	if (selectedSubSection!=''&&selectedSubSection!=0) {
		thisSPath=subTopicImg[selectedSection][selectedSubSection];
		thisAlt=subTitle[selectedSection][selectedSubSection];
		if (thisSPath==undefined) {
			thisSPath='error.gif';
		}
	} else {
		thisSPath=topicImg[selectedSection];
		thisAlt=title[selectedSection];
		if (thisSPath==undefined) {
			thisSPath='error.gif';
		}

	

	}	

	

if (subtopicMapNO!="")
{
	scriptBuffer+='<img src="'+imagePath+thisSPath+'" alt="'+thisAlt+'" border=0 >';
	

//scriptBuffer += subtopicMap[mainTopic][subtopicMapNO];

}

else 


{
	scriptBuffer+='<img src="'+imagePath+thisSPath+'" alt="'+thisAlt+'" border=0>';
	

//scriptBuffer += topicMap[mainTopic];

}



	return scriptBuffer;

	


}

//generate the page footer to show the notices and revision date
function getFooter() {
	var copyYear='2004';
	var noticesLink=domain_url2+'/tc/notice.htm';
	revisionDate = '01/18/2005';
	if (revisionDate==''||revisionDate=='MM/DD/YYYY') revisionDate='01/01/2004';
	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 reDate=new Date(Date.parse(revisionDate))
	var showDate=reDate.getDate()+' '+monthArray[reDate.getMonth()]+' '+reDate.getFullYear();
	//generate the topic image to the buffer variable
	var scriptBuffer='';
	//scriptBuffer+='<table width="100%" border="0" cellspacing="0" cellpadding="0">';
	//scriptBuffer+='<tr>';
	//scriptBuffer+='<td colspan="4"><img src="'+domain_url2+'../images/Spacer.gif" width="1" height="4"></td>';
	//scriptBuffer+='</tr>';
	//scriptBuffer+='<tr>';
	scriptBuffer+='<font size="2">Last revision date: '+showDate;
	//scriptBuffer+='<td><img src="'+domain_url2+'../images/Spacer.gif" width="8" height="1"></font></td>';
	//scriptBuffer+='</tr>';
	//scriptBuffer+='</table>';
	
	return scriptBuffer;
}

//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_url2 + 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();
    }
   // return true;
}

function externalLink(url)
{eval("nw = window.open(url, 'external','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,pageXOffset=0,pageYOffset=0,top=0,left=0,width=400,height=600')");
	if ( nw.focus != null)
	{nw.focus();}
}

function documentPopUp(url){
if(location.href.toString().search('/gb/') != -1){
	var pathName = document.location.pathname;
	var PathAdd = pathName.indexOf("/tc/");
	var Main_url = pathName.substr(0, PathAdd);
	url = Main_url + url
	if(url.toString().search('.pdf') != -1){
		url = url.replace('/tc/', '/sc/');
	}
//	alert(url);
}

eval("nw = window.open(url, 'document','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,pageXOffset=0,pageYOffset=0,top=0,left=0,width=400,height=600')");
	if ( nw.focus != null)
	{nw.focus();}
}
