<inp2:adm_SetPopupSize width="970" height="580"/>

<inp2:m_include t="incs/header" noform="yes"/>
<inp2:m_include template="catalog/catalog_elements"/>

<inp2:m_RenderElement name="combined_header" section="in-portal:browse" prefix="c" title_preset="advanced_view" tabs="catalog/item_selector/item_selector_tabs" special=".showall" additional_title_render_as="mode_selector_radio" additional_blue_bar_render_as="theme_selector"/>

<inp2:m_set ts="showall" td="no"/>

<!-- main kernel_form: begin -->
<inp2:m_RenderElement name="kernel_form"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
	<tr>
	  	<td>
	  		<input type="hidden" name="m_cat_id" value="<inp2:m_get name="m_cat_id"/>"/>
	  		<inp2:m_include t="catalog/item_selector/item_selector_toolbar" is_catalog="0"/>
	  		<script type="text/javascript">
	  			Catalog.prototype.AfterInit = function() {
	  				this.switchTab();
	  			}

	  			var $Catalog = new Catalog('<inp2:m_Link template="#TEMPLATE_NAME#" pass_through="ts,td,tm,type" type="item_selector" ts="showall" td="no" m_cat_id="#CATEGORY_ID#" no_amp="1"/>', 'is_advanced_view_', 'ItemSelectorAdvancedView');
			</script>
		</td>

		<inp2:m_RenderElement name="catalog_search_box"/>
	</tr>
</tbody>
</table>
<inp2:m_RenderElement name="kernel_form_end"/>
<!-- main kernel_form: end -->

<inp2:m_DefineElement name="tab_bodies">
	<inp2:m_ModuleInclude template="catalog_tab" skip_prefixes="$skip_prefixes" replace_m="yes" tab_init="2"/>
</inp2:m_DefineElement>

<inp2:m_if check="m_Get" name="tp" equals_to="none|all">
	<inp2:c_InitCatalog render_as="tab_bodies" replace_m="yes"/>
<inp2:m_else/>
	<inp2:c_InitCatalog render_as="tab_bodies" replace_m="yes" skip_prefixes="c"/>
</inp2:m_if>

<script type="text/javascript">
	Application.setHook(
		'm:OnAfterWindowLoad',
		function() {
			$Catalog.Init();
		}
	);
</script>

<inp2:m_include t="incs/footer" noform="yes"/>