//gen menu ver. 4.0

level_1 = new Array('eindex.html', 'whatsnew', 'aboutus', 'programmes', 'annex', 'info', 'other', 'archives','contactus', 'sitemap', 'search', 'notices');


//level 1

function genmenu(){	
	//gentable('/rru/english/'+'link','alt','target','layer');
	gentable('/rru/english/'+'home/index.html', 'Home', '', '');
	gentable('/rru/english/'+'whatsnew/whatsnew.html', 'What\'s New', '', '');
	gentable('/rru/english/'+'aboutus/aboutus.html', 'About Us', '', 'y');
	//gentable('/rru/english/'+'enquiries/enquiries.html', 'Enquiries &amp; Complaints', '', 'y');
	gentable('/rru/english/'+'programmes/programmes.html', 'Programmes and Services', '', 'y');
	
	gentable('/rru/english/'+'annex/annex.html', 'Information in Other Languages', '', 'y');
	
	//gentable('/rru/english/'+'activities/activities.html', 'Activities', '', 'y');
	gentable('/rru/english/'+'info/info.html', 'Information Centre', '', 'y');
	gentable('/rru/english/'+'other/other_useful.html', 'Useful Links', '', '');
	gentable('/rru/english/'+'archives/archives.html', 'Archives', '', '');	
	gentable('/rru/english/'+'contactus/contactus.html', 'Contact Us', '', '');	
	gentable('', 'Site Map', '', '');	
	gentable('', 'Search', '', '');
	gentable('', 'Important notices', '', '');
	
}


//end level 1

//level 2

function genlayer(){
	
	//gentable('/rru/english/'+'link','alt','orgcolor','overcolor','target');
	for(l=0; l<layer.length; l++){
		if(layer[l] == 'About Us'){ //About us
			genlayerheader(l);
			genlaytab('/rru/english/'+'aboutus/aboutus_cprh.html', 'The Committee on the Promotion of Racial Harmony', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'aboutus/aboutus_forum.html', 'Ethnic Minorities Forum', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'aboutus/aboutus_rru.html', 'Race Relations Unit', '#ADD9DD', '#5BB4BC', '');
			genlayerfooter();

		}else if(layer[l]  == 'Enquiries &amp; Complaints'){ //Enquiries &amp; Complaints
			genlayerheader(l);
			genlaytab('/rru/english/'+'enquiries/enquiries_rru.html', 'Enquiries and Complaints to Race Relations Unit', '#ADD9DD', '#5BB4BC', '');
			/*genlaytab('/rru/english/'+'enquiries/enquiries_how.html', 'How to complain', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'enquiries/enquiries_exp.html', 'Examples of complaints', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'enquiries/enquiries_com.html', 'Complaint form and statistics', '#ADD9DD', '#5BB4BC', '');*/
			genlayerfooter();

		/*}else if(layer[l]  == 'Activities'){ //Activities
			genlayerheader(l);
			genlaytab('/rru/english/'+'activities/activities_edu.html', 'Educational activities', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'activities/activities_cul.html', 'Cultural activities', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'activities/activities_comm.html', 'Community participation activities', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'activities/activities_rad.html', 'Radio Programme', '#ADD9DD', '#5BB4BC', '');
			genlayerfooter();
		*/
			
		}else if(layer[l]  == 'Programmes and Services'){ //Activities
			genlayerheader(l);
			genlaytab('/rru/english/'+'programmes/programmes_int.html', 'Integration Programmes for Ethnic Minorities', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'programmes/programmes_sup.html', 'Support Services for Ethnic Minorities', '#ADD9DD', '#5BB4BC', '');
			genlayerfooter();

		
		
		}else if(layer[l]  == 'Information Centre'){ //Information Centre		
			genlayerheader(l);
			
			genlaytab('/rru/english/'+'info/info_flu.html', 'Guide to Personal and Domestic Hygiene in Combating Human Swine Influenza', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'info/info_pub.html', 'Publications', '#ADD9DD', '#5BB4BC', '');
			
			//genlaytab('/rru/english/'+'info/info_vir.html', 'Virtual Classroom', '#ADD9DD', '#5BB4BC', '');
			//genlaytab('/rru/english/'+'info/info_eve.html', 'Events Calendar', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'info/info_dem.html', 'Demographics', '#ADD9DD', '#5BB4BC', '');
			genlayerfooter();

		}else if(layer[l]  == 'Other Information'){ //Other Information		
			genlayerheader(l);
			genlaytab('/rru/english/'+'other/other_useful.html', 'Useful Links', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'other/other_down.html', 'Downloadable Forms', '#ADD9DD', '#5BB4BC', '');
			genlayerfooter();

		}
	}
}

