var SITE_URLS = [[
		"about_us/about_us.html",
		"about_us/about_us.html"

	], [
		"location_transportation/location_map.html",
		"location_transportation/location_map.html",
		"location_transportation/transportation.html"
	], [
		"club_events_promotions/events.html",
		"club_events_promotions/events.html",
		"club_events_promotions/promotions.html",
		"club_events_promotions/boatshowoftheyear.html",		
		"club_events_promotions/boat_show_archives.html"
	], [
		"membership/membership.html",
		"membership/membership.html",
		{link: "http://members.goldcoastclub.com.hk", type: 'popup', how: ''}
	], [
		"bar_restaurant/western.html",
		"bar_restaurant/western.html",
		"bar_restaurant/chinese.html",
		"bar_restaurant/sidewalk_cafe.html"
	], [
		"club_facilities/country_club.html",
		"club_facilities/country_club.html",
		"club_facilities/ccf_sports_recreation_facilities.html",
		"club_facilities/yacht_club.html",	
		"club_facilities/ycf_sports_recreation_facilities.html"
	], [
		"meeting_banquet/banquet_wedding.html",
		"meeting_banquet/banquet_wedding.html",
		"meeting_banquet/conference.html",
		"meeting_banquet/floating_pontoon.html"			
	], [
		"marina/facilities_services.html",
		"marina/facilities_services.html",
		"marina/gold_coast_I.html",	
		"marina/gold_coast_I.html",	
		"marina/gold_coast_II.html",
		"marina/photo_gallery.html",
		"marina/useful_links.html"			
	], [
		"virtual_tour/useful_links.html",
		"virtual_tour/useful_links.html"
	], [
		"index.html",
		"general/contact_us.html",
		"general/sitemap.html",
		"general/legal_notices.html",
		"",
		"",
		"",
		"",
		"http://www.sino-land.com/eng/default.asp?xid=home&cm=dbx_front",
		"../../gateway/en/gateway.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") {
					window.open(url, '', (how == null ? '' : how));
				}
			}
			break;
		
		case "register":
			alert("register");
			break;
		case "editAccount":
			alert("edit");
			break;
		case "forget":
			alert("forget");
			break;
	}
}