function xtc_get_country_list($name, $selected = '', $parameters = '')
{
    //    $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
    //    Probleme mit register_globals=off -> erstmal nur auskommentiert. Kann u.U. gelöscht werden.
    $countries = xtc_get_countriesList();
    $countries_top_qry = xtc_db_query("select countries_id, countries_name from " . TABLE_COUNTRIES . " where top = '1' order by countries_name");
    while ($countries_values = xtc_db_fetch_array($countries_top_qry)) {
        $countries_array_top[] = array('countries_id' => $countries_values['countries_id'], 'countries_name' => $countries_values['countries_name']);
    }
    for ($i = 0, $n = sizeof($countries_array_top); $i < $n; $i++) {
        $countries_array[] = array('id' => $countries_array_top[$i]['countries_id'], 'text' => $countries_array_top[$i]['countries_name']);
    }
    $countries_array[] = array('id' => '', 'text' => '----------------', 'disabled' => 'disabled');
    for ($i = 0, $n = sizeof($countries); $i < $n; $i++) {
        $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']);
    }
    if (is_array($name)) {
        return xtc_draw_pull_down_menuNote($name, $countries_array, $selected, $parameters);
    }
    return xtc_draw_pull_down_menu($name, $countries_array, $selected, $parameters);
}
if (ACCOUNT_SUBURB == 'true') {
    $module_smarty->assign('suburb', '1');
    $module_smarty->assign('INPUT_SUBURB', xtc_draw_input_fieldNote(array('name' => 'suburb', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">' . ENTRY_SUBURB_TEXT . '</span>' : '')), $entry['entry_suburb']));
}
$module_smarty->assign('INPUT_CODE', xtc_draw_input_fieldNote(array('name' => 'postcode', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>' : '')), $entry['entry_postcode']));
$module_smarty->assign('INPUT_CITY', xtc_draw_input_fieldNote(array('name' => 'city', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>' : '')), $entry['entry_city']));
if (ACCOUNT_STATE == 'true') {
    $module_smarty->assign('state', '1');
    if ($process == true) {
        if ($entry_state_has_zones == true) {
            $zones_array = array();
            $zones_query = xtc_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . xtc_db_input($country) . "' order by zone_name");
            while ($zones_values = xtc_db_fetch_array($zones_query)) {
                $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
            }
            $state_input = xtc_draw_pull_down_menuNote(array('name' => 'state', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">' . ENTRY_STATE_TEXT . '</span>' : '')), $zones_array);
        } else {
            $state_input = xtc_draw_input_fieldNote(array('name' => 'state', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">' . ENTRY_STATE_TEXT . '</span>' : '')));
        }
    } else {
        $state_input = xtc_draw_input_fieldNote(array('name' => 'state', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">' . ENTRY_STATE_TEXT . '</span>' : '')), xtc_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']));
    }
    $module_smarty->assign('INPUT_STATE', $state_input);
}
if (isset($_POST['country'])) {
    $selected = $_POST['country'];
} elseif (isset($entry['entry_country_id'])) {
    $selected = $entry['entry_country_id'];
} else {
    $selected = STORE_COUNTRY;
}
}
$module_smarty->assign('country_id_content', $country_id_content);
if (ACCOUNT_STATE == 'true') {
    $module_smarty->assign('ACCOUNT_STATE', 'true');
    $state = xtc_get_zone_name($a_country, $a_zone_id, $a_state);
    if ($is_read_only == true) {
        $state_content = xtc_get_zone_name($affiliate['affiliate_country_id'], $affiliate['affiliate_zone_id'], $affiliate['affiliate_state']);
    } elseif ($error == true) {
        if ($entry_state_error == true) {
            if ($entry_state_has_zones == true) {
                $zones_array = array();
                $zones_query = xtc_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . xtc_db_input($a_country) . "' order by zone_name");
                while ($zones_values = xtc_db_fetch_array($zones_query)) {
                    $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
                }
                $state_content = xtc_draw_pull_down_menuNote(array('name' => 'a_state', 'text' => '&nbsp;' . ENTRY_STATE_ERROR), $zones_array);
            } else {
                $state_content = xtc_draw_input_fieldNote(array('name' => 'a_state', 'text' => '&nbsp;' . ENTRY_STATE_ERROR));
            }
        } else {
            $state_content = $state . xtc_draw_hidden_field('a_zone_id') . xtc_draw_hidden_field('a_state');
        }
    } else {
        $state_content = xtc_draw_input_fieldNote(array('name' => 'a_state', 'text' => '&nbsp;' . ENTRY_STATE_TEXT), xtc_get_zone_name($affiliate['affiliate_country_id'], $affiliate['affiliate_zone_id'], $affiliate['affiliate_state']));
    }
    $module_smarty->assign('state_content', $state_content);
}
if ($is_read_only == true) {
    $telephone_content = $affiliate['affiliate_telephone'];
} elseif ($error == true) {
    if ($entry_telephone_error == true) {