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);
	 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=\"What's New\"></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=\"What's New\"></a>");
	}
 	
 	//sub menu 8 (What's New / News)
/* 	if ((filename() == "news_tko") && (foldername() == "news")) {
 		//Tsueng Kwan O
 		document.write ("<img name=\"new01\" border=\"0\" src=\"../images/menu/news_tko_ro.gif\" width=\"131\" height=\"17\" alt=\"Jolly Place\">");
 		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
 	}else if (foldername()== "news"){
 		document.write ("<a href=\"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=\"17\" alt=\"Jolly Place\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
 	}
*/
	// 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=\"17\" alt=\"Jolly Place\">");
 		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=\"17\" alt=\"Jolly Place\"></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=\"17\" alt=\"Cheerful Court\">");
 		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=\"17\" alt=\"Cheerful Court\"></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=\"17\" alt=\"Show Flat\">");
		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=\"17\" alt=\"Show Flat\"></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=\"17\" alt=\"Ballot Results\">");
		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=\"17\" alt=\"Ballot Results\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}
	/*	//Vetting
	if ((filename() == "news_vetting") && (foldername() == "news")){
		document.write ("<img name=\"new04\" border=\"0\" src=\"../images/menu/news_vetting_ro.gif\" width=\"131\" height=\"17\" alt=\"Vetting\">");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}else if (foldername()=="news"){
		document.write ("<a href=\"news_vetting.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('new04','','../images/menu/news_vetting_ro.gif',1)\"><img name=\"new04\" border=\"0\" src=\"../images/menu/news_vetting.gif\" width=\"131\" height=\"17\" alt=\"Vetting\"></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=\"17\" alt=\"Flat Selection Status\">");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}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=\"17\" alt=\"Flat Selection Status\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}
		//Entry Contribution
	if ((filename() == "news_contribution") && (foldername() == "news")){
		document.write ("<img name=\"new09\" border=\"0\" src=\"../images/menu/news_contribution_ro.gif\" width=\"131\" height=\"17\" alt=\"Entry Contribution\">");
	}else if (foldername()=="news"){
		document.write ("<a href=\"news_contribution.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('new09','','../images/menu/news_contribution_ro.gif',1)\"><img name=\"new09\" border=\"0\" src=\"../images/menu/news_contribution.gif\" width=\"131\" height=\"17\" alt=\"Entry Contribution\"></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=\"17\" alt=\"Press Release\">");
	}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=\"17\" alt=\"Press Release\"></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=\"24\" alt=\"Background\">");
		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=\"24\" alt=\"Background\"></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=\"17\" alt=\"Executive Summary\">");
 		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=\"17\" alt=\"Executive Summary\"></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=\"17\" alt=\"Design\">");
		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=\"17\" alt=\"Design\"></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=\"28\" alt=\"Benefits to Customers\">");
		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=\"28\" alt=\"Benefits to Customers\"></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=\"Video\">");
		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=\"Video\"></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=\"Maps\">");	
		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=\"Maps\"></a>");
		document.write ("<img src=\"../images/menu/grey_line.gif\">");
	}
	
	//sub menu 3
	
	// Modify @ 04092004 //
	// ******* Location Map ******** // 
	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=\"28\" alt=\"Location Map (Jolly Place)\">");
 		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=\"28\" alt=\"Location Map (Jolly Place)\"></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=\"28\" alt=\"Location Map (Cheerful Court)\">");
 		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=\"28\" alt=\"Location Map (Cheerful Court)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
 	}
		// Modify @ 04092004 //
	// ******** Floor Plan ******** // 
		if ((placename() == "jolly_place") && (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=\"28\" alt=\"Floor Plan (Jolly Place)\">");
 		document.write ("<img src=\"../images/menu/grey_line.gif\">");
 	}else if ((placename() == "jolly_place") && (foldername()== "maps")){
 		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=\"28\" alt=\"Floor Plan (Jolly Place)\"></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_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=\"Image77\" border=\"0\" src=\"../images/menu/maps_fp_tko_ro.gif\" width=\"131\" height=\"28\" alt=\"Floor Plan (Cheerful Court)\">");
 		document.write ("<img src=\"../images/menu/grey_line.gif\">");
 	}else if ( (placename() == "cheerful_court") && (foldername()== "maps")){
 		document.write ("<a href=\"../maps/fp_tko_gf.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image77,'','../images/menu/maps_fp_tko_ro.gif',1)\"><img name=\"Image77\" border=\"0\" src=\"../images/menu/maps_fp_tko.gif\" width=\"131\" height=\"28\" alt=\"Floor Plan (Cheerful Court)\"></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=\"Supporting Facilites\">");	
		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=\"Facilities & Services\"></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=\"Facilities & Services\"></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=\"39\" alt=\"Supporting Facilities (Jordan Valley)\">");
		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=\"39\" alt=\"Supporting Facilities (Jordan Valley)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}

	if (((foldername() == "fs") && (filename() == "tko_gym")) || (filename() == "tko_courtyard") || (filename() == "tko_care") || (filename() == "tko_grooming") || (filename() == "tko_hobby")  || (filename() == "tko_hydropool") || (filename() == "tko_library")  || (filename() == "tko_garden") || (filename() == "tko_poly") || (filename() == "tko_pool") || (filename() == "tko_hall") || (filename() == "tko_lounge") || (filename() == "tko_multi")) {
		document.write ("<img name=\"Image42\" border=\"0\" src=\"../images/menu/fs_sf_tko_ro.gif\" width=\"131\" height=\"39\" alt=\"Supporting Facilities\">");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}else if ((foldername() == "fs") && (placename() == "cheerful_court")){  //If at Cheerful Court the fontpage of the fs is tko_gym.
		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=\"39\" alt=\"Supporting Facilities (Cheerful Court)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}else if ((foldername() == "fs") && (placename() == "jolly_place")){ // 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=\"39\" alt=\"Supporting Facilities (Jolly Place)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}
	

     if ((foldername() == "fs") && (placename() == "cheerful_court")){  //If at Cheerful Court the fontpage of the fs is tko_gym.
		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=\"39\" alt=\"Supporting Facilities (Cheerful Court)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}else if ((foldername() == "fs") && (placename() == "jolly_place")){ // 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=\"39\" alt=\"Supporting Facilities (Jolly Place)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
	}
	*/
	
		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=\"39\" alt=\"Supporting Facilities (Jolly Place)\">");
		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=\"39\" alt=\"Supporting Facilities (Jolly Place)\"></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=\"39\" alt=\"Supporting Facilities (Cheerful Court)\">");
		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=\"39\" alt=\"Supporting Facilities (Cheerful Court)\"></a>");
		document.write ("<img src=\"../images/menu/grey_dot_line.gif\">");
}
	
	
////******** Care Arrangement ********* /////
	if (((foldername() == "fs") && (filename() == "care_arr"))){
		document.write ("<img name=\"Image43\" border=\"0\" src=\"../images/menu/fs_care_ro.gif\" width=\"131\" height=\"17\" alt=\" Care Arrangement\">");
		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=\"17\" alt=\"Care Arrangement\"></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=\"Special Features\"></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=\"Special Features\"></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=\"27\" alt=\"One Bedroom Unit (Living Area / Bedroom)\"></a>");
		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=\"27\" alt=\"One Bedroom Unit (Living Area / Bedroom)\"></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=\"17\" alt=\"Studio Unit (Pantry)\"></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=\"17\" alt=\"Studio Unit (Pantry)\"></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=\"27\" alt=\"One Bedroom Unit (Kitchen)\"></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=\"27\" alt=\"One Bedroom Unit (Kitchen)\"></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=\"16\" alt=\"Bathroom\"></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=\"16\" alt=\"Bathroom\"></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=\"16\" alt=\"Common Corridor\"></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=\"16\" alt=\"Common Corridor\"></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=\"38\" alt=\"Application Form and Guide\"></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=\"38\" alt=\"Application Form and Guide\"></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=\"17\" alt=\"Application Form\"></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=\"17\" alt=\"Application Form\"></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=\"17\" alt=\"Application Guide\"></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=\"17\" alt=\"Application Guide\"></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=\"17\" alt=\"Refund Calculator\"></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=\"17\" alt=\"Refund Calculator\"></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=\"Contact Us\">");
		//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=\"Contact Us\"></a>");
		//document.write("<img src=\"../images/menu/grey_line.gif\">");
	}
	document.write("<img src=\"../images/menu/grey_line.gif\" align=top>");
	
}

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 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=\"Cheerful Court\" width=\"107\" height=\"20\">");
			document.write("<img src=\"../images/location_menu/spacer.jpg\" width=\"22\" height=\"17\">");
			document.write("<img src=\"../images/location_menu/jollyplace_disable.jpg\" width=\"81\" height=\"20\">");
		}else if (placename() == "cheerful_court"){
			document.write("<img src=\"../images/location_menu/cheerful_ro.jpg\" alt=\"Cheerful Court\" width=\"107\" height=\"20\">");
			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=\"Jolly Place\" width=\"81\" height=\"20\" 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=\"107\" height=\"20\">");
			document.write("<img src=\"../images/location_menu/spacer.jpg\" width=\"22\" height=\"17\">");
			document.write("<img src=\"../images/location_menu/jollyplace_ro.jpg\" alt=\"Jolly Place\" width=\"81\" height=\"20\">"); 
		}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=\"Cheerful Court\" width=\"107\" height=\"20\" 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=\"Jolly Place\" width=\"81\" height=\"20\">");
		} 
}

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;
	}
}

