function validateResInfo() 
{
    if(document.getElementById('Country').selectedIndex==0)
	    {
	    alert('Please select a destination.');
	    document.getElementById('Country').focus();
	    return false;
	    }
    return true;
}

function makeCountryList(theSiteId,theCountryGroup,theCountry)
{
document.getElementById('Country').options.length = 0;
document.getElementById('Country').options[0]=new Option('Choose a destination','none',false,false);
var countryListArray;
var siteId;
var countryGroup;
var countryName;
var sendValue;
var arrayCounter = 1;
for(var i=0; i<=countryList.length-1; i++)
	{
	countryListArray = countryList[i].split('|');
	siteId = countryListArray[0];
	countryGroup = countryListArray[1];
	countryName = countryListArray[2];
	sendValue = siteId + '|' + countryGroup;
	if(theSiteId==countryListArray[0] && theCountryGroup==countryListArray[1])
		{
		document.getElementById('Country').options[arrayCounter]=new Option(countryName,sendValue,false,true);
		}
	else
		{
		document.getElementById('Country').options[arrayCounter]=new Option(countryName,sendValue,false,false);
		}
	arrayCounter++;		
	}	
}

function makeRegionList(theCountry)
{
document.getElementById('Region').options.length = 0;
document.getElementById('Region').options[0]=new Option('Then choose a region','none',false,false);
var theCountryArray = theCountry.split('|');
var theSite = theCountryArray[0];
var theCountryGroup = theCountryArray[1];
var regionName;
var siteId;
var countryGroup;
var countryId;
var sendValue;
var arrayCounter = 0;
var regionListArray;
for(var i=0; i<=regionList.length-1; i++)
	{
	if(i==0 && document.getElementById('Country')[document.getElementById('Country').selectedIndex].value != 'none' )
		{
		document.getElementById('Region').options[0]=new Option('All','ALL',false,false); //Sending "ALL" instead of "?" on purpose[C.S.]
		arrayCounter++;
		}	
	regionListArray = regionList[i].split('|');
	siteId = regionListArray[0]
	countryGroup = regionListArray[1];
	countryId = regionListArray[2];	
	if(siteId==theSite && countryGroup==theCountryGroup)
		{
		sendValue = siteId + '|' + countryGroup + '|' + countryId;
		regionName = regionListArray[3];
		if(sendValue==theCountry)
			{
			document.getElementById('Region').options[arrayCounter]=new Option(regionName,sendValue,false,true);
			arrayCounter++;		
			}
		else
			{
			document.getElementById('Region').options[arrayCounter]=new Option(regionName,sendValue,false,false);
			arrayCounter++;		
			}
		}
	}
}

//CountryGroup List (used for the countryId parameter)
var countryList = new Array();
countryList[0] = 'ASA|P|Asia';
countryList[1] = 'AUS|A|Australia';
countryList[2] = 'USA|C|Canada';
countryList[3] = 'USA|I|Central America & Caribbean';
countryList[4] = 'EUR|C|Central Europe';
countryList[5] = 'EUR|S|Eastern Europe';
countryList[6] = 'EUR|17|France';
countryList[7] = 'EUR|E|Ireland';
countryList[8] = 'USA|M|Mexico';
countryList[9] = 'ASA|H|Middle East';
countryList[10] = 'AUS|N|New Zealand & Pacific';
countryList[11] = 'EUR|N|North Africa';
countryList[12] = 'EUR|1|Portugal';
countryList[13] = 'USA|B|South America';
countryList[14] = 'ZAR|S|South Africa';
countryList[15] = 'ZAR|D|Southern Africa';
countryList[16] = 'EUR|2|Spain';
countryList[17] = 'EUR|G|UK';
countryList[18] = 'USA|U|USA';
countryList[19] = 'EUR|W|Western Europe Other'


