var SITE_URLS = [[
		"about_us/about_us.html",
		"about_us/hist_of_hkgcr.html",
		"about_us/sitemap.html",						
		"about_us/guide_map.html",
		"about_us/testimonials.html"

	], [
		"location_transportation/location_transportation.html",
		"location_transportation/location_map.html",
		"location_transportation/transportation.html"
	], [
		"apartment_for_lease/apartments_for_lease.html",
		"apartment_for_lease/seaview_apartments_fp.html",
		"apartment_for_lease/seaview_apartments_fp.html",
		"apartment_for_lease/seaview_apartments_vt.html",		
		"apartment_for_lease/seaview_apartments_rp.html",
		"apartment_for_lease/beach_houses_sf.html",
		"apartment_for_lease/beach_houses_sf.html",
		"apartment_for_lease/beach_houses_fp.html",
		"apartment_for_lease/beach_houses_vt.html",		
		"apartment_for_lease/beach_houses_rp.html",
		"apartment_for_lease/serviced_apartment_fp.html",
		"apartment_for_lease/serviced_apartment_fp.html",
		"apartment_for_lease/serviced_apartment_vt.html",
		"apartment_for_lease/serviced_apartment_rp.html"
	], [
		"natural_environment/natural_environment.html",
		"natural_environment/green_living.html",
		"natural_environment/bird_paradise.html",
		"natural_environment/butterfly_garden.html",
		"natural_environment/golden_beach.html",
		"natural_environment/pink_dolphins.html",
	], [
		"clubhouse/clubhouse.html",
		"clubhouse/luxury_facilities.html",
		"clubhouse/eco_farm.html",
		"clubhouse/activities.html"
	], [
		"community/community.html",
		"community/yacht.html",
		"community/shopping.html",
		"community/hotel.html"
	], [
		"school_network/school_network.html",
		"school_network/pre_school.html",
		"school_network/primary_school.html",
		"school_network/secondary_school.html"			
	], [
		"photo_gallery/photo_gallery.html",
		"photo_gallery/photo_gallery.html",
		"photo_gallery/event.html"
	], [
		"index.html",
		"general/contact_us.html",
		"general/enquiry_form.aspx",
		"general/disclaimer.html",
		"general/sitemap.html",
		"general/e-news.aspx",
		"",
		"",
		"",
		"",
		"general/copyright.html"


	]
				 
];

function resizeListener() {
	updateScreenSize();

	topnavResizeHandler();
}

function topnavResizeHandler() {
	getSwf("topnav").setScreenWidth(screenW);
}

function flashClickLink(eventID) {
	switch (eventID) {
		case "logo":
			//location.href = "http://hk.yahoo.com";
			break;
		case "menu":
		case "submenu":
		case "homepage":
			var sec = arguments[1];
			var subsec = arguments[2];
			var url;
			var openType = null;
			var how = null;
			if (subsec == undefined) {
				if (SITE_URLS[sec - 1][0].type == undefined)
					url = SITE_URLS[sec - 1][0];
				else {
					url = SITE_URLS[sec - 1][0].link;
					openType = SITE_URLS[sec - 1][0].type;
					how = SITE_URLS[sec - 1][0].how;
				}
			} else {
				if (SITE_URLS[sec - 1][subsec].type == undefined)
					url = SITE_URLS[sec - 1][subsec];
				else {
					url = SITE_URLS[sec - 1][subsec].link;
					openType = SITE_URLS[sec - 1][subsec].type;
					how = SITE_URLS[sec - 1][subsec].how;
				}
			}
			//alert(url);
			if (url != '' && url != undefined) {
				if (openType == null)
					location.href = url;
				else if (openType == "popup") {
					MM_openBrWindow(url, '', (how == null ? '' : how));
				}
			}
			break;
		
		case "register":
			alert("register");
			break;
		case "editAccount":
			alert("edit");
			break;
		case "forget":
			alert("forget");
			break;
	}
}