<inp2:adm_SetPopupSize width="515" height="194"/>
<inp2:m_include t="incs/header"/>

<inp2:adm_ImportData var="prefix" result_to_var="importprefix" />
<inp2:{$importprefix}_PermSection section="main" result_to_var="permsection" />
<inp2:m_RenderElement name="combined_header" section="$permsection" prefix="adm" title_preset="csv_import"/>

	<script type="text/javascript" src="js/ajax.js"></script>
	<inp2:m_RenderElement name="ajax_progress_bar" cancel_action="cancel_action();"/>
	<script type="text/javascript">
		function cancel_action() {
			redirect('<inp2:m_Link template="import/import_complete"/>');
		}

		var PrefixSpecial = '<inp2:m_Get var="PrefixSpecial" js_escape="1" />';
		var grid = '<inp2:m_Get var="grid" js_escape="1" />';
		var action_url = '<inp2:m_t template="index" adm_event="OnCSVImportStep" type="return_progress" finish_template="import/import_complete" PrefixSpecial="#PrefixSpecial#" grid="#grid#" pass="m,adm" no_amp="1"/>';
		action_url = action_url.replace('#PrefixSpecial#', PrefixSpecial);
		action_url = action_url.replace('#grid#', grid);
	//	window.open(action_url);

		$QueueProcessor = new AjaxProgressBar(action_url);
	</script>

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