<!--
/*=========================================================================
 * Filename    : /central/javascript/anyRegion.js
 * Type	       : JavaScript
 * Description : javascript to display Region-select box (optional select)
 * Functions   : - changeSubRegions(i, subregion)
 *=========================================================================*/
 
	/*=====================================================================*
	 * Variables
	 *=====================================================================*/
	var regionsArr = new Array();
	
	regionsArr[1] = new Array("Africa and the Middle East", "0", "All                                             ", "AFRI", "Ivory Cst/Sen/Morocco/Tunisia/Kenya", "EGYP", "Egypt/Jord/Leb/Syria/United Arab EM", "ISRL", "Israel", "SAFR", "South Africa/Namibia/Zimb/Swaz/Mozam");
	regionsArr[2] = new Array("Asia", "0", "All                                             ", "INDA", "India", "INTL", "International", "NEAP", "China, South Korea, Taiwan, Japan", "SEAP", "Southeast Asia");
	regionsArr[3] = new Array("Australia", "0", "All                                             ", "GLDC", "Gold Coast & Other SE Queensland", "NSWL", "New South Wales & Canberra", "QNLN", "Queensland & N Terr, Exc. Gold Coast", "VCSA", "Victoria, South Australia, Tasmania", "WAUS", "Western Australia");
	regionsArr[4] = new Array("Bermuda, Bahamas, Caribbean", "0", "All                                             ", "BAHM", "Bahamas & Bermuda", "CRBN", "Caribbean, Excl. Isla Margarita");
	regionsArr[5] = new Array("Canada", "0", "All                                             ", "ECAN", "Eastern Canada -  NS/PQ/ON/MB", "WCAN", "Western Canada - NORTHERN ID,MT,AK");
	regionsArr[6] = new Array("Canary Islands", "0", "All                                             ", "FUER", "Canaries - Fuerteventura", "GRAN", "Canaries - Gran Canaria", "LANZ", "Canaries - Lanzarote", "TENN", "Canaries - North Tenerife", "TENS", "Canaries - South Tenerife");
	regionsArr[7] = new Array("Europe", "0", "All                                             ", "ALPA", "Austria", "SCAN", "Denmark/Norway/Sweden", "FINL", "Finland", "FRAN", "France (excluding Alps)", "ALPF", "French Alps & Switzerland", "GERM", "Germany, Benelux, Poland, Czech Rep", "GREC", "Greece and Cyprus", "HUNG", "Hungary", "IRLD", "Ireland", "ALPI", "Italian Alps", "ITAL", "Italy (Excl. Alps), Sardinia, Sicily", "MADR", "Madeira", "MALT", "Malta", "ENGN", "North of Manchester", "PORT", "Portugal", "SCOT", "Scotland", "ENGS", "South of Manchester", "TRKY", "Turkey and Northern Cyprus", "WALS", "Wales");
	regionsArr[8] = new Array("Spain", "0", "All                                             ", "SPIS", "Balearic Islands", "SPEC", "Andorra, Northern & Eastern Spain", "SPMG", "Sourther/Fuengirola-Granada", "SPMB", "Southern/Cadiz-Mijas Costa");
	regionsArr[9] = new Array("Mexico", "0", "All                                             ", "ACAP", "Acapulco", "BAJA", "Baja Peninsula & Gulf of California", "CANC", "Cancun Area", "HUAT", "Huatulco", "MEXX", "Mexico - Inland & Gulf of Mexico", "IXTA", "Ixtapa", "MANZ", "Manzanillo", "MAZT", "Mazatlan", "PVTA", "Puerto Vallarta Area");
	regionsArr[10] = new Array("South America", "0", "All                                             ", "SACO", "Chile & Coastal Argentina/Uruguay", "SAIN", "Inland Peru/Bol/Arg/Paraguay/Urug", "CSAM", "Central America, Colombia, Ecuador", "BNOR", "Brazil - North of Brasilia", "BLIT", "Brazil - South of Sao Paulo", "BSUD", "Brazil - Rio, Sao Paulo To Buzios", "VENZ", "Venezuela");
	regionsArr[11] = new Array("New Zealand", "0", "All                                             ", "NZNI", "North Island", "NZSI", "South Island");
	regionsArr[12] = new Array("South Pacific", "0", "All                                             ", "SOPI", "Fiji & Cook Islands", "FRPO", "French Polynesia");
	regionsArr[13] = new Array("United States", "0", "All                                             ", "ARIZ", "Arizona", "OZAR", "Arkansas, Missouri, And Oklahoma", "COLN", "Colorado - North of Colorado Springs", "COLS", "Colorado - South of Colorado Springs", "ECNO", "East Coast - Maine to Maryland", "ECSO", "East Coast - Virg. Bch to Myrtle Bch", "GRLK", "Great Lakes Area (WI,MI,MN,IA)", "GLFS", "Coastal AL, MS, LA", "HAWI", "Hawaii", "HHDI", "East Coast - Charleston to Savannah", "NINT", "Northern Interior - IL/IN,OH,KY,WV,VA", "SINT", "Southern Interior - AL,GA,MS,NC,SC)", "TAHO", "CA/NV - Tahoe, Reno, Yosemite Areas", "VGAS", "Las Vegas Area", "NENG", "Inland New England ME,NH,VT,NY,MA", "NMEX", "New Mexico", "NWST", "Washington & Oregon", "PENN", "Pennsylvania", "SMOK", "Tenn & Smoky Mtn Resorts in NC/GA", "TXCO", "Texas - Coastal", "TXIN", "Texas - Inland", "UTAH", "Utah", "YELO", "Yellowstone & Parks - S.ID/S.MT/WY/SD");
	regionsArr[14] = new Array("Cuba", "0", "All                                             ", "CUCA", "Cayo Coco", "CUGU", "Guardalavaca", "CUHO", "Holguin", "CUVA", "Varadero");
	regionsArr[15] = new Array("California", "0", "All                                       ", "SANF", "California - Monterey to Eureka", "SCAL", "California - San Diego to San Luis Obispo", "SCIN", "California - Palm Springs to Bakersfield");
	regionsArr[16] = new Array("Florida", "0", "All                                          ", "FLOR", "Florida - Orlando Area", "FLPH", "Florida - Panhandle", "FLSE", "Florida - Southeast", "FLSW", "Florida - Southwest", "FLKY", "Florida Keys", "FLNE", "Florida Northeast", "FLNW", "Florida Northwest");
	regionsArr[17] = new Array("Dominican Republic", "0", "All                                          ", "DRPP", "Puerto Plata", "DRPC", "Punta Cana");

	/*=====================================================================*
	 * Function    : anyRegion ?changeSubRegions
	 * Description : changes SubRegion-select box based on selected Region
	 *=====================================================================*/
	function changeSubRegions(i, subregion)
	{   
		//alert(subregion.options.length);
		if (i > 0) {
	
			// Find index of selected region - this is the index into the regions array
			var len = regionsArr[i].length-1;			
			subregion.options.length = len/2;
			var test = 0;		
			for (var j=1; j <= len; j+=2)  {			
				subregion.options[test].value = regionsArr[i][j];
				subregion.options[test].text = regionsArr[i][j+1];					
				test ++;
		   }
		}
		subregion.options.style.width = "55mm";
		subregion.options[0].selected = true;	
	}
	
	function changeCity(subregion,city){
		if(city && cityArr[subregion]){
			var len = cityArr[subregion].length;			
			city.options[0].text = "All";
			city.options[0].value = "0";
			city.options.length = len + 1;
			
			for (var j=0; j < len; j++) {								
				city.options[j + 1].value = cityArr[subregion][j];
				city.options[j + 1].text = cityArr[subregion][j];
			}
			city.options[0].selected = true;
		}
	}
	
	function changeResorts(i, subregion){
		if (i > 0) {
	
			// Find index of selected region - this is the index into the regions array
			var len = resortsArr[i].length-1;			
			subregion.options.length = len/2;
			var test = 0;		
			for (var j=1; j <= len; j+=2)  {			
				subregion.options[test].value = resortsArr[i][j];
				subregion.options[test].text = resortsArr[i][j+1];					
				test ++;
		   }
		}
		subregion.options.style.width = "60mm";
		subregion.options[0].selected = true;
	}
/*=========================================================================*/
/*=========================================================================*/
-->
