?>

			<p <?php 
    if (!$this->_tpl_vars['fields']['COUNTRY']) {
        ?>
style="display: none;"<?php 
    }
    ?>
>
				<label><?php 
    echo smarty_function_translate(array('text' => '_country'), $this);
    ?>
</label>
				<?php 
    ob_start();
    echo smarty_function_uniqid(array('assign' => 'id_country'), $this);
    $this->_smarty_vars['capture']['default'] = ob_get_contents();
    $this->assign('blockAsParamValue', ob_get_contents());
    ob_end_clean();
    echo smarty_function_selectfield(array('name' => 'estimate_country', 'options' => $this->_tpl_vars['countries'], 'id' => $this->_tpl_vars['blockAsParamValue']), $this);
    ?>

			</p>

			<?php 
    if ($this->_tpl_vars['fields']['STATE']) {
        ?>
				<?php 
        $_smarty_tpl_vars = $this->_tpl_vars;
        $this->_smarty_include(array('smarty_include_tpl_file' => "custom:user/addressFormState.tpl", 'smarty_include_vars' => array('states' => $this->_tpl_vars['states'], 'notRequired' => true, 'prefix' => 'estimate_')));
        $this->_tpl_vars = $_smarty_tpl_vars;
        ob_start();
        if (!(is_array($_tmp = 'TOP_FILTER_RELOAD') ? $this->_run_mod_handler('config', true, $_tmp) : $this->_plugins['modifier']['config'][0][0]->config($_tmp))) {
            ?>
	<input type="submit" class="submit" value="<?php 
            echo is_array($_tmp = smarty_function_translate(array('text' => '_search', 'disableLiveTranslation' => 'true'), $this)) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html');
            ?>
" />
<?php 
        }
        ?>
</form>
</div>

<script type="text/javascript">
	var filters = new Filter.SelectorMenu($("filterTop_<?php 
        echo smarty_function_uniqid(array('last' => true), $this);
        ?>
"), <?php 
        echo is_array($_tmp = 'TOP_FILTER_RELOAD') ? $this->_run_mod_handler('config', true, $_tmp) : $this->_plugins['modifier']['config'][0][0]->config($_tmp);
        ?>
);
</script>
<?php 
        $_block_content = ob_get_contents();
        ob_end_clean();
        $_block_repeat = false;
        echo smarty_block_footer($this->_tag_stack[count($this->_tag_stack) - 1][1], $_block_content, $this, $_block_repeat);
    }
    array_pop($this->_tag_stack);
    $_block_content = ob_get_contents();
    ob_end_clean();
					</div>
				<?php 
        }
        ?>
			<?php 
    } elseif (2 == $this->_tpl_vars['option']['type']) {
        ?>
				<fieldset class="error"><?php 
        echo smarty_function_textfield(array('name' => $this->_tpl_vars['fieldName'], 'class' => 'text'), $this);
        ?>

			<?php 
    } elseif (3 == $this->_tpl_vars['option']['type']) {
        ?>
				<?php 
        echo smarty_function_uniqid(array('assign' => 'uniq', 'noecho' => true), $this);
        ?>

				<?php 
        echo smarty_function_filefield(array('name' => "upload_" . $this->_tpl_vars['fieldName'], 'id' => $this->_tpl_vars['uniq']), $this);
        ?>

				<?php 
        echo smarty_function_hidden(array('name' => $this->_tpl_vars['fieldName']), $this);
        ?>

				<?php 
        $this->_tag_stack[] = array('error', array('for' => "upload_" . $this->_tpl_vars['fieldName']));
        $_block_repeat = true;
        smarty_block_error($this->_tag_stack[count($this->_tag_stack) - 1][1], null, $this, $_block_repeat);
        while ($_block_repeat) {
state_select"><span class="label"><?php 
    echo smarty_function_translate(array('text' => '_state'), $this);
    ?>
:</span></label>
			<fieldset class="error"><?php 
    ob_start();
    echo smarty_function_uniqid(array('assign' => 'id_state_select'), $this);
    $this->_smarty_vars['capture']['default'] = ob_get_contents();
    $this->assign('blockAsParamValue', ob_get_contents());
    ob_end_clean();
    echo smarty_function_selectfield(array('name' => $this->_tpl_vars['prefix'] . "state_select", 'style' => "display: none;", 'options' => $this->_tpl_vars['states'], 'id' => $this->_tpl_vars['blockAsParamValue']), $this);
    ?>

			<?php 
    ob_start();
    echo smarty_function_uniqid(array('assign' => 'id_state_text'), $this);
    $this->_smarty_vars['capture']['default'] = ob_get_contents();
    $this->assign('blockAsParamValue', ob_get_contents());
    ob_end_clean();
    echo smarty_function_textfield(array('name' => $this->_tpl_vars['prefix'] . "state_text", 'class' => 'text', 'id' => $this->_tpl_vars['blockAsParamValue']), $this);
    ?>

		
	<div class="errorText hidden<?php 
    $this->_tag_stack[] = array('error', array('for' => $this->_tpl_vars['prefix'] . "state_select"));
    $_block_repeat = true;
    smarty_block_error($this->_tag_stack[count($this->_tag_stack) - 1][1], null, $this, $_block_repeat);
    while ($_block_repeat) {
        ob_start();
        ?>
 visible<?php