/**
 * Get the country dropdown HTML, presumably for the checkout or customer profile pages
 *
 * @param 	string|array  	$args
 *
 * @return 	string			HTML representation of the dropdown
 */
function wpsc_get_country_dropdown($args = '')
{
    $defaults = array('name' => 'wpsc_countries', 'id' => 'wpsc-country-dropdown', 'class' => '', 'additional_attributes' => '');
    $args = wp_parse_args($args, $defaults);
    // we are going to remember everytime we create a country dropdown so that we can put a unique id
    // on each HTML element
    static $country_dropdown_counts = array();
    if (!isset($country_dropdown_counts[$args['id']])) {
        $country_dropdown_counts[$args['id']] = 1;
    } else {
        $country_dropdown_counts[$args['id']] = $country_dropdown_counts[$args['id']] + 1;
        $args['id'] = $args['id'] . '-' . $country_dropdown_counts[$args['id']];
    }
    $output = sprintf('<select name="%1$s" id="%2$s" class="%3$s wpsc-country-dropdown" %4$s>', esc_attr($args['name']), esc_attr($args['id']), esc_attr($args['class']), $args['additional_attributes']);
    $output .= _wpsc_country_dropdown_options($args);
    $output .= '</select>';
    return $output;
}
/**
 * Not yet deprecated, but should be considered deprecated.
 *
 * Used only in TEv1 user account page.
 *
 * @param  $selected_country
 * @return
 */
function nzshpcrt_country_list($selected_country = null)
{
    return _wpsc_country_dropdown_options(array('selected' => $selected_country));
}
/**
 * @deprecated since 3.8.9. Use _wpsc_country_dropdown_options instead.
 * @param  string $selected_country ISO code of selected country
 * @return string                   output
 */
function country_list($selected_country = null)
{
    _wpsc_deprecated_function(__FUNCTION__, '3.8.9', '_wpsc_country_dropdown_options');
    return _wpsc_country_dropdown_options(array('selected' => $selected_country));
}