
function setLocation(formname) {
	stringone = formname.PROVINCE[formname.PROVINCE.selectedIndex].value;
	if (stringone.length > 1) {
		if (stringone.length > 3) {
        		combostring = stringone.split("-");
			combostring[1] = combostring[1].toUpperCase();
			formname.J__CITY.value = combostring[0];
			formname.J__PROVINCE.value = combostring[1];
			statevalue = combostring[1].substring(0,2);
                        formname.J__STATE.value = statevalue;
		} else {
			stringone = stringone.toUpperCase(); 
			formname.J__CITY.value = 'Other';
			formname.J__PROVINCE.value = stringone;
			statevalue = stringone.substring(0,2);
			formname.J__STATE.value = statevalue;
		}
	} else {
		formname.J__CITY.value = 'All';
                formname.J__PROVINCE.value = '';
		formname.J__STATE.value = 'AL'
	}
}

function loadLocation() {
	if (document.myform.J__CITY.value == '(NULL)') {
		city = '';
		province = '';
	} else {
		city = document.myform.J__CITY.value;
		province = document.myform.J__PROVINCE.value;
	}
	locstring ='';
	if ((city.length > 1) && (city != 'Other')) {
		document.myform.J__PROVINCE.value = document.myform.J__PROVINCE.value.toUpperCase();
		locstring = (document.myform.J__CITY.value + '-' + document.myform.J__PROVINCE.value);
		//alert('Your Location is:');
		//alert(locstring);
	} else {
		document.myform.J__PROVINCE.value = document.myform.J__PROVINCE.value.toUpperCase();
		locstring = document.myform.J__PROVINCE.value;
              //alert('Your Location is:');
                //alert(locstring);	
	}
	for (i=0; i<document.myform.PROVINCE.length; i++) {
		if (document.myform.PROVINCE[i].value == locstring) {
			document.myform.PROVINCE.selectedIndex = i;
		}
	}
}