//Country List (used for the regionId parameter)
var regionList = new Array();
regionList[0]  = 'USA|M|3|Acapulco';
regionList[1]  = 'EUR|S|C118|Albania';
regionList[2]  = 'USA|C|A|Alberta';
regionList[3]  = 'EUR|1|76|Algarve';
regionList[4]  = 'EUR|N|C128|Algeria';
regionList[5]  = 'EUR|W|C109|Andorra';
regionList[6]  = 'USA|B|2|Argentina';
regionList[7]  = 'USA|I|7|Aruba';
regionList[8]  = 'EUR|C|C8|Austria';
regionList[9]  = 'USA|I|2|Bahamas';
regionList[10]  = 'EUR|2|38|Balearic Islands';
regionList[11]  = 'USA|I|1|Barbados';
regionList[12]  = 'EUR|S|C101|Belarus ';
regionList[13]  = 'EUR|W|C35|Belgium';
regionList[14]  = 'USA|I|B|Belize';
regionList[15]  = 'USA|I|9|Bermuda';
regionList[16]  = 'EUR|S|C119|Bosnia & Herzegovina';
regionList[17]  = 'ZAR|D|7|Botswana';
regionList[18]  = 'USA|B|1|Brazil';
regionList[19]  = 'USA|C|B|British Columbia';
regionList[20]  = 'EUR|S|C81|Bulgaria';
regionList[21]  = 'USA|M|2|Cabo San Lucas';
regionList[22]  = 'EUR|2|36|Canary Islands';
regionList[23]  = 'USA|M|4|Cancun';
regionList[24]  = 'ZAR|S|0|Cape Town';
regionList[25]  = 'USA|I|8|Cayman Islands';
regionList[26]  = 'USA|B|4|Chile';
regionList[27]  = 'ASA|P|C|China';
regionList[28]  = 'EUR|17|75|Corsica';
regionList[29]  = 'USA|I|C|Costa Rica';
regionList[30]  = 'USA|M|6|Cozumel';
regionList[31]  = 'EUR|S|C79|Croatia';
regionList[32]  = 'EUR|S|C10|Cyprus';
regionList[33]  = 'EUR|C|C19|Czech Republic';
regionList[34]  = 'EUR|W|C20|Denmark';
regionList[35]  = 'USA|I|4|Dominican Republic';
regionList[36]  = 'ZAR|S|5|Drakensberg';
regionList[37]  = 'EUR|17|34|East';
regionList[38]  = 'EUR|E|28|Eastern';
regionList[39]  = 'ZAR|S|1|Eastern Cape';
regionList[40]  = 'EUR|N|C48|Egypt';
regionList[41]  = 'EUR|G|C68|England';
regionList[42]  = 'EUR|S|C120|Estonia ';
regionList[43]  = 'AUS|N|F|Fiji';
regionList[44]  = 'EUR|S|C75|Finland';
regionList[45]  = 'USA|U|F|Florida';
regionList[46]  = 'EUR|N|C23|Gambia';
regionList[47]  = 'ZAR|S|8|Garden Route';
regionList[48]  = 'ZAR|S|B|Gauteng Limpopo North West';
regionList[49]  = 'EUR|C|C7|Germany';
regionList[50]  = 'EUR|W|C108|Gibraltar';
regionList[51]  = 'ZAR|S|6|Greater Transvaal';
regionList[52]  = 'EUR|S|C3|Greece';
regionList[53]  = 'USA|I|G|Guatemala';
regionList[54]  = 'USA|U|H|Hawaiian Islands';
regionList[55]  = 'EUR|S|C52|Hungary';
regionList[56]  = 'EUR|W|C111|Iceland';
regionList[57]  = 'ASA|P|G|India';
regionList[58]  = 'ASA|P|B|Indonesia';
regionList[59]  = 'EUR|S|C24|Israel';
regionList[60]  = 'EUR|C|C6|Italy';
regionList[61]  = 'USA|M|7|Ixtapa';
regionList[62]  = 'USA|I|0|Jamaica';
regionList[63]  = 'ASA|P|J|Japan';
regionList[64]  = 'ZAR|D|2|Kenya';
regionList[65]  = 'ZAR|S|7|Kwazulu Natal Durban';
regionList[66]  = 'ZAR|S|C|Kwazulu Natal Far North Coast';
regionList[67]  = 'ZAR|S|A|Kwazulu Natal North';
regionList[68]  = 'ZAR|S|4|Kwazulu Natal South';
regionList[69]  = 'EUR|S|C115|Latvia ';
regionList[70]  = 'EUR|S|C99|Lebanon';
regionList[71]  = 'EUR|N|C148|Libya';
regionList[72]  = 'EUR|C|C90|Liechtenstein';
regionList[73]  = 'EUR|S|C142|Lithuania';
regionList[74]  = 'EUR|W|C94|Luxembourg';
regionList[75]  = 'EUR|S|C117|Macedonia';
regionList[76]  = 'EUR|1|77|Madeira';
regionList[77]  = 'EUR|2|37|Mainland';
regionList[78]  = 'ASA|P|M|Malaysia';
regionList[79]  = 'EUR|C|C9|Malta';
regionList[80]  = 'USA|C|M|Manitoba';
regionList[81]  = 'ZAR|D|3|Mauritius';
regionList[82]  = 'USA|M|8|Mazanillo';
regionList[83]  = 'USA|M|5|Mazatlan';
regionList[84]  = 'USA|U|M|Mid West';
regionList[85]  = 'EUR|S|C143|Moldova';
regionList[86]  = 'EUR|W|C110|Monaco';
regionList[87]  = 'EUR|N|C76|Morocco';
regionList[88]  = 'ZAR|D|5|Mozambique';
regionList[89]  = 'ZAR|S|9|Mpumalanga';
regionList[90]  = 'ZAR|D|6|Namibia';
regionList[91]  = 'ASA|P|N|Nepal';
regionList[92]  = 'USA|U|A|Nevada';
regionList[93]  = 'AUS|A|N|New South Wales';
regionList[94]  = 'EUR|17|33|North East';
regionList[95]  = 'USA|U|N|North East';
regionList[96]  = 'AUS|N|N|North Island';
regionList[97]  = 'EUR|17|31|North West';
regionList[98]  = 'EUR|E|C89|Northern';
regionList[99]  = 'ZAR|S|3|Northern Cape';
regionList[100]  = 'AUS|A| |Northern Territory';
regionList[101]  = 'EUR|W|C54|Norway';
regionList[102]  = 'USA|C|O|Ontario';
regionList[103]  = 'USA|C|X|Other Canada';
regionList[104]  = 'USA|I|D|Other Caribbean';
regionList[105]  = 'USA|M|X|Other Mexico';
regionList[106]  = 'USA|U|P|Pacific Coast';
regionList[107]  = 'ASA|P|D|Pakistan';
regionList[108]  = 'ASA|P|P|Philippines';
regionList[109]  = 'EUR|S|C60|Poland';
regionList[110]  = 'USA|M|B|Puerto Penasco';
regionList[111]  = 'USA|I|P|Puerto Rico';
regionList[112]  = 'USA|M|1|Puerto Vallarta';
regionList[113]  = 'USA|C|Q|Quebec';
regionList[114]  = 'AUS|A|Q|Queensland';
regionList[115]  = 'USA|U|R|Rocky Mountains';
regionList[116]  = 'EUR|S|C53|Romania';
regionList[117]  = 'USA|M|9|Rosarito Beach';
regionList[118]  = 'EUR|S|C93|Russian Federation';
regionList[119]  = 'USA|M|0|San Carlos';
regionList[120]  = 'EUR|C|C112|San Marino';
regionList[121]  = 'EUR|G|C69|Scotland';
regionList[122]  = 'EUR|S|C122|Serbia & Montenegro';
regionList[123]  = 'ASA|P|S|Singapore';
regionList[124]  = 'EUR|S|C114|Slovakia';
regionList[125]  = 'EUR|C|C95|Slovenia';
regionList[126]  = 'EUR|17|35|South';
regionList[127]  = 'AUS|A|S|South Australia';
regionList[128]  = 'USA|U|S|South East';
regionList[129]  = 'AUS|N|S|South Island';
regionList[130]  = 'ASA|P|E|South Korea';
regionList[131]  = 'EUR|E|30|South West';
regionList[132]  = 'EUR|17|32|South West';
regionList[133]  = 'USA|U|W|South West';
regionList[134]  = 'ZAR|D|8|Southern Africa Other';
regionList[135]  = 'ASA|P|H|Sri Lanka';
regionList[136]  = 'USA|I|S|St. Maarten / St Martin';
regionList[137]  = 'ZAR|D|4|Swaziland';
regionList[138]  = 'EUR|W|C62|Sweden';
regionList[139]  = 'EUR|C|C16|Switzerland';
regionList[140]  = 'AUS|N|T|Tahiti';
regionList[141]  = 'AUS|A|T|Tasmania';
regionList[142]  = 'ASA|P|T|Thailand';
regionList[143]  = 'EUR|W|C56|The Netherlands';
regionList[144]  = 'USA|M|A|Tijuana';
regionList[145]  = 'EUR|N|C86|Tunisia';
regionList[146]  = 'EUR|S|C64|Turkey';
regionList[147]  = 'EUR|S|C116|Ukraine ';
regionList[148]  = 'USA|I|3|Us Virgin Islands';
regionList[149]  = 'USA|B|3|Venezuala';
regionList[150]  = 'AUS|A|V|Victoria';
regionList[151]  = 'EUR|G|C70|Wales';
regionList[152]  = 'EUR|E|29|West';
regionList[153]  = 'AUS|A|W|Western Australia';
regionList[154]  = 'ZAR|S|2|Western Cape';
regionList[155]  = 'ZAR|D|1|Zimbabwe';




