{script}
{literal}
$(function(){
    $("form[name='MainSearchForm'] [name='match_sex']").change(
        function(){ this.form.submit(); }
    );
});
{/literal}
{/script}

{if isset($menu)}{$menu}{/if}

{if isset($authMessage)}
<div class="ow_anno ow_std_margin ow_nocontent">{$authMessage}</div>
{else}
<div class="clearfix">
    <div class="ow_superwide ow_automargin">
        {form name=MainSearchForm}
        <table class="ow_table_1 ow_form">
            {if $displayAccountType==true}
                {if !empty($displayGender)}
                    <tr class=" ow_tr_first ow_tr_last">
                        {cycle assign='alt' values='ow_alt1,ow_alt2'}
                        <td class="{$alt} ow_label">
                            {label name='sex'}
                        </td>
                        <td class="{$alt} ow_value">
                            {input name='sex'}
                            <div style="height:1px;"></div>
                            {error name='sex'}
                        </td>
                    </tr>
                {/if}
                <tr class="ow_tr_first">
                    {cycle assign='alt' values='ow_alt1,ow_alt2'}
                    <td class="{$alt} ow_label">
                        {label name='match_sex'}
                    </td>
                    <td class="{$alt} ow_value">
                        {input name='match_sex'}
                        <div style="height:1px;"></div>
                        {error name='match_sex'}
                    </td>
                </tr>
                
                <tr class="">
                    {cycle assign='alt' values='ow_alt1,ow_alt2'}
                    <td class="{$alt} ow_label">
                        {label name='online'}
                    </td>
                    <td class="{$alt} ow_value">
                        {input name='online'}
                        <div style="height:1px;"></div>
                        {error name='online'}
                    </td>
                </tr>
                
                <tr class="ow_tr_last">
                    {cycle assign='alt' values='ow_alt1,ow_alt2'}
                    <td class="{$alt} ow_label">
                        {label name='with_photo'}
                    </td>
                    <td class="{$alt} ow_value">
                        {input name='with_photo'}
                        <div style="height:1px;"></div>
                        {error name='with_photo'}
                    </td>
                </tr>
                
                <tr class="ow_tr_delimiter"><td></td></tr>
            {/if}
            {if !empty($questionList)}
            {foreach from=$questionList key='section' item='questions'}
            {if !empty($section) }
            <tr class="ow_tr_first"><th colspan="3">{text key="base+questions_section_`$section`_label"}</th></tr>
            {/if}
            {foreach from=$questions item='question' name='question'}
                <tr class="{if $smarty.foreach.question.last}ow_tr_last{/if}">
                    {cycle assign='alt' values='ow_alt1,ow_alt2'}
                    <td class="{$alt} ow_label">
                        {label name=$question.name}
                    </td>
                    <td class="{$alt} ow_value">
                        {input name=$question.name}
                        <div style="height:1px;"></div>
                        {error name=$question.name}
                    </td>
                </tr>
            {/foreach}
            <tr class="ow_tr_delimiter"><td></td></tr>
            {/foreach}
            {/if}
        </table>
        <div class="clearfix">
            <div class="ow_right">
                {submit name='MainSearchFormSubmit'}
            </div>
        </div>
        {/form}
    </div>
</div>
{/if}
