function GetCountriesForTassieEntryForm()
{
	document.formTassieEntry.buttonSubmit.disabled = true;

	var myRequest = new ajaxObject('/EntryForms/Tassie/php/ajax/Countries_SelectForDDL.xml.php', GetCountriesForTassieEntryForm_OnResponse);

	myRequest.update();

	return true;
}

function GetCountriesForTassieEntryForm_OnResponse(responseText, responseStatus, responseXML)
{
	// Make sure the status is "OK"
	if (responseStatus == 200)
	{
		var theCountries = responseXML.getElementsByTagName('Country');
		var theCountriesDDL = document.formTassieEntry.ddlCountry;

		theCountriesDDL.length = 0;
		
		if (theCountries.length > 0)
		{
			for (i = 0; i < theCountries.length; i++)
			{
				var thisNode = theCountries.item(i);

				if (thisNode != null && thisNode.hasChildNodes())
				{
					theCountriesDDL.length += 1;

					theCountriesDDL.options[theCountriesDDL.length - 1].value = 
						GetValue(thisNode.childNodes[1]);
					theCountriesDDL.options[theCountriesDDL.length - 1].text = 
						html_entity_decode(GetValue(thisNode.childNodes[2]));
				}
			}
			
			for (i = 0; i < theCountriesDDL.options.length; i++)
			{
				if (theCountriesDDL.options[i].value == "GB")
				{
					theCountriesDDL.selectedIndex = i;
					break;
				}
			}			
		}
		
		document.formTassieEntry.buttonSubmit.disabled = false;
		
		return true;
	}
	return false;
}

