// populates forms with values if they exist
function populateForm (loc, pre) {
    if (arguments.length < 2) {
        pre = '';
    }
    if (loc.address) {
        document.getElementById(pre + 'addr').value = loc.address;
    }
    if (loc.city) {
        document.getElementById(pre + 'city').value = loc.city;
    }
    if (loc.stateProvince) {
        document.getElementById(pre + 'state').value = loc.stateProvince;
    }
    if (loc.county) {
        document.getElementById(pre + 'county').value = loc.county;
    }
    if (loc.postalCode) {
        document.getElementById(pre + 'zip').value = loc.postalCode;
    }
    if (loc.country) {
        document.getElementById(pre + 'country').value = loc.country;
    }
}