<%@ include file="includes/header-vars.jsp" %>
<%

    // alt_build_id is VX notation
    // http://wikioffice.itmgmedia.net/wiki/index.php/B1_Manager_build_description
    String altBuildIdStr = request.getParameter("alt_build_id");
    if ((altBuildIdStr != null) && (altBuildIdStr.length() >= 2)) {
        Integer altBuildId = 0;
        try {
            altBuildId = Integer.parseInt(altBuildIdStr);
        } catch (Exception ex) {
            altBuildId = -1;
        }
        switch (altBuildIdStr.charAt(altBuildIdStr.length() - 1)) {
            case '2':
                os = OperatingSystem.MAC;
                break;
            case '4':
                os = OperatingSystem.DEB32;
                break;
            case '5':
                os = OperatingSystem.BIN32;
                break;
            case '6':
                os = OperatingSystem.DEB64;
                break;
            case '7':
                os = OperatingSystem.BIN64;
                break;
            default:
                os = OperatingSystem.WINDOWS;
        }
        response.sendRedirect(WebTools.getDefLinkAuto(request, response, true, os, "releaseId=20030&fallback=force&forupdate=true"));
    } else {
        response.sendRedirect(WebTools.getDefLinkAuto(request, response, true, os));
    }
%>