<%--suppress HtmlFormInputWithoutLabel --%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<jsp:useBean id="helper" class="org.b1.common.utils.ShuffleHelper"/>
<!DOCTYPE html>
<html>
<head>
    <title>Free archive software utility</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="Description"
          content="Free archive software utility. B1 is archive software utility, available for all popular OS. Compression and decompression for Win, Mac, Linux and Android.">
    <meta name="Keywords"
          content="Free archive software, Free archive utility, file archiver, free archiver, archive file, mac archiver, software, utility, compression, decompression,
          unzip, Win, Windows, Linux, Android, Zip, .zip files, rar, b1, 7z, archive manager">
    <link rel="canonical" href="http://b1.org/support.jsp"/>
    <%
        String build_id = request.getParameter("build_id");
        if (build_id == null) build_id = "";
        boolean uninstall = "uninstall".equals(request.getParameter("src"));
    %>
    <link href="/css/styles.css?v=3" rel="stylesheet"/>
    <jsp:include page="/includes/header-include-new.jsp"/>
</head>
<body>
<!--Start wrapper-->
<div class="wrapper">
<div class="wrapper_bg_help">
    <jsp:include page="/includes/header_page.jsp">
        <jsp:param name="active" value="support"/>
    </jsp:include>
    <!--Start mainContainer-->
    <div class="mainContainer">
        <jsp:include page="/includes/socials.jsp"/>

        <div class="inner_landing">
            <h1 class="landing_head">Welcome to B1 Free Archiver Support</h1>
        </div>
        <!--End mainContainer-->
    </div>
</div>
<!--End mainContainer-->

<!--Start content-->
<jsp:include page="/includes/google-translate-element.jsp"/>
<div class="inner_bg">

<div class="help-wrapper">
<div class="content-support">
    <div class="support-wrapper">
        <div class="main-contact m-co"><!--left content-->
            <% if (uninstall) { %>
            <% } else { %>
            <div class="contact-header">
                <h1><span></span> Contact us</h1>
            </div>
            <% } %>
            <div class="content-contact">
                <p>
                    <% if (uninstall) { %>
                    <b>We are sorry that B1 did not work for you.<br>
                    We appreciate if you could tell us what exactly was wrong and why did you decide to uninstall B1.</b>
                    <% } else { %>
                    If you have any questions or suggestions please contact us at <a href="mailto:support@b1.org">support@b1.org</a> or use the form below.<br/>
                    Please consider that we provide <span>support in English only</span>.
                    <% } %>
                </p>

                <form action="/rest/feedback/post" name="feedbackForm" id="feedbackForm">
                    <% if (uninstall) { %>
                    <div style="padding-left:80px;padding-bottom:20px;">
                        <c:set target="${helper}" property="newLine">
                            <label class="uninst"><input type="radio" name="uninstall" value="dontunderstand" class="uninst">
                                I do not understand how it works</label><br>
                        </c:set>
                        <c:set target="${helper}" property="newLine">
                            <label class="uninst"><input type="radio" name="uninstall" value="dontneed" class="uninst">
                                B1 is good, I just don't need it anymore</label><br>
                        </c:set>
                        <c:set target="${helper}" property="newLine">
                            <label class="uninst"><input type="radio" name="uninstall" value="cannotopen" class="uninst">
                                I cannot open my archives</label><br>
                        </c:set>
                        <c:set target="${helper}" property="newLine">
                            <label class="uninst"><input type="radio" name="uninstall" value="dontlike" class="uninst">
                                I do not like how it looks</label><br>
                        </c:set>
                        <c:set target="${helper}" property="newLine">
                            <label class="uninst"><input type="radio" name="uninstall" value="needfeatures" class="uninst">
                                I need some features, which are missed in B1</label><br>
                        </c:set>
                        ${helper.allLines}
                        <label class="uninst"><input type="radio" name="uninstall" value="customreason" class="uninst">
                            Something other...</label><br>
                    </div>
                    <select id="subject" name="subject" class="cd-select disabled" disabled="disabled">
                        <option value="13" selected>B1 Uninstall - </option>
                    </select>
                    <% } else { %>
                    <select id="subject" name="subject" class="cd-select cd-dropdown-active">
                        <option value="2">B1 Free Archiver - My experience</option>
                        <option value="3">B1 Free Archiver - I have a suggestion</option>
                        <option value="4">B1 Free Archiver - I have a problem</option>
                        <option value="5" selected>B1 Free Archiver - General question</option>
                        <option value="6">B1 Free Archiver for Android</option>
                        <option value="7">Question about B1 format</option>
                    </select>
                    <% } %>

                    <input type="email" name="from" id="from" required="required" maxlength="128" placeholder="E-mail"
                           <% if (build_id.equals("android")) { %>value="android@example.com"<% } %>/>
                    <textarea name="text" id="text" required="required" maxlength="2000" placeholder="Message"></textarea>
                    <button type="submit" class="search-btn right" name="send" id="submit">Submit</button>
                    <div class="clearfix"></div>

                </form>
            </div>
        </div>
        <!--end left content-->

        <div class="main-contact m-con" style="display:none;"><!--left content-->
            <div class="contact-header">
                <h1><span></span> Contact us</h1>
            </div>
            <div class="content-contact">
                <div class="thank-contact">
                    <div class="thank-mail"></div>
                    <div class="clearfix"></div>
                    <p>Thank you very much, we appreciate your feedback!</p>
                    <p>Our support team will contact you soon.</p>
                </div>
            </div>
        </div>
        <!--end left content-->

        <div class="sidebar-support">
            <div class="wrapper-sidebar">
                <h1>Contact</h1>

                <h3>information</h3>

                <div class="map"></div>
                <div class="sidebar-wrap-info">
                    <div class="p-rel">
                        <span class="pm_f pl_r"></span>

                        <p>Catalina Group Ltd</p>
                    </div>
                    <div class="clearfix"></div>
                    <div class="p-road">
                        <span class="pm_f pl_d"></span>

                        <p>Hong Kong, 611 Fook Cheong Building 63 Hoi Yuen Road Kwun Tong</p>
                    </div>
                    <div class="clearfix"></div>
                    <div class="p-sup">
                        <span class="pm_f pl_s"></span>

                        <p><a href="mailto:support@b1.org">support@b1.org</a></p>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
    </div>
    <div class="clearfix"></div>
