function placename(){
		path = location.href;
		len_path = path.length;
		path2 = path.substring (7,len_path);
		path2_id = path2.lastIndexOf("/");
		path2 = path2.substring (0,path2_id);
		path2_id = path2.lastIndexOf("/");
		path3 = path2.substring (0,path2_id);
		path3_id = path3.lastIndexOf("/");
		len_path = path3.length;
		path3 = path3.substring (path3_id+1,len_path);
		//document.write(path3);
		return (path3);
}

function foldername(){
	 path = location.href;
	 len_path = path.length;
	 path2 = path.substring (7,len_path);
	 path2_id = path2.lastIndexOf("/");
	 path2 = path2.substring(0,path2_id);
	 path2_id = path2.lastIndexOf("/");
	 len_path = path2.length;
	 path2 = path2.substring (path2_id+1,len_path);
	// document.write(path2);
	 return path2;
}

function filename(){
	path = location.href;
	file_id = path.lastIndexOf("/");
	file_id2 = path.lastIndexOf(".");
	fname = path.substring(file_id+1,file_id2);
	return fname;
}

function calc(){
	window.open('../application/refund.htm','RefundCalculator','width=500,height=300,left=0,top=0,screenX=0,screenY=0,resizable=0,status=0,menubar=0,scrollbars=0')
}

