var Countries=new Array(
Array(1,"United States"),Array(2,"Canada"),Array(16,"Australia"),Array(19,"Bahamas"),Array(48,"China"),Array(159,"New Zealand"),Array(185,"Saint Kitts and Nevis"),Array(118,"South Korea")); 
var countrySelect=document.getElementById('XlocatorCountry'); 
var zipInput=document.getElementById('XlocatorZip'); 
zipes = new Array(
1,2,16,17,24,34,48,62,77,78,85,89,101,110,129,143,155,159,166,177,195,201,209,210,212,228);
 
for (i = 0; i < Countries.length; i++)
{
	countrySelect.options[i] = new Option(Countries[i][1], Countries[i][0]);
}

function checkZip(Cselect){	
	index = parseInt(Countries[Cselect.selectedIndex][0]);
	ok = false;
	for (y = 0; y < zipes.length; y++)
	{
		if(zipes[y] == index)
		{
			ok = true;
			break;
		}
	}
	zipInput.disabled = !ok;
}

function checkSubmit(){
	if (!zipInput.disabled && zipInput.value == '')
	{
		alert('Please enter zip code');
		return false;
	}
}