</div>

<script type="text/javascript" src="/js/jquery.dropdown.js"></script>
<script src="/js/modernizr.custom.63321.js"></script>
<script src="/js/placeholder.js"></script>
<script type="text/javascript">
    $(function () {
        $('.cd-dropdown-active').dropdown({
            gutter: 2,
            stack: false
        });
    });

    $('input, textarea').placeholder();
    $(".m-con").hide();
    $('#info, #text ').focus(function () {
        $(this).css("background", "#fff");
    });
    $('#info, #text').blur(function () {
        $(this).css("background", "#fff");
    });

    function successHandler(data) {
        if (data.ok) {
            $(".m-co").hide();
            $(".m-con").show();
        } else {
            errorHandler.call(this);
        }
    }

    function errorHandler() {
        alert('Error occured');
    }

    $('#feedbackForm').submit(function () {
        var emailValue = $("#from").val();
        var messageValue = $("#text").val();
        <% if (!uninstall) { %>
        if (!$('[name=subject]').val()) {
            alert("Please select subject.");
            return false;
        }
        if (emailValue == "" || !/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(emailValue)) {
            alert("Please enter correct e-mail.");
            return false;
        }
        if ($.trim(messageValue) == "") {
            alert("Please type your message first.");
            return false;
        }
        <% } %>
        $(".m-co").hide();
        $.post($(this).attr('action'), $(this).serializeArray(), function (data) {
            successHandler(data)
        }, "json").error(errorHandler);
        return false;
    });


</script>
</div>
<div class="inner_bottom"></div>
</div>


<jsp:include page="/includes/footer_page.jsp">
    <jsp:param name="active" value="home"/>
</jsp:include>
</div>
<!--End wrapper-->
</body>
</html>