function genmenu_fullpath(domain, fullpath){	
	//gentable('/rru/english/'+'link','alt','target','layer');
	gentable('/rru/english/'+'home/index.html', 'Home', '', '');
	gentable('/rru/english/'+'whatsnew/whatsnew.html', 'What\'s New', '', '');
	gentable('/rru/english/'+'aboutus/aboutus.html', 'About Us', '', 'y');
	gentable('/rru/english/'+'enquiries/enquiries.html', 'Enquiries &amp; Complaints', '', 'y');
	gentable('/rru/english/'+'programmes/programmes.html', 'Programmes', '', 'y');
	
	gentable('/rru/english/'+'annex/annex.html', 'Information for Annex', '', 'y');
	
	//gentable('/rru/english/'+'activities/activities.html', 'Activities', '', 'y');
	gentable('/rru/english/'+'info/info.html', 'Information Centre', '', 'y');
	gentable('/rru/english/'+'other/other_useful', 'Useful Links', '', '');
	//gentable('/rru/english/'+'other/other.html', 'Other Information', '', 'y');
	gentable('/rru/english/'+'archives/archives.html', 'Archives', '', '');
	gentable('/rru/english/'+'contactus/contactus.html', 'Contact Us', '', '');	
	gentable('', 'Site Map', '', '');	
	gentable('', 'Search', '', '');
	gentable('', 'Important notices', '', '');
	
}

function genlayer_fullpath(fullpath){
	//gentable('/rru/english/'+'link','alt','orgcolor','overcolor','target');
	for(l=0; l<layer.length; l++){
		if(layer[l] == 'About Us'){ //About us
			genlayerheader(l);
			genlaytab('/rru/english/'+'aboutus/aboutus_cprh.html', 'The Committee on the Promotion of Racial Harmony', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'aboutus/aboutus_rru.html', 'Race Relations Unit', '#ADD9DD', '#5BB4BC', '');
			genlayerfooter();

		}else if(layer[l]  == 'Enquiries &amp; Complaints'){ //Enquiries &amp; Complaints
			genlayerheader(l);
			genlaytab('/rru/english/'+'enquiries/enquiries_rru.html', 'Enquiries and Complaints to Race Relations Unit', '#ADD9DD', '#5BB4BC', '');
			/*genlaytab('/rru/english/'+'enquiries/enquiries_how.html', 'How to complain', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'enquiries/enquiries_exp.html', 'Examples of complaints', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'enquiries/enquiries_com.html', 'Complaint form and statistics', '#ADD9DD', '#5BB4BC', '');*/
			genlayerfooter();
        /*
		}else if(layer[l]  == 'Activities'){ //Activities
			genlayerheader(l);
			genlaytab('/rru/english/'+'activities/activities_edu.html', 'Educational activities', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'activities/activities_cul.html', 'Cultural activities', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'activities/activities_comm.html', 'Community participation activities', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'activities/activities_rad.html', 'Radio Programme', '#ADD9DD', '#5BB4BC', '');
			genlayerfooter();
		*/
			
		}else if(layer[l]  == 'Programmes and Services'){ //Activities
			genlayerheader(l);
			genlaytab('/rru/english/'+'programmes/programmes_int.html', 'Integration Programmes for Ethnic Minorities', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'programmes/programmes_sup.html', 'Support Services for Ethnic Minorities', '#ADD9DD', '#5BB4BC', '');
			genlayerfooter();

			

		}else if(layer[l]  == 'Information Centre'){ //Information Centre		
			genlayerheader(l);
			genlaytab('/rru/english/'+'info/info_flu.html', 'Guide to Personal and Domestic Hygiene in Combating Human Swine Influenza', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'info/info_pub.html', 'Publications', '#ADD9DD', '#5BB4BC', '');
			//genlaytab('/rru/english/'+'info/info_vir.html', 'Virtual Classroom', '#ADD9DD', '#5BB4BC', '');
			//genlaytab('/rru/english/'+'info/info_eve.html', 'Events Calendar', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'info/info_dem.html', 'Demographics', '#ADD9DD', '#5BB4BC', '');
			genlayerfooter();

		}else if(layer[l]  == 'Other Information'){ //Other Information		
			genlayerheader(l);
			genlaytab('/rru/english/'+'other/other_useful.html', 'Useful Links', '#ADD9DD', '#5BB4BC', '');
			genlaytab('/rru/english/'+'other/other_down.html', 'Downloadable Forms', '#ADD9DD', '#5BB4BC', '');
			genlayerfooter();
		} 
	}
}

//end level 2

function genbanner(){

	document.write('<A HREF="http://www.gov.hk/en/theme/fightpandemic/index.htm" target=_blank><img src="/rru/english/images/banner/fightpandemic.jpg" alt="Fight Against Pandemic" border=0></A><br><img src="/rru/english/images/general/dotline1.gif" vspace="5"><br><A HREF="http://www.info.gov.hk/info/flu/eng/index.htm" target=_blank><img src="/rru/english/images/banner/side_logo02.gif" alt="Prevention of Avian Flu" border=0></A><br><img src="/rru/english/images/general/dotline1.gif" vspace="5"><br><A HREF="http://www.smartid.gov.hk/" target=_blank><img src="/rru/english/images/banner/smartid.gif" alt="Smart ID" border=0></A><BR><img src="/rru/english/images/general/dotline1.gif" vspace="5"><br><A HREF="http://news.gov.hk/" target=_blank><img src="/rru/english/images/banner/news_e.gif" alt="news.gov.hk" border=0></A>');

	}

