
var lists = new Array();

lists['0000|UNITED STATES']    = new Array();
lists['0000|UNITED STATES'][0] = new Array(
'Alabama',
'Alaska',
'Arizona',
'Arkansas',
'California',
'Colorado',
'Connecticut',
'Delaware',
'District of Columbia',
'Florida',
'Georgia',
'Hawaii',
'Idaho',
'Illinois',
'Indiana',
'Iowa',
'Kansas',
'Kentucky',
'Louisiana',
'Maine',
'Maryland',
'Massachusetts',
'Michigan',
'Minnesota',
'Mississippi',
'Missouri',
'Montana',
'Nebraska',
'Nevada',
'New Hampshire',
'New Jersey',
'New Mexico',
'New York',
'North Carolina',
'North Dakota',
'Ohio',
'Oklahoma',
'Oregon',
'Pennsylvania',
'Rhode Island',
'South Carolina',
'South Dakota',
'Tennessee',
'Texas',
'Utah',
'Vermont',
'Virgin Islands',
'Virginia',
'Washington',
'West Virginia',
'Wisconsin',
'Wyoming'
);

lists['0000|UNITED STATES'][1] = new Array(
'AL',
'AK',
'AZ',
'AR',
'CA',
'CO',
'CT',
'DE',
'DC',
'FL',
'GA',
'HI',
'ID',
'IL',
'IN',
'IA',
'KS',
'KY',
'LA',
'ME',
'MD',
'MA',
'MI',
'MN',
'MS',
'MO',
'MT',
'NE',
'NV',
'NH',
'NJ',
'NM',
'NY',
'NC',
'ND',
'OH',
'OK',
'OR',
'PA',
'RI',
'SC',
'SD',
'TN',
'TX',
'UT',
'VT',
'VA',
'VI',
'WA',
'WV',
'WI',
'WY'
);

lists['0001|CANADA']    = new Array();
lists['0001|CANADA'][0] = new Array(
'Alberta',
'British Columbia',
'Manitoba',
'New Brunswick',
'Newfoundland and Labrador',
'Northwest Territories',
'Nova Scotia',
'Nunavut',
'Ontario',
'Prince Edward Island',
'Quebec',
'Saskatchewan',
'Yukon Territory'
);

lists['0001|CANADA'][1] = new Array(
'AB',
'BC',
'MB',
'NB',
'NL',
'NT',
'NS',
'NU',
'ON',
'PE',
'PQ',
'SK',
'YT'
);

lists['FN']    = new Array();
lists['FN'][0] = new Array(
'US and Canada Only'
);

lists['FN'][1] = new Array(
'FN'
);

function changeListship( box ) {
	if( box.options[box.selectedIndex].value != "0001|CANADA" && box.options[box.selectedIndex].value != "0000|UNITED STATES") {
		list = lists['FN']
	}
	else {

		list = lists[box.options[box.selectedIndex].value];
	}
	emptyList( box.form.State );
	fillList( box.form.State, list );
}
function changeListbill( box ) {

	if( box.options[box.selectedIndex].value != "0001" && box.options[box.selectedIndex].value != "0000") {
		list = lists['FN']
	}
	else {
		list = lists[box.options[box.selectedIndex].value];
}
	emptyList( box.form.bstate );
	fillList( box.form.bstate, list );
}
function emptyList( box ) {
	while ( box.options.length ) box.options[0] = null;
}
function fillList( box, arr ) {
	for ( i = 0; i < arr[0].length; i++ ) {
		option = new Option( arr[0][i], arr[1][i]+"|"+arr[1][i] );
		box.options[box.length] = option;
	}
	box.selectedIndex=0;
}

