My thanks to dsonesuk, with his help I have achieved my goal with the following:
<script>
var stateArray = [[0, 'Qld'], [0, 'NSW'], [0, 'Vic'], [0, 'Tas'], [0, 'ACT'], [0, 'SA'], [0, 'WA'], [0, 'NT'], [0, 'Queensland'], [0, 'New South Wales'], [0, 'Victoria'], [0, 'Tasmania'], [0, 'Australian Capital Territory'], [0, 'South Australia'], [0, 'Western AUstralia'], [0, 'Northern Territory']];
var countryArray = ['Australia'];
function autoFill(elem) {
var countryIndex = "";
for (i = 0; i < stateArray.length; i++) {
if (elem.value === stateArray[1]) {
countryIndex = stateArray[0]; document.getElementById('country').value = countryArray[countryIndex]; break; }
} } </script>
<form> <p><label>State of Birth: </label> <input type="text" id="state" name="state" onkeyup="autoFill(this)"> <p> <label>Country of Birth: </label> <input type="text" id="country" name="country"> </p> </form>