function getHeader()

{document.writeln('<table width="760" border="0" cellspacing="0" cellpadding="0" background="/rru/english/images/clf/bkgdtexture.gif">              <form name="searchform" action="http://search.gov.hk/search.html" method="get"><INPUT name="exact_q" type="hidden" value="">	<INPUT name="any_q" type="hidden" value="">	<INPUT name="none_q" type="hidden" value="">	<INPUT name="gp0" type="hidden" value="cmab-rru_home">	<INPUT name="gp1" type="hidden" value="cmab-rru_home">	<INPUT name="p_size" type="hidden" value="10">	<INPUT name="doc_type" type="hidden" value="all">	<INPUT name="last_mod" type="hidden" value="#-1">	<INPUT name="r_lang" type="hidden" value="all">	<INPUT name="tpl_id" type="hidden" value="cmab-rru">	<INPUT name="a_submit" type="hidden" value="false">	<INPUT name="web" type="hidden" value="this">	<INPUT name="txtonly" type="hidden" value="0">	<INPUT name="ui_lang" type="hidden" value="en">	<INPUT name="ui_charset" type="hidden" value="iso-8859-1"><tr valign="top">                   <td width="538" rowspan="2"> <table width="538" border="0" cellspacing="0" cellpadding="0">                      <tr valign="top">                         <td colspan="2"><img src="/rru/english/images/clf/logo.gif" alt="Race Relations Unit The Government of the Hong Kong Special Administrative Region"></td>                      </tr>                      <tr valign="top">                         <td> <table  border="0" cellspacing="0" cellpadding="0">                            <tr valign="top">                              <td><a href="http://www.gov.hk/en/residents/" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'mainbar1\',\'\',\'/rru/english/images/clf/gic_over.gif\',1)" target="_blank" ><img name="mainbar1" src="/rru/english/images/clf/gic.gif" border="0" alt="GovHK"></a></td>                              <td><a href="javascript:chglang(\'entxt\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'mainbar2\',\'\',\'/rru/english/images/clf/mainbar2_f2.gif\',1)" ><img name="mainbar2" src="/rru/english/images/clf/mainbar2.gif" border="0" alt="Text Only"></a></td>                              <td><a href="javascript:chglang(\'tc\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar3\',\'\',\'/rru/english/images/clf/mainbar3_f2.gif\',1)" ><img name="mainbar3" src="/rru/english/images/clf/mainbar3.gif" border="0" alt="Traditional Chinese"></a></td>                              <td><a href="javascript:chglang(\'sc\')" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar4\',\'\',\'/rru/english/images/clf/mainbar4_f2.gif\',1)" ><img name="mainbar4" src="/rru/english/images/clf/mainbar4.gif" border="0" alt="Simplified Chinese"></a></td>                              <td><img name="mainbar5" src="/rru/english/images/clf/mainbar5.gif" border="0" alt="image"></td>                              <td align="left">&nbsp;</td>                            </tr>                          </table></td>                        <td align="right"><a href="javascript:document.searchform.submit();" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar6\',\'\',\'/rru/english/images/clf/mainbar6_f2.gif\',1)" ><img name="mainbar6" src="/rru/english/images/clf/mainbar6.gif" border="0" alt="Search"></a></td>                     </tr>                    </table></td>                  <td colspan="2" align="right" valign="bottom"><a href="http://www.brandhk.gov.hk/brandhk/eindex.htm" target="_blank"><img name="BrandHK" src="/rru/english/images/clf/brandhk.gif" border="0" alt="Brand Hong Kong - Asia\'s world city"></a></td>                </tr>                <tr valign="top">                   <td width="99" valign="bottom" align="left"><input class="search" type="text" name="query" size="9" style="width:73pt">                   </td>                  <td width="123" valign="bottom"> <table width="123" border="0" cellspacing="0" cellpadding="0">                      <tr valign="bottom" align="right">                         <td> <table width="123" border="0" cellspacing="0" cellpadding="0">                            <tr valign="top">                               <td><a href="javascript:document.searchform.submit();" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'mainbar8\',\'\',\'/rru/english/images/clf/mainbar8_f2.gif\',1)"><img name="mainbar8" border="0" src="/rru/english/images/clf/mainbar8.gif" alt="Search Graphic"></a></td>                              <td><a href="/rru/english/sitemap/sitemap.html" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar9\',\'\',\'/rru/english/images/clf/mainbar9_f2.gif\',1)" ><img name="mainbar9" src="/rru/english/images/clf/mainbar9.gif" border="0" alt="Site Map"></a></td>                              <td><a href="/rru/english/contactus/contactus.html" onMouseOut="MM_swapImgRestore()"  onMouseOver="MM_swapImage(\'mainbar10\',\'\',\'/rru/english/images/clf/mainbar10_f2.gif\',1)" ><img name="mainbar10" src="/rru/english/images/clf/mainbar10.gif" border="0" alt="Contact Us"></a></td>                            </tr>                          </table></td>                      </tr>                    </table></td>                </tr>              </form>           </table>');}