function submenu(){
	//icon 8 (What's New / News)
	if (foldername() == "news"){
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
		document.write ("<img name=\"new\" border=\"0\" src=\"../images/menu/news_hl.gif\" width=\"131\" height=\"24\" alt=\"最新消息\"></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}else{
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
		document.write ("<a href=\"../news/news_tko.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('new','','../images/menu/news_ro.gif',1)\"><img name=\"new\" border=\"0\" src=\"../images/menu/news.gif\" width=\"131\" height=\"24\" alt=\"最新消息\"></a>");
	}
	
	//sub menu 8
	// Modify @ 04092004 //
	if ((placename() == "jolly_place") && (filename() == "news_tko") && (foldername() == "news")) {
 		document.write ("<img name=\"new01\" border=\"0\" src=\"../images/menu/news_tko_ro.gif\" width=\"131\" height=\"19\" alt=\"樂頤居\">");
 		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
 	}else if ((placename() == "jolly_place") && (foldername()== "news")){
 		document.write ("<a href=\"../news/news_tko.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('new01','','../images/menu/news_tko_ro.gif',1)\"><img name=\"new01\" border=\"0\" src=\"../images/menu/news_tko.gif\" width=\"131\" height=\"19\" alt=\"樂頤居\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
 	} 
		if ((placename() == "cheerful_court") && (filename() == "news_tko") && (foldername() == "news")) {
 		document.write ("<img name=\"new01\" border=\"0\" src=\"../images/menu/news_tko_ro.gif\" width=\"131\" height=\"19\" alt=\"彩頤居\">");
 		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
 	}else if ((placename() == "cheerful_court") && (foldername()== "news")){
 		document.write ("<a href=\"../news/news_tko.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('new01','','../images/menu/news_tko_ro.gif',1)\"><img name=\"new01\" border=\"0\" src=\"../images/menu/news_tko.gif\" width=\"131\" height=\"19\" alt=\"彩頤居\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
 	} 
		
 		//Opening Hours
 	if ((filename() == "news_opening") && (foldername() == "news")){
		document.write ("<img name=\"new02\" border=\"0\" src=\"../images/menu/news_open_ro.gif\" width=\"131\" height=\"19\" alt=\"示範單位\">");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}else if (foldername()=="news"){
		document.write ("<a href=\"news_opening.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('new02','','../images/menu/news_open_ro.gif',1)\"><img name=\"new02\" border=\"0\" src=\"../images/menu/news_open.gif\" width=\"131\" height=\"19\" alt=\"示範單位\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}
		//Ballot Results
	if ((filename() == "news_ballot") && (foldername() == "news")){
		document.write ("<img name=\"new03\" border=\"0\" src=\"../images/menu/news_ballot_ro.gif\" width=\"131\" height=\"19\" alt=\"抽籤結果\">");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}else if (foldername()=="news"){
		document.write ("<a href=\"news_ballot.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('new03','','../images/menu/news_ballot_ro.gif',1)\"><img name=\"new03\" border=\"0\" src=\"../images/menu/news_ballot.gif\" width=\"131\" height=\"19\" alt=\"抽籤結果\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}
		//Flat Selection Status
	if ((filename() == "news_flat") && (foldername() == "news")){
		document.write ("<img name=\"new06\" border=\"0\" src=\"../images/menu/news_flat_ro.gif\" width=\"131\" height=\"19\" alt=\"單位租賃情況\">");
	}else if (foldername()=="news"){
		document.write ("<a href=\"news_flat.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('new06','','../images/menu/news_flat_ro.gif',1)\"><img name=\"new06\" border=\"0\" src=\"../images/menu/news_flat.gif\" width=\"131\" height=\"19\" alt=\"單位租賃情況\"></a>");
	}
/*	//Press Release
	if ((filename() == "news_press") && (foldername() == "news")){
		document.write ("<img name=\"new05\" border=\"0\" src=\"../images/menu/news_press_ro.gif\" width=\"131\" height=\"19\" alt=\"新聞稿\">");
	}else if (foldername()=="news"){
		document.write ("<a href=\"news_press.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('new05','','../images/menu/news_press_ro.gif',1)\"><img name=\"new05\" border=\"0\" src=\"../images/menu/news_press.gif\" width=\"131\" height=\"19\" alt=\"新聞稿\"></a>");
	}
*/

	//icon 1 (Background)
	if (foldername() == "background"){
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
		document.write ("<img name=\"Image9\" border=\"0\" src=\"../images/menu/bg_hl.gif\" width=\"131\" height=\"38\" alt=\"長者安居樂住屋計劃背景\">");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}else{
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
		document.write ("<a href=\"../background/exesum.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image9','','../images/menu/bg_ro.gif',1)\"><img name=\"Image9\" border=\"0\" src=\"../images/menu/bg.gif\" width=\"131\" height=\"38\" alt=\"長者安居樂住屋計劃背景\"></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}
 	
 	//sub menu 1
 	if ((filename() == "exesum") && (foldername() == "background")) {
 		//execute summary
 		document.write ("<img name=\"Image10\" border=\"0\" src=\"../images/menu/bg_executive_ro.gif\" width=\"131\" height=\"19\" alt=\"摘要\">");
 		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
 	}else if (foldername()== "background"){
 		document.write ("<a href=\"../background/exesum.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image10','','../images/menu/bg_executive_ro.gif',1)\"><img name=\"Image10\" border=\"0\" src=\"../images/menu/bg_executive.gif\" width=\"131\" height=\"19\" alt=\"摘要\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
 	}
 	
 	if ((filename() == "design") && (foldername() == "background")){
		document.write ("<img name=\"Image11\" border=\"0\" src=\"../images/menu/bg_design_ro.gif\" width=\"131\" height=\"19\" alt=\"設計\">");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}else if (foldername()=="background"){
		document.write ("<a href=\"../background/design.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image11','','../images/menu/bg_design_ro.gif',1)\"><img name=\"Image11\" border=\"0\" src=\"../images/menu/bg_design.gif\" width=\"131\" height=\"19\" alt=\"設計\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}
	
	if ((filename() == "bentocus") && (foldername() == "background")){
		document.write ("<img name=\"Image12\" border=\"0\" src=\"../images/menu/bg_benefits_ro.gif\" width=\"131\" height=\"34\" alt=\"為服務對象帶來的裨益\">");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}else if (foldername()=="background"){
		document.write ("<a href=\"../background/bentocus.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image12','','../images/menu/bg_benefits_ro.gif',1)\"><img name=\"Image12\" border=\"0\" src=\"../images/menu/bg_benefits.gif\" width=\"131\" height=\"34\" alt=\"為服務對象帶來的裨益\"></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}


	//icon 2 (Video)
	
	if (foldername() == "video"){
		//document.write ("<img src=\"../images/menu/grey_line.gif\">");
		document.write("<img name=\"Image13\" border=\"0\" src=\"../images/menu/video_hl.gif\" width=\"131\" height=\"24\" alt=\"影片\">");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}else{
		//document.write ("<img src=\"../images/menu/grey_line.gif\">");
		document.write("<a href=\"../video/video.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image13','','../images/menu/video_ro.gif',1)\"><img name=\"Image13\" border=\"0\" src=\"../images/menu/video.gif\" width=\"131\" height=\"24\" alt=\"影片\"></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}
	
	//icon 3 (Map)
	
	if (foldername() == "maps"){
		//document.write ("<img src=\"../images/menu/grey_line.gif\">");
		document.write("<img name=\"Image14\" border=\"0\" src=\"../images/menu/maps_hl.gif\" width=\"131\" height=\"24\" alt=\"地圖\">");	
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}else{
		//document.write ("<img src=\"../images/menu/grey_line.gif\">");
		document.write("<a href=\"../maps/loca_tko.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image14','','../images/menu/maps_ro.gif',1)\"><img name=\"Image14\" border=\"0\" src=\"../images/menu/maps.gif\" width=\"131\" height=\"24\" alt=\"地圖\"></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}
	
	//sub menu 3
	// Modify @ 04092004 //
	if ((placename() == "jolly_place") && (filename() == "loca_tko") && (foldername() == "maps")) {
 		document.write ("<img name=\"Image34\" border=\"0\" src=\"../images/menu/maps_lm_tko_ro.gif\" width=\"131\" height=\"33\" alt=\"位置圖 (樂頤居)\">");
 		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
 	}else if ((placename() == "jolly_place") && (foldername()== "maps")){
 		document.write ("<a href=\"../maps/loca_tko.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image34','','../images/menu/maps_lm_tko_ro.gif',1)\"><img name=\"Image34\" border=\"0\" src=\"../images/menu/maps_lm_tko.gif\" width=\"131\" height=\"33\" alt=\"位置圖 (樂頤居)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
 	}
	
	if ((placename() == "cheerful_court") && (filename() == "loca_tko") && (foldername() == "maps")) {
 		document.write ("<img name=\"Image34\" border=\"0\" src=\"../images/menu/maps_lm_tko_ro.gif\" width=\"131\" height=\"33\" alt=\"位置圖 (彩頤居)\">");
 		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
 	}else if ((placename() == "cheerful_court") && (foldername()== "maps")){
 		document.write ("<a href=\"../maps/loca_tko.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image34','','../images/menu/maps_lm_tko_ro.gif',1)\"><img name=\"Image34\" border=\"0\" src=\"../images/menu/maps_lm_tko.gif\" width=\"131\" height=\"33\" alt=\"位置圖 (彩頤居)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
 	}
	
		
	if ((placename() == "jolly_place") && (foldername() == "maps") && ((filename() == "fp_tko_gf") || (filename() == "fp_tko_1f") || (filename() == "fp_tko_2f") || (filename() == "fp_tko_3f") || (filename() == "fp_tko_5f") || (filename() == "fp_tko_6f") || (filename() == "fp_tko_7f") || (filename() == "fp_tko_21f") || (filename() == "fp_tko_mf") || (filename() == "fp_tko_rp") || (filename() == "fp_tko_mrp"))) {
 		document.write ("<img name=\"Image35\" border=\"0\" src=\"../images/menu/maps_fp_tko_ro.gif\" width=\"131\" height=\"33\" alt=\"樓宇平面圖 (樂頤居)\">");
 		document.write ("<img src=\"../images/menu/grey_line.gif\">");
 	}else if ((foldername()== "maps") && (placename() == "jolly_place")){
 		document.write ("<a href=\"../maps/fp_tko_gf.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image35','','../images/menu/maps_fp_tko_ro.gif',1)\"><img name=\"Image35\" border=\"0\" src=\"../images/menu/maps_fp_tko.gif\" width=\"131\" height=\"33\" alt=\"樓宇平面圖 (樂頤居)\"></a>");
 		document.write ("<img src=\"../images/menu/grey_line.gif\">");
 	}

 if ((placename() == "cheerful_court") && (foldername() == "maps") && ((filename() == "fp_tko_b4") || (filename() == "fp_tko_b3") || (filename() == "fp_tko_b2") ||(filename() == "fp_tko_b1") ||(filename() == "fp_tko_gf") || (filename() == "fp_tko_1f") || (filename() == "fp_tko_2f") || (filename() == "fp_tko_3f") || (filename() == "fp_tko_5f") || (filename() == "fp_tko_26f") || (filename() == "fp_tko_rp") || (filename() == "fp_tko_mrp"))) {
 		document.write ("<img name=\"Image35\" border=\"0\" src=\"../images/menu/maps_fp_tko_ro.gif\" width=\"131\" height=\"33\" alt=\"樓宇平面圖 (彩頤居)\">");
 		document.write ("<img src=\"../images/menu/grey_line.gif\">");
 	}else if ((foldername()== "maps") && (placename() == "cheerful_court")){
 		document.write ("<a href=\"../maps/fp_tko_gf.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image35','','../images/menu/maps_fp_tko_ro.gif',1)\"><img name=\"Image35\" border=\"0\" src=\"../images/menu/maps_fp_tko.gif\" width=\"131\" height=\"33\" alt=\"樓宇平面圖 (彩頤居)\"></a>");
 		document.write ("<img src=\"../images/menu/grey_line.gif\">");
 	}

/*	if ((placename() == "cheerful_place") && (filename() == "fp_tko") && (foldername() == "maps")) {
 		document.write ("<img name=\"Image35\" border=\"0\" src=\"../images/menu/maps_fp_tko_ro.gif\" width=\"131\" height=\"33\" alt=\"樓宇平面圖 \">");
 		document.write ("<img src=\"../images/menu/grey_line.gif\">");
 	}else if (foldername()== "maps" && placename() == "cheerful_court"){
 		document.write ("<a href=\"../maps/fp_tko_b4.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image35','','../images/menu/maps_fp_tko_ro.gif',1)\"><img name=\"Image35\" border=\"0\" src=\"../images/menu/maps_fp_tko.gif\" width=\"131\" height=\"33\" alt=\"樓宇平面圖 (彩頤居)\"></a>");
 		document.write ("<img src=\"../images/menu/grey_line.gif\">");
 	}else if (foldername()== "maps" && placename() == "jolly_place"){
 		document.write ("<a href=\"../maps/fp_tko_gf.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image35','','../images/menu/maps_fp_tko_ro.gif',1)\"><img name=\"Image35\" border=\"0\" src=\"../images/menu/maps_fp_tko.gif\" width=\"131\" height=\"33\" alt=\"樓宇平面圖 (樂頤居)\"></a>");
 		document.write ("<img src=\"../images/menu/grey_line.gif\">");
 	}
*/	
	/*	if (((filename() == "fp_tko") && (foldername() == "maps")) || (filename() == "fp_tko_b4") || (filename() == "fp_tko_b3") || (filename() == "fp_tko_b2") || (filename() == "fp_tko_b1") || (filename() == "fp_tko_mf") || (filename() == "fp_tko_gf") || (filename() == "fp_tko_1f") || (filename() == "fp_tko_2f") || (filename() == "fp_tko_3f") || (filename() == "fp_tko_5f") || (filename() == "fp_tko_6f") || (filename() == "fp_tko_7f") || (filename() == "fp_tko_21f") || (filename() == "fp_tko_26f") ||(filename() == "fp_tko_rp") || (filename() == "fp_tko_mrp")) {
 		document.write ("<img name=\"Image35\" border=\"0\" src=\"../images/menu/maps_fp_tko_ro.gif\" width=\"131\" height=\"33\" alt=\"樓宇平面圖 \">");
 		document.write ("<img src=\"../images/menu/grey_line.gif\">");
 	}else if (foldername()== "maps" && placename() == "cheerful_court"){
 		document.write ("<a href=\"../maps/fp_tko_b4.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image35','','../images/menu/maps_fp_tko_ro.gif',1)\"><img name=\"Image35\" border=\"0\" src=\"../images/menu/maps_fp_tko.gif\" width=\"131\" height=\"33\" alt=\"樓宇平面圖 (彩頤居)\"></a>");
 		document.write ("<img src=\"../images/menu/grey_line.gif\">");
 	}else if (foldername()== "maps" && placename() == "jolly_place"){
 		document.write ("<a href=\"../maps/fp_tko_gf.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image35','','../images/menu/maps_fp_tko_ro.gif',1)\"><img name=\"Image35\" border=\"0\" src=\"../images/menu/maps_fp_tko.gif\" width=\"131\" height=\"33\" alt=\"樓宇平面圖 (樂頤居)\"></a>");
 		document.write ("<img src=\"../images/menu/grey_line.gif\">");
 	}

	if ((filename() == "loca_jv") && (foldername() == "maps")) {
 		document.write ("<img name=\"Image37\" border=\"0\" src=\"../images/menu/maps_lm_jv_ro.gif\" width=\"131\" height=\"33\" alt=\"位置圖 (牛頭角佐敦谷)\">");
 		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
 	}else if (foldername()== "maps"){
 		document.write ("<a href=\"../maps/loca_jv.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image37','','../images/menu/maps_lm_jv_ro.gif',1)\"><img name=\"Image37\" border=\"0\" src=\"../images/menu/maps_lm_jv.gif\" width=\"131\" height=\"33\" alt=\"位置圖 (牛頭角佐敦谷)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
 	}
 		
	if (((filename() == "fp_jv") && (foldername() == "maps")) || (filename() == "fp_jv_urp") || (filename() == "fp_jv_rp") || (filename() == "fp_jv_12f") || (filename() == "fp_jv_5f") || (filename() == "fp_jv_3f") || (filename() == "fp_jv_2f") || (filename() == "fp_jv_1f") || (filename() == "fp_jv") || (filename() == "fp_jv_b1") || (filename() == "fp_jv_b2") || (filename() == "fp_jv_b3") || (filename() == "fp_jv_b4")) {
 		document.write ("<img name=\"Image36\" border=\"0\" src=\"../images/menu/maps_fp_jv_ro.gif\" width=\"131\" height=\"33\" alt=\"樓宇平面圖 (牛頭角佐敦谷)\">");
 		document.write ("<img src=\"../images/menu/grey_line.gif\">");
 	}else if (foldername()== "maps"){
 		document.write ("<a href=\"../maps/fp_jv.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image36','','../images/menu/maps_fp_jv_ro.gif',1)\"><img name=\"Image36\" border=\"0\" src=\"../images/menu/maps_fp_jv.gif\" width=\"131\" height=\"33\" alt=\"樓宇平面圖 (牛頭角佐敦谷)\"></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
 	}

		if ((filename() == "property") && (foldername() == "maps")) {
 		document.write ("<img name=\"Image38\" border=\"0\" src=\"../images/menu/maps_property_ro.gif\" width=\"131\" height=\"19\" alt=\"租住權費表\">");
 		document.write ("<img src=\"../images/menu/grey_line.gif\">");
 	}else if (foldername()== "maps"){
 		document.write ("<a href=\"#\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image38','','../images/menu/maps_property_ro.gif',1)\"><img name=\"Image38\" border=\"0\" src=\"../images/menu/maps_property.gif\" width=\"131\" height=\"19\" alt=\"租住權費表\"></a>");
 		document.write ("<img src=\"../images/menu/grey_line.gif\">");
 	}
 	*/
	//icon 4
   // If Cheerful  Court , fs fontpage = tko_gym , else if Jolly Place, fs frontpage = tko_hydropool.
	
	if (foldername() == "fs"){
		//document.write ("<img src=\"../images/menu/grey_line.gif\">");
		document.write("<img name=\"Image15\" border=\"0\" src=\"../images/menu/fs_hl.gif\" width=\"131\" height=\"24\" alt=\"設施及服務\">");	
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}else if (placename() == "cheerful_court"){
		//document.write ("<img src=\"../images/menu/grey_line.gif\">");
		document.write ("<a href=\"../fs/tko_gym.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image15','','../images/menu/fs_ro.gif',1)\"><img name=\"Image15\" border=\"0\" src=\"../images/menu/fs.gif\" width=\"131\" height=\"24\" alt=\"設施及服務\"></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}else if (placename() == "jolly_place"){
		document.write ("<a href=\"../fs/tko_hydropool.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image15','','../images/menu/fs_ro.gif',1)\"><img name=\"Image15\" border=\"0\" src=\"../images/menu/fs.gif\" width=\"131\" height=\"24\" alt=\"設施及服務\"></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");

	}
	
	//sub menu 4
	/*
	if (((foldername() == "fs") && (filename() == "jv")) || (filename() == "jv_pool") || (filename() == "jv_care") || (filename() == "jv_library") || (filename() == "jv_hobby") || (filename() == "jv_poly") || (filename() == "jv_multi")) {
		document.write ("<img name=\"Image41\" border=\"0\" src=\"../images/menu/fs_sf_jv_ro.gif\" width=\"131\" height=\"33\" alt=\"輔助設施 (牛頭角佐敦谷)\">");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}else if (foldername() == "fs"){
		document.write ("<a href=\"../fs/jv.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image41','','../images/menu/fs_sf_jv_ro.gif',1)\"><img name=\"Image41\" border=\"0\" src=\"../images/menu/fs_sf_jv.gif\" width=\"131\" height=\"33\" alt=\"輔助設施 (牛頭角佐敦谷)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}
	*/
	
///////// Cheerful Court menu icon not yet ready ////////////
// If locate at fs section the icon in the submenu disable rollover and hyperink.
// Modify @ 04092004 //
////********** Supporting Facilities******** ////
	if ((placename() == "jolly_place") && (foldername() == "fs") && ((filename() == "tko_care") || (filename() == "tko_garden") || (filename() == "tko_gym") || (filename() == "tko_hall") || (filename() == "tko_hydropool") || (filename() == "tko_library") || (filename() == "tko_lounge"))) {
		document.write ("<img name=\"Image42\" border=\"0\" src=\"../images/menu/fs_sf_tko_ro.gif\" width=\"131\" height=\"33\" alt=\"配套設施 (樂頤居)\">");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	} else if  ((placename() == "jolly_place") && (foldername() == "fs")){ // if at Jolly Place the frontpage of fs is hydropool.
		document.write ("<a href=\"../fs/tko_hydropool.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image42','','../images/menu/fs_sf_tko_ro.gif',1)\"><img name=\"Image42\" border=\"0\" src=\"../images/menu/fs_sf_tko.gif\" width=\"131\" height=\"33\" alt=\"配套設施 (樂頤居)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}
	
     if ((placename() == "cheerful_court") && (foldername() == "fs")  && ((filename() == "tko_care")|| (filename() == "tko_courtyard") || (filename() == "tko_garden") || (filename() == "tko_grooming") || (filename() == "tko_gym") || (filename() == "tko_hobby") || (filename() == "tko_hydropool") || (filename() == "tko_library") || (filename() == "tko_multi") || (filename() == "tko_poly") || (filename() == "tko_pool"))){
		document.write ("<img name=\"Image42\" border=\"0\" src=\"../images/menu/fs_sf_tko_ro.gif\" width=\"131\" height=\"33\" alt=\"配套設施 (彩頤居)\">");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}else if  ((placename() == "cheerful_court") && (foldername() == "fs")){ // if at Jolly Place the frontpage of fs is hydropool.
		document.write ("<a href=\"../fs/tko_gym.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image42','','../images/menu/fs_sf_tko_ro.gif',1)\"><img name=\"Image42\" border=\"0\" src=\"../images/menu/fs_sf_tko.gif\" width=\"131\" height=\"33\" alt=\"配套設施 (彩頤居)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
}


////********Care Arrangment********////
	if (((foldername() == "fs") && (filename() == "care_arr"))){
		document.write ("<img name=\"Image43\" border=\"0\" src=\"../images/menu/fs_care_ro.gif\" width=\"131\" height=\"20\" alt=\"護理安排\">");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}else if (foldername() == "fs"){
		document.write ("<a href=\"../fs/care_arr.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image43','','../images/menu/fs_care_ro.gif',1)\"><img name=\"Image43\" border=\"0\" src=\"../images/menu/fs_care.gif\" width=\"131\" height=\"20\" alt=\"護理安排\"></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}
	
	
	//icon 5
	
	if (foldername() == "sf"){
		//document.write ("<img src=\"../images/menu/grey_line.gif\">");
		document.write ("<img name=\"Image16\" border=\"0\" src=\"../images/menu/sf_hl.gif\" width=\"131\" height=\"24\" alt=\"特色設計\"></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}else{
		//document.write ("<img src=\"../images/menu/grey_line.gif\">");
		document.write ("<a href=\"../sf/living.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image16','','../images/menu/sf_ro.gif',1)\"><img name=\"Image16\" border=\"0\" src=\"../images/menu/sf.gif\" width=\"131\" height=\"24\" alt=\"特色設計\"></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}
	
	//sub menu 5	
	
	if (((foldername() == "sf") && (filename() == "living")) || (filename() == "living_2") || (filename() == "living_3") || (filename() == "living_4") || (filename() == "living_5")) {
		document.write ("<img name=\"Image47\" border=\"0\" src=\"../images/menu/sf_living_ro.gif\" width=\"131\" height=\"34\" alt=\"一房單位 (起居室 / 睡房)\">");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}else if (foldername() == "sf"){
		document.write ("<a href=\"../sf/living.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image47','','../images/menu/sf_living_ro.gif',1)\"><img name=\"Image47\" border=\"0\" src=\"../images/menu/sf_living.gif\" width=\"131\" height=\"34\" alt=\"一房單位 (起居室 / 睡房)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}
	
	if (((foldername() == "sf") && (filename() == "pantry")) || (filename() == "pantry_2") || (filename() == "pantry_3") || (filename() == "pantry_4") || (filename() == "pantry_5")) {
		document.write ("<img name=\"Image48\" border=\"0\" src=\"../images/menu/sf_pantry_ro.gif\" width=\"131\" height=\"34\" alt=\"開放式單位 (開放式廚房)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}else if (foldername() == "sf"){
		document.write ("<a href=\"../sf/pantry.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image48','','../images/menu/sf_pantry_ro.gif',1)\"><img name=\"Image48\" border=\"0\" src=\"../images/menu/sf_pantry.gif\" width=\"131\" height=\"34\" alt=\"開放式單位 (開放式廚房)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}
	
	if (((foldername() == "sf") && (filename() == "kitchen")) || (filename() == "kitchen_2") || (filename() == "kitchen_3") || (filename() == "kitchen_4")) {
		document.write ("<img name=\"Image49\" border=\"0\" src=\"../images/menu/sf_kitchen_ro.gif\" width=\"131\" height=\"19\" alt=\"一房單位 (廚房)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}else if (foldername() == "sf"){
		document.write ("<a href=\"../sf/kitchen.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image49','','../images/menu/sf_kitchen_ro.gif',1)\"><img name=\"Image49\" border=\"0\" src=\"../images/menu/sf_kitchen.gif\" width=\"131\" height=\"19\" alt=\"一房單位 (廚房)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}
	
	if (((foldername() == "sf") && (filename() == "bathroom")) || (filename() == "bathroom_2") || (filename() == "bathroom_3") || (filename() == "bathroom_4") || (filename() == "bathroom_5") || (filename() == "bathroom_6")) {
		document.write ("<img name=\"Image50\" border=\"0\" src=\"../images/menu/sf_bathroom_ro.gif\" width=\"131\" height=\"19\" alt=\"浴室\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}else if (foldername() == "sf"){
		document.write ("<a href=\"../sf/bathroom.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image50','','../images/menu/sf_bathroom_ro.gif',1)\"><img name=\"Image50\" border=\"0\" src=\"../images/menu/sf_bathroom.gif\" width=\"131\" height=\"19\" alt=\"浴室\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}
	
	if (((foldername() == "sf") && (filename() == "comm_corr")) || (filename() == "comm_corr_2") || (filename() == "comm_corr_3")) {
		document.write ("<img name=\"Image51\" border=\"0\" src=\"../images/menu/sf_common_ro.gif\" width=\"131\" height=\"19\" alt=\電梯大堂\></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}else if (foldername() == "sf"){
		document.write ("<a href=\"../sf/comm_corr.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image51','','../images/menu/sf_common_ro.gif',1)\"><img name=\"Image51\" border=\"0\" src=\"../images/menu/sf_common.gif\" width=\"131\" height=\"19\" alt=\電梯大堂\></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}

	//icon 6
	
	if (foldername() == "application"){
		//document.write ("<img src=\"../images/menu/grey_line.gif\">");
		document.write ("<img name=\"Image17\" border=\"0\" src=\"../images/menu/application_hl.gif\" width=\"131\" height=\"24\" alt=\"申請表及簡介\"></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}else{
		//document.write ("<img src=\"../images/menu/grey_line.gif\">");
		document.write ("<a href=\"../application/form.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image17','','../images/menu/application_ro.gif',1)\"><img name=\"Image17\" border=\"0\" src=\"../images/menu/application.gif\" width=\"131\" height=\"24\" alt=\"申請表及簡介\"></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}
	
	//sub menu 6
	
	if ((foldername() == "application") && (filename() == "form")){
		document.write ("<img name=\"Image59\" border=\"0\" src=\"../images/menu/app_form_ro.gif\" width=\"131\" height=\"19\" alt=\"申請表\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}else if (foldername() == "application"){
		document.write ("<a href=\"../application/form.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image59','','../images/menu/app_form_ro.gif',1)\"><img name=\"Image59\" border=\"0\" src=\"../images/menu/app_form.gif\" width=\"131\" height=\"19\" alt=\"申請表\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}
	
	if ((foldername() == "application") && (filename() == "intro")){
		document.write ("<img name=\"Image60\" border=\"0\" src=\"../images/menu/app_intro_ro.gif\" width=\"131\" height=\"19\" alt=\"申請簡介\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}else if (foldername() == "application"){
		document.write ("<a href=\"../application/intro.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image60','','../images/menu/app_intro_ro.gif',1)\"><img name=\"Image60\" border=\"0\" src=\"../images/menu/app_intro.gif\" width=\"131\" height=\"19\" alt=\"申請簡介\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}
	
	if ((foldername() == "application") && (filename() == "refund")){
		document.write ("<img name=\"Image61\" border=\"0\" src=\"../images/menu/app_refund_ro.gif\" width=\"131\" height=\"33\" alt=\"租住權費計算機\"></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}else if (foldername() == "application"){
		document.write ("<a href=\"javascript:calc();\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image61','','../images/menu/app_refund_ro.gif',1)\"><img name=\"Image61\" border=\"0\" src=\"../images/menu/app_refund.gif\" width=\"131\" height=\"33\" alt=\"租住權費計算機\"></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}
	
	//icon 7
	if (foldername() == "contact"){
		document.write("<img name=\"Image18\" border=\"0\" src=\"../images/menu/contact_hl.gif\" width=\"131\" height=\"24\" alt=\"聯絡我們\">");
		//document.write("<img src=\"../images/menu/grey_line.gif\">");
	}else{
		document.write("<a href=\"../contact/contact.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image18','','../images/menu/contact_ro.gif',1)\"><img name=\"Image18\" border=\"0\" src=\"../images/menu/contact.gif\" width=\"131\" height=\"24\" alt=\"聯絡我們\"></a>");
		//document.write("<img src=\"../images/menu/grey_line.gif\">");
	}
	document.write("<img src=\"../images/menu/grey_line.gif\" align=top>");
	
}
// Cheerful Court and Jolly Place Shift Menu
function locatemenu()
{
		//disable Jolly Place button
	if (((placename() == "cheerful_court") && (filename() == "tko_courtyard")) || (filename() == "tko_grooming") || (filename() == "tko_hobby") || (filename() == "tko_poly") || (filename() == "tko_pool") || (filename() == "fp_tko_26f") || (filename() == "fp_tko_b1") || (filename() == "fp_tko_b2") || (filename() == "fp_tko_b3") || (filename() == "fp_tko_b4") || (filename () == "tko_multi"))
		{
			document.write("<img src=\"../images/location_menu/cheerful_ro.jpg\" alt=\"彩頤居\" width=\"65\" height=\"17\">");
			document.write("<img src=\"../images/location_menu/spacer.jpg\" width=\"22\" height=\"17\">");
			document.write("<img src=\"../images/location_menu/jollyplace_disable.jpg\" width=\"65\" height=\"17\">");
		}else if (placename() == "cheerful_court"){
			document.write("<img src=\"../images/location_menu/cheerful_ro.jpg\" alt=\"彩頤居\" width=\"65\" height=\"17\">");
			document.write("<img src=\"../images/location_menu/spacer.jpg\" width=\"22\" height=\"17\">");
			document.write("<a href=\"javascript:locate('jolly');\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('jollyplace','','../images/location_menu/jollyplace_ro.jpg',0)\"><img src=\"../images/location_menu/jollyplace.jpg\" name=\"jollyplace\" alt=\"樂頤居\" width=\"67\" height=\"17\" border=\"0\"></a>");
		} 		
		//disable Cheerful Court button
		 if (((placename() == "jolly_place")&&(filename() =="tko_hall")) || (filename() =="tko_lounge")  || (filename() == "fp_tko_21f") || (filename() == "fp_tko_7f") || (filename() == "fp_tko_6f") || (filename() == "fp_tko_mf"))
		 {
			document.write("<img src=\"../images/location_menu/cheerful_disable.jpg\" width=\"65\" height=\"17\">");
			document.write("<img src=\"../images/location_menu/spacer.jpg\" width=\"22\" height=\"17\">");
			document.write("<img src=\"../images/location_menu/jollyplace_ro.jpg\" alt=\"樂頤居\" width=\"67\" height=\"17\">"); 
		}else if (placename() == "jolly_place"){
			document.write("<a href=\"javascript:locate('cheerful');\"onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('cheerfulcourt','','../images/location_menu/cheerful_ro.jpg',1)\"><img src=\"../images/location_menu/cheerful.jpg\" name=\"cheerfulcourt\" alt=\"彩頤居\" width=\"65\" height=\"17\" border=\"0\"></a>");
			document.write("<img src=\"../images/location_menu/spacer.jpg\" width=\"22\" height=\"17\">");
			document.write("<img src=\"../images/location_menu/jollyplace_ro.jpg\" alt=\"樂頤居\" width=\"67\" height=\"17\">");
		} 
}


function lang(version){
	link = location.href;
	english = "/eng/";
	chinese = "/chi/";
	
	//setting for no chinese
	if (version == "nchi"){
		parent.location.href= "";
	}

	//setting for no english
	if (version == "neng"){
		parent.location.href="";
	}
	
	if (version == "en"){
		link = link.replace (chinese, english);
		parent.location.href = link;
	}else if (version == "ch"){
		link = link.replace (english, chinese);
		parent.location.href = link;
	}
}

function locate(place){
	link = location.href;
	cheerful = "/cheerful_court/";
	jolly = "/jolly_place/";

	if (place == "cheerful"){
		link = link.replace (jolly, cheerful);
		parent.location.href = link;
	}else if (place == "jolly"){
		link = link.replace (cheerful, jolly);
		parent.location.href = link;
	}
}
