Creates an HTML menu (dropdownbox) for year selection.

    @param name: name of control( i.e. name of the variable you'll get)
    @param from_year: year on which to begin. if <0 assume it is current year
    @param length: number of items in menu
    @param selected_year: initial selected year (if in range), else: label is
                          selected
    @param ln: language
    @return: html as string

def create_year_selectbox(name, from_year=-1, length=10, selected_year=0,
                          ln=None):
    """Creates an HTML menu (dropdownbox) for year selection.

    @param name: name of control( i.e. name of the variable you'll get)
    @param from_year: year on which to begin. if <0 assume it is current year
    @param length: number of items in menu
    @param selected_year: initial selected year (if in range), else: label is
                          selected
    @param ln: language
    @return: html as string
    """
    ln = default_ln(ln)
    _ = gettext_set_language(ln)
    if from_year < 0:
        from_year = time.localtime()[0]
    out = "<select name=\"%s\">\n" % name
    out += '  <option value="0"'
    if selected_year == 0:
        out += ' selected="selected"'
    out += ">%s</option>\n" % _("Year")
    for i in range(from_year, from_year + length):
        out += "<option value=\"%i\"" % i
        if (i == selected_year):
            out += " selected=\"selected\""
        out += ">%i</option>\n" % i
    out += "</select>\n"
    return out