<inp2:m_Set tab_index="1"/>

<inp2:m_DefineElement name="combined_header" permission_type="view" perm_section="" perm_prefix="" perm_event="" system_permission="1" title_preset="" tab_preset="" additional_title_render_as="" additional_blue_bar_render_as="" pagination_prefix="" parent="1" grid="Default">
	<inp2:m_if check="m_Param" name="perm_section" inverse="1">
		<inp2:adm_SectionInfo section="$section" info="perm_section" result_to_var="perm_section"/>
	</inp2:m_if>
	<inp2:m_if check="m_Param" name="permission_type">
		<inp2:m_RequireLogin permissions="{$perm_section}.{$permission_type}" perm_event="$perm_event" perm_prefix="$perm_prefix" system="$system_permission"/>
	<inp2:m_else/>
		<inp2:m_RequireLogin permissions="{$perm_section}" perm_event="$perm_event" perm_prefix="$perm_prefix" system="$system_permission"/>
	</inp2:m_if>
	<inp2:m_if check="m_Param" name="prefix" inverse="1"><inp2:adm_SectionInfo section="$section" info="SectionPrefix" result_to_var="prefix"/></inp2:m_if>
	<inp2:m_if check="m_get" var="m_wid" inverse="1">
		<inp2:m_if check="m_GetConfig" name="UseSmallHeader">
			<img src="img/spacer.gif" height="8" width="1" alt=""/>
		<inp2:m_else/>
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<!--## <tr<inp2:m_ifnot check="m_ModuleEnabled" module="Proj-Base"> style="background: url(<inp2:adm_SectionInfo section="$section" parent="$parent" info="module_path"/>img/logo_bg.gif) no-repeat top right; height: 55px;"</inp2:m_ifnot>> ##-->
				<tr>
					<td valign="top" class="admintitle" align="left" <!--##style="padding-top: 10px; padding-bottom: 10px;"##-->>
			    		<img width="46" height="46" src="<inp2:adm_SectionInfo section='$section' parent='$parent' info='module_path'/>img/icons/icon46_<inp2:adm_SectionInfo section='$section' parent='$parent' info='icon'/>.png" align="absmiddle" title="<inp2:adm_SectionInfo section='$section' parent='$parent' info='label' no_editing='1'/>" alt=""/><inp2:adm_SectionInfo section="$section" parent="$parent" info="label"/>
			   		</td>
			   		<inp2:m_if check="m_Param" name="additional_title_render_as">
						<inp2:m_RenderElement name="$additional_title_render_as" pass_params="1"/>
					</inp2:m_if>
				</tr>
			</table>
		</inp2:m_if>
	<inp2:m_else/>
		<inp2:m_if check="m_Param" name="additional_title_render_as">
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<!--## <tr<inp2:m_ifnot check="m_ModuleEnabled" module="Proj-Base"> style="background: url(<inp2:adm_SectionInfo section="$section" parent="$parent" info="module_path"/>img/logo_bg.gif) no-repeat top right; height: 55px;"</inp2:m_ifnot>> ##-->
				<tr>
					<inp2:m_RenderElement name="$additional_title_render_as" pass_params="1"/>
				</tr>
			</table>
		</inp2:m_if>
	</inp2:m_if>

	<inp2:$prefix_ModifyUnitConfig pass_params="1"/>

	<inp2:m_if check="m_Param" name="tabs">
		<inp2:m_include t="$tabs" pass_params="1"/>
	</inp2:m_if>

	<inp2:m_if check="m_Param" name="tab_preset">
		<inp2:m_RenderElement name="edit_tabs" prefix="$prefix" preset_name="$tab_preset"/>
	</inp2:m_if>

	<table border="0" cellpadding="2" cellspacing="0" class="bordered-no-bottom" width="100%" style="height: 30px;">
		<tr>
			<td class="header_left_bg" nowrap="nowrap" style="vertical-align: middle;">
				<inp2:adm_SectionInfo section="$section" info="label" result_to_var="default_title"/>
				<inp2:adm_SectionInfo section="$section" parent="$parent" info="label" result_to_var="group_title"/>
				<span class="tablenav_link" id="blue_bar">
					<inp2:$prefix_SectionTitle title_preset="$title_preset" section="$section" title="$default_title" group_title="$group_title" cut_first="100" pass_params="true"/>
				</span>
			</td>
			<td align="right" class="tablenav" style="vertical-align: middle;">
				<inp2:m_if check="m_Param" name="additional_blue_bar_render_as">
					<inp2:m_RenderElement name="$additional_blue_bar_render_as" pass_params="1"/>
				<inp2:m_else/>
					<inp2:m_if check="m_Param" name="pagination">
						<inp2:$prefix_SelectParam possible_names="pagination_prefix,prefix" result_to_var="pagination_prefix"/>
						<inp2:m_RenderElement name="grid_pagination_elem" PrefixSpecial="$pagination_prefix" pass_params="1"/>
					</inp2:m_if>
				</inp2:m_if>
			</td>
		</tr>
	</table>

	<script type="text/javascript">
		var $visible_toolbar_buttons = <inp2:m_if check="{$prefix}_VisibleToolbarButtons" title_preset="$title_preset">[<inp2:$prefix_VisibleToolbarButtons title_preset="$title_preset"/>]<inp2:m_else/>true</inp2:m_if>;
		var $allow_dbl_click = ($visible_toolbar_buttons === true) || in_array('dbl-click', $visible_toolbar_buttons);

		set_window_title( $.trim( $('#blue_bar').text().replace(/\s+/g, ' ') ) + ' - <inp2:m_Phrase label="la_AdministrativeConsole" js_escape="1"/>');
		setHelpLink('<inp2:lang.current_Field name="UserDocsUrl" js_escape="1"/>', '<inp2:m_Param name="title_preset" js_escape="1"/>');
	</script>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_original_label">
	<td><inp2:$prefix.original_Field field="$field" nl2br="1"/></td>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="subsection" prefix="" fields="" colspan="3">
	<inp2:m_if check="m_Param" name="prefix" equals_to="">
		<tr class="subsectiontitle">
			<td colspan="<inp2:m_param name='colspan'/>"><inp2:m_phrase label="$title"/></td>
		</tr>
	<inp2:m_else/>
		<inp2:m_if check="{$prefix}_FieldsVisible" fields="$fields">
			<tr class="subsectiontitle">
				<td colspan="<inp2:m_param name='colspan'/>"><inp2:m_phrase label="$title"/></td>
				<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
					<td><inp2:m_phrase name="$original_title"/></td>
				</inp2:m_if>
			</tr>
		</inp2:m_if>
	</inp2:m_if>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="form_message" id="" type="warning">
	<table width="100%" cellspacing="0" cellpadding="4" class="warning-table"<inp2:m_if check="m_Param" name="id"> id="<inp2:m_Param name='id'/>"</inp2:m_if>>
		<tr>
			<td valign="top" class="form-<inp2:m_Param name='type'/>">
				<inp2:m_Param name="content"/>
			</td>
		</tr>
	</table>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="default_field_caption_element">
	<label for="<inp2:m_param name='NamePrefix'/><inp2:{$prefix}_InputName field='$field'/>">
		<span class="<inp2:m_if check='{$prefix}_HasError' field='$field'>error-cell</inp2:m_if>"><inp2:m_if check="m_Param" name="title"><inp2:m_phrase label="$title"/></inp2:m_else/><inp2:m_Param name="title_text"/></inp2:m_if></span></span><inp2:m_if check="{$prefix}_IsRequired" field="$field"><span class="field-required">&nbsp;*</span></inp2:m_if>:<inp2:m_if check="{$prefix}_FieldHintLabel" title_label="$title" direct_label="$hint_label"><span>&nbsp;<img src="<inp2:m_TemplatesBase/>/img/hint_icon.png" width="12" height="13" title="<inp2:$prefix_FieldHintLabel title_label='$title' direct_label='$hint_label' html_escape='1'/>" alt="<inp2:$prefix_FieldHintLabel title_label='$title' direct_label='$hint_label' html_escape='1'/>"/></inp2:m_if>
	</label>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_field_caption" title="la_fld_{$field}" title_text="" hint_label="" NamePrefix="">
	<inp2:m_inc param="tab_index" by="1"/>
	<td class="label-cell" onmouseover="show_form_error('<inp2:m_Param name='prefix' js_escape='1'/>', '<inp2:m_Param name='field' js_escape='1'/>')" onmouseout="hide_form_error('<inp2:m_Param name='prefix' js_escape='1'/>')">
		<inp2:m_if check="m_Param" name="title">
			<inp2:m_RenderElement name="$caption_render_as" pass_params="1"/>
		<inp2:m_else/>
			<inp2:m_if check="m_Param" name="title_text">
				<inp2:m_RenderElement name="$caption_render_as" pass_params="1"/>
			<inp2:m_else/>
				&nbsp;
			</inp2:m_if>
		</inp2:m_if>
	</td>
	<td class="control-mid">&nbsp;</td>
	<script type="text/javascript">
		if (typeof(fields['<inp2:m_Param name="prefix" js_escape="1"/>']) == 'undefined') {
			fields['<inp2:m_Param name="prefix" js_escape="1"/>'] = new Object();
		}
		fields['<inp2:m_Param name="prefix" js_escape="1"/>']['<inp2:m_Param name="field" js_escape="1"/>'] = '<inp2:m_if check="m_Param" name="title"><inp2:m_phrase label="$title" js_escape="1"/></inp2:m_else/><inp2:m_Param name="title_text" js_escape="1"/></inp2:m_if>'
	</script>
</inp2:m_DefineElement>

<!--## design default parameters only avaible in design block ##-->
<inp2:m_DefineElement name="form_row" error_field_suffix="" has_caption="1" caption_render_as="default_field_caption_element" style="" hint_label="" is_last="">
	<inp2:m_if check="{$prefix}_FieldVisible" field="$field">
		<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>" id="<inp2:$prefix_InputName field='$field'/>_row"<inp2:m_if check="m_Param" name="row_style"> style="<inp2:m_Param name='row_style'/>"</inp2:m_if>>
			<inp2:m_if check="m_Param" name="has_caption">
				<inp2:m_RenderElement name="inp_edit_field_caption" field="{$field}{$error_field_suffix}" pass_params="1"/>
			</inp2:m_if>

			<inp2:m_Param name="content" pass_params="1"/>

			<inp2:m_RenderElement name="inp_edit_error" prefix="$prefix" field="{$field}{$error_field_suffix}"/>

			<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
				<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
			</inp2:m_if>
		</tr>
	</inp2:m_if>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_label" style="" format="" db="" as_label="" currency="" no_special="" nl2br="0" with_hidden="0" after_text="">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell" valign="top">
			<span style="<inp2:m_Param name='style'/>" id="<inp2:$prefix_InputName field='$field'/>">
				<inp2:{$prefix}_Field field="$field" format="$format" as_label="$as_label" currency="$currency" nl2br="$nl2br" no_special="$no_special"/><inp2:m_Param name="after_text"/>
			</span>

			<inp2:m_if check="m_Param" name="with_hidden">
				<input type="hidden" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field' db='$db'/>">
			</inp2:m_if>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_id_label">
	<inp2:m_ifnot check="Field" field="$field" equals_to="|0">
		<inp2:m_RenderElement name="inp_label" pass_params="true"/>
	</inp2:m_ifnot>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_error">
	<script type="text/javascript">
		add_form_error('<inp2:m_Param name="prefix" js_escape="1"/>', '<inp2:m_Param name="field" js_escape="1"/>', '<inp2:{$prefix}_InputName field="$field"/>', '<inp2:{$prefix}_Error field="$field" js_escape="1"/>')
	</script>
	<!--##<td class="error-cell"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>##-->
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_box" class="" format="" maxlength="" onblur="" onchange="" size="" onkeyup="" allow_html="" edit_template="popups/editor" style="width: 100%" after_text="" autocomplete="">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<input style="<inp2:m_Param name='style'/>" type="text" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field' format='$format'/>" tabindex="<inp2:m_Get name='tab_index'/>" size="<inp2:m_param name='size'/>" maxlength="<inp2:m_param name='maxlength'/>" class="<inp2:m_param name='class'/>" onblur="<inp2:m_Param name='onblur'/>" onkeyup="<inp2:m_Param name='onkeyup'/>" onchange="<inp2:m_Param name='onchange'/>" autocomplete="<inp2:m_Param name='autocomplete'/>"><inp2:m_Param name="after_text"/>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_timezone" onchange="" style="">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">

			<script type="text/javascript">
				var $timezones = {
					'Africa': ['Africa/Abidjan', 'Africa/Accra', 'Africa/Addis_Ababa', 'Africa/Algiers', 'Africa/Asmara', 'Africa/Asmera', 'Africa/Bamako', 'Africa/Bangui', 'Africa/Banjul', 'Africa/Bissau', 'Africa/Blantyre', 'Africa/Brazzaville', 'Africa/Bujumbura', 'Africa/Cairo', 'Africa/Casablanca', 'Africa/Ceuta', 'Africa/Conakry', 'Africa/Dakar', 'Africa/Dar_es_Salaam', 'Africa/Djibouti', 'Africa/Douala', 'Africa/El_Aaiun', 'Africa/Freetown', 'Africa/Gaborone', 'Africa/Harare', 'Africa/Johannesburg', 'Africa/Kampala', 'Africa/Khartoum', 'Africa/Kigali', 'Africa/Kinshasa', 'Africa/Lagos', 'Africa/Libreville', 'Africa/Lome', 'Africa/Luanda', 'Africa/Lubumbashi', 'Africa/Lusaka', 'Africa/Malabo', 'Africa/Maputo', 'Africa/Maseru', 'Africa/Mbabane', 'Africa/Mogadishu', 'Africa/Monrovia', 'Africa/Nairobi', 'Africa/Ndjamena', 'Africa/Niamey', 'Africa/Nouakchott', 'Africa/Ouagadougou', 'Africa/Porto-Novo', 'Africa/Sao_Tome', 'Africa/Timbuktu', 'Africa/Tripoli', 'Africa/Tunis', 'Africa/Windhoek'],
					'America': ['America/Adak', 'America/Anchorage', 'America/Anguilla', 'America/Antigua', 'America/Araguaina', 'America/Argentina/Buenos_Aires', 'America/Argentina/Catamarca', 'America/Argentina/ComodRivadavia', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/La_Rioja', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Salta', 'America/Argentina/San_Juan', 'America/Argentina/San_Luis', 'America/Argentina/Tucuman', 'America/Argentina/Ushuaia', 'America/Aruba', 'America/Asuncion', 'America/Atikokan', 'America/Atka', 'America/Bahia', 'America/Barbados', 'America/Belem', 'America/Belize', 'America/Blanc-Sablon', 'America/Boa_Vista', 'America/Bogota', 'America/Boise', 'America/Buenos_Aires', 'America/Cambridge_Bay', 'America/Campo_Grande', 'America/Cancun', 'America/Caracas', 'America/Catamarca', 'America/Cayenne', 'America/Cayman', 'America/Chicago', 'America/Chihuahua', 'America/Coral_Harbour', 'America/Cordoba', 'America/Costa_Rica', 'America/Cuiaba', 'America/Curacao', 'America/Danmarkshavn', 'America/Dawson', 'America/Dawson_Creek', 'America/Denver', 'America/Detroit', 'America/Dominica', 'America/Edmonton', 'America/Eirunepe', 'America/El_Salvador', 'America/Ensenada', 'America/Fort_Wayne', 'America/Fortaleza', 'America/Glace_Bay', 'America/Godthab', 'America/Goose_Bay', 'America/Grand_Turk', 'America/Grenada', 'America/Guadeloupe', 'America/Guatemala', 'America/Guayaquil', 'America/Guyana', 'America/Halifax', 'America/Havana', 'America/Hermosillo', 'America/Indiana/Indianapolis', 'America/Indiana/Knox', 'America/Indiana/Marengo', 'America/Indiana/Petersburg', 'America/Indiana/Tell_City', 'America/Indiana/Vevay', 'America/Indiana/Vincennes', 'America/Indiana/Winamac', 'America/Indianapolis', 'America/Inuvik', 'America/Iqaluit', 'America/Jamaica', 'America/Jujuy', 'America/Juneau', 'America/Kentucky/Louisville', 'America/Kentucky/Monticello', 'America/Knox_IN', 'America/La_Paz', 'America/Lima', 'America/Los_Angeles', 'America/Louisville', 'America/Maceio', 'America/Managua', 'America/Manaus', 'America/Marigot', 'America/Martinique', 'America/Matamoros', 'America/Mazatlan', 'America/Mendoza', 'America/Menominee', 'America/Merida', 'America/Mexico_City', 'America/Miquelon', 'America/Moncton', 'America/Monterrey', 'America/Montevideo', 'America/Montreal', 'America/Montserrat', 'America/Nassau', 'America/New_York', 'America/Nipigon', 'America/Nome', 'America/Noronha', 'America/North_Dakota/Center', 'America/North_Dakota/New_Salem', 'America/Ojinaga', 'America/Panama', 'America/Pangnirtung', 'America/Paramaribo', 'America/Phoenix', 'America/Port-au-Prince', 'America/Port_of_Spain', 'America/Porto_Acre', 'America/Porto_Velho', 'America/Puerto_Rico', 'America/Rainy_River', 'America/Rankin_Inlet', 'America/Recife', 'America/Regina', 'America/Resolute', 'America/Rio_Branco', 'America/Rosario', 'America/Santa_Isabel', 'America/Santarem', 'America/Santiago', 'America/Santo_Domingo', 'America/Sao_Paulo', 'America/Scoresbysund', 'America/Shiprock', 'America/St_Barthelemy', 'America/St_Johns', 'America/St_Kitts', 'America/St_Lucia', 'America/St_Thomas', 'America/St_Vincent', 'America/Swift_Current', 'America/Tegucigalpa', 'America/Thule', 'America/Thunder_Bay', 'America/Tijuana', 'America/Toronto', 'America/Tortola', 'America/Vancouver', 'America/Virgin', 'America/Whitehorse', 'America/Winnipeg', 'America/Yakutat', 'America/Yellowknife'],
					'Antarctica': ['Antarctica/Casey', 'Antarctica/Davis', 'Antarctica/DumontDUrville', 'Antarctica/Macquarie', 'Antarctica/Mawson', 'Antarctica/McMurdo', 'Antarctica/Palmer', 'Antarctica/Rothera', 'Antarctica/South_Pole', 'Antarctica/Syowa', 'Antarctica/Vostok'],
					'Arctic': ['Arctic/Longyearbyen'],
					'Asia': ['Asia/Aden', 'Asia/Almaty', 'Asia/Amman', 'Asia/Anadyr', 'Asia/Aqtau', 'Asia/Aqtobe', 'Asia/Ashgabat', 'Asia/Ashkhabad', 'Asia/Baghdad', 'Asia/Bahrain', 'Asia/Baku', 'Asia/Bangkok', 'Asia/Beirut', 'Asia/Bishkek', 'Asia/Brunei', 'Asia/Calcutta', 'Asia/Choibalsan', 'Asia/Chongqing', 'Asia/Chungking', 'Asia/Colombo', 'Asia/Dacca', 'Asia/Damascus', 'Asia/Dhaka', 'Asia/Dili', 'Asia/Dubai', 'Asia/Dushanbe', 'Asia/Gaza', 'Asia/Harbin', 'Asia/Ho_Chi_Minh', 'Asia/Hong_Kong', 'Asia/Hovd', 'Asia/Irkutsk', 'Asia/Istanbul', 'Asia/Jakarta', 'Asia/Jayapura', 'Asia/Jerusalem', 'Asia/Kabul', 'Asia/Kamchatka', 'Asia/Karachi', 'Asia/Kashgar', 'Asia/Kathmandu', 'Asia/Katmandu', 'Asia/Kolkata', 'Asia/Krasnoyarsk', 'Asia/Kuala_Lumpur', 'Asia/Kuching', 'Asia/Kuwait', 'Asia/Macao', 'Asia/Macau', 'Asia/Magadan', 'Asia/Makassar', 'Asia/Manila', 'Asia/Muscat', 'Asia/Nicosia', 'Asia/Novokuznetsk', 'Asia/Novosibirsk', 'Asia/Omsk', 'Asia/Oral', 'Asia/Phnom_Penh', 'Asia/Pontianak', 'Asia/Pyongyang', 'Asia/Qatar', 'Asia/Qyzylorda', 'Asia/Rangoon', 'Asia/Riyadh', 'Asia/Saigon', 'Asia/Sakhalin', 'Asia/Samarkand', 'Asia/Seoul', 'Asia/Shanghai', 'Asia/Singapore', 'Asia/Taipei', 'Asia/Tashkent', 'Asia/Tbilisi', 'Asia/Tehran', 'Asia/Tel_Aviv', 'Asia/Thimbu', 'Asia/Thimphu', 'Asia/Tokyo', 'Asia/Ujung_Pandang', 'Asia/Ulaanbaatar', 'Asia/Ulan_Bator', 'Asia/Urumqi', 'Asia/Vientiane', 'Asia/Vladivostok', 'Asia/Yakutsk', 'Asia/Yekaterinburg', 'Asia/Yerevan'],
					'Atlantic': ['Atlantic/Azores', 'Atlantic/Bermuda', 'Atlantic/Canary', 'Atlantic/Cape_Verde', 'Atlantic/Faeroe', 'Atlantic/Faroe', 'Atlantic/Jan_Mayen', 'Atlantic/Madeira', 'Atlantic/Reykjavik', 'Atlantic/South_Georgia', 'Atlantic/St_Helena', 'Atlantic/Stanley'],
					'Australia': ['Australia/ACT', 'Australia/Adelaide', 'Australia/Brisbane', 'Australia/Broken_Hill', 'Australia/Canberra', 'Australia/Currie', 'Australia/Darwin', 'Australia/Eucla', 'Australia/Hobart', 'Australia/LHI', 'Australia/Lindeman', 'Australia/Lord_Howe', 'Australia/Melbourne', 'Australia/North', 'Australia/NSW', 'Australia/Perth', 'Australia/Queensland', 'Australia/South', 'Australia/Sydney', 'Australia/Tasmania', 'Australia/Victoria', 'Australia/West', 'Australia/Yancowinna'],
					'Europe': ['Europe/Amsterdam', 'Europe/Andorra', 'Europe/Athens', 'Europe/Belfast', 'Europe/Belgrade', 'Europe/Berlin', 'Europe/Bratislava', 'Europe/Brussels', 'Europe/Bucharest', 'Europe/Budapest', 'Europe/Chisinau', 'Europe/Copenhagen', 'Europe/Dublin', 'Europe/Gibraltar', 'Europe/Guernsey', 'Europe/Helsinki', 'Europe/Isle_of_Man', 'Europe/Istanbul', 'Europe/Jersey', 'Europe/Kaliningrad', 'Europe/Kiev', 'Europe/Lisbon', 'Europe/Ljubljana', 'Europe/London', 'Europe/Luxembourg', 'Europe/Madrid', 'Europe/Malta', 'Europe/Mariehamn', 'Europe/Minsk', 'Europe/Monaco', 'Europe/Moscow', 'Europe/Nicosia', 'Europe/Oslo', 'Europe/Paris', 'Europe/Podgorica', 'Europe/Prague', 'Europe/Riga', 'Europe/Rome', 'Europe/Samara', 'Europe/San_Marino', 'Europe/Sarajevo', 'Europe/Simferopol', 'Europe/Skopje', 'Europe/Sofia', 'Europe/Stockholm', 'Europe/Tallinn', 'Europe/Tirane', 'Europe/Tiraspol', 'Europe/Uzhgorod', 'Europe/Vaduz', 'Europe/Vatican', 'Europe/Vienna', 'Europe/Vilnius', 'Europe/Volgograd', 'Europe/Warsaw', 'Europe/Zagreb', 'Europe/Zaporozhye', 'Europe/Zurich'],
					'Indian': ['Indian/Antananarivo', 'Indian/Chagos', 'Indian/Christmas', 'Indian/Cocos', 'Indian/Comoro', 'Indian/Kerguelen', 'Indian/Mahe', 'Indian/Maldives', 'Indian/Mauritius', 'Indian/Mayotte', 'Indian/Reunion'],
					'Pacific': ['Pacific/Apia', 'Pacific/Auckland', 'Pacific/Chatham', 'Pacific/Easter', 'Pacific/Efate', 'Pacific/Enderbury', 'Pacific/Fakaofo', 'Pacific/Fiji', 'Pacific/Funafuti', 'Pacific/Galapagos', 'Pacific/Gambier', 'Pacific/Guadalcanal', 'Pacific/Guam', 'Pacific/Honolulu', 'Pacific/Johnston', 'Pacific/Kiritimati', 'Pacific/Kosrae', 'Pacific/Kwajalein', 'Pacific/Majuro', 'Pacific/Marquesas', 'Pacific/Midway', 'Pacific/Nauru', 'Pacific/Niue', 'Pacific/Norfolk', 'Pacific/Noumea', 'Pacific/Pago_Pago', 'Pacific/Palau', 'Pacific/Pitcairn', 'Pacific/Ponape', 'Pacific/Port_Moresby', 'Pacific/Rarotonga', 'Pacific/Saipan', 'Pacific/Samoa', 'Pacific/Tahiti', 'Pacific/Tarawa', 'Pacific/Tongatapu', 'Pacific/Truk', 'Pacific/Wake', 'Pacific/Wallis', 'Pacific/Yap'],
					'Others': ['UTC']
				}

				function change_timezone_group($timezone_group) {
					var $target = $( jq('#<inp2:InputName name="$field"/>') );

					$target.hide().empty();
					$target.append('<option value=""></option>');

					if ($timezone_group == '') {
						return ;
					}

					for (var $i = 0; $i < $timezones[$timezone_group].length; $i++) {
						var $timezone = $timezones[$timezone_group][$i];
						var $selected = $timezone == $current_timezone ? ' selected="selected"' : '';

						$target.append('<option value="' + $timezone + '" ' + $selected + '>' + $timezone + '</option>');
					}

					$target.show();
				}

				var $current_timezone = '<inp2:Field name="$field"/>';

				$(document).ready(
					function () {
						$('#timezone_group').change(
							function ($e) {
								change_timezone_group( $(this).val() );
							}
						);

						var $current_timezone_group = '';

						for (var $timezone_group in $timezones) {
							if (in_array($current_timezone, $timezones[$timezone_group])) {
								$current_timezone_group = $timezone_group;
								break;
							}
						}

						$('#timezone_group').val($current_timezone_group).change();
					}
				);
			</script>

			<select id="timezone_group" tabindex="<inp2:m_Get name='tab_index'/>">
				<option value=""></option>
				<option value="Africa">Africa</option>
				<option value="America">America</option>
				<option value="Antarctica">Antarctica</option>
				<option value="Arctic">Arctic</option>
				<option value="Asia">Asia</option>
				<option value="Atlantic">Atlantic</option>
				<option value="Australia">Australia</option>
				<option value="Europe">Europe</option>
				<option value="Indian">Indian</option>
				<option value="Pacific">Pacific</option>
				<option value="Others">Others</option>
			</select>
			&nbsp;&nbsp;

			<select tabindex="<inp2:m_Get name='tab_index'/>" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" onchange="<inp2:m_Param name='onchange'/>" style="<inp2:m_Param name='style'/>"></select>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_password" class="" size="" style="">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<input style="<inp2:m_Param name='style'/>" autocomplete="off" type="password" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field name='{$field}_plain'/>" tabindex="<inp2:m_Get name='tab_index'/>" size="<inp2:m_param name='size'/>" class="<inp2:m_param name='class'/>" />

			<script type="text/javascript">
				$(document).ready(
					function() {
						<inp2:m_ifnot check="{$prefix}_Field" name="{$field}_plain">
							$('#' + jq('<inp2:{$prefix}_InputName field="$field"/>')).val('');
						</inp2:m_ifnot>
					}
				);
			</script>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_upload" class="" size="" thumbnail="" style="">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<inp2:m_if check="m_Param" name="thumbnail">
				<inp2:m_if check="{$prefix}_FieldEquals" name="$field" value="" inverse="inverse">
					<img src="<inp2:{$prefix}_Field field='$field' format='resize:{$thumbnail}'/>" alt=""/><br />
					<table cellpadding="0" cellspacing="0">
						<tr>
							<td>
								<input type="hidden" id="<inp2:{$prefix}_InputName field='Delete{$field}'/>" name="<inp2:{$prefix}_InputName field='Delete{$field}'/>" value="0" />
								<input type="checkbox" id="_cb_<inp2:{$prefix}_InputName field='Delete{$field}'/>" tabindex="<inp2:m_Get name='tab_index'/>" onchange="update_checkbox(this, document.getElementById('<inp2:{$prefix}_InputName field='Delete{$field}'/>'));">
							</td>
							<td>
								<label for="_cb_<inp2:{$prefix}_InputName field='Delete{$field}'/>"><inp2:m_phrase name="la_btn_Delete"/></label>
							</td>
						</tr>
					</table>
				</inp2:m_if>
				<input type="file" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" tabindex="<inp2:m_Get name='tab_index'/>" size="<inp2:m_param name='size'/>" class="<inp2:m_param name='class'/>">
			<inp2:m_else/>
				<input type="file" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" tabindex="<inp2:m_Get name='tab_index'/>" size="<inp2:m_param name='size'/>" class="<inp2:m_param name='class'/>">
				<inp2:m_if check="{$prefix}_FieldEquals" name="$field" value="" inverse="inverse">
					(<inp2:{$prefix}_Field field="$field"/>)
				</inp2:m_if>
			</inp2:m_if>
			<input type="hidden" name="<inp2:{$prefix}_InputName field='$field'/>[upload]" id="<inp2:{$prefix}_InputName field='$field'/>[upload]" value="<inp2:{$prefix}_Field field='$field'/>">
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_box_ml">
	<inp2:m_RenderElement name="inp_edit_box" format="no_default" pass_params="true"/>

	<!--##
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="label-cell" valign="top">
			<span class="<inp2:m_if check='{$prefix}_HasError' field='$field'>error-cell</inp2:m_if>" >
			<inp2:m_phrase label="$title"/><inp2:m_if check="{$prefix}_IsRequired" field="$field"><span class="field-required">&nbsp;*</span></inp2:m_if>:</span><br>
			<a href="javascript:PreSaveAndOpenTranslator('<inp2:m_param name='prefix'/>', '<inp2:m_param name='field'/>', 'popups/translator');" title="<inp2:m_Phrase label='la_Translate'/>"><img src="img/icons/icon24_translate.png" style="cursor:hand" border="0"></a>
		</td>
		<td class="control-cell">
			<input style="<inp2:m_Param name='style'/>" type="text" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field' format='no_default'/>" tabindex="<inp2:m_Get name='tab_index'/>" size="<inp2:m_param name='size'/>" maxlength="<inp2:m_param name='maxlength'/>" class="<inp2:m_param name='class'/>" onblur="<inp2:m_Param name='onblur'/>">
		</td>
	</inp2:m_RenderElement>
	##-->
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_swf_upload" class="" style="">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<div style="width: 63px; height: 21px;" id="<inp2:{$prefix}_InputName field='$field'/>_place_holder">
				&nbsp;
			</div>

			<div id="<inp2:{$prefix}_InputName field='$field'/>_queueinfo" class="uploader-queue"></div>

			<input type="hidden" name="<inp2:{$prefix}_InputName field='$field'/>[upload]" id="<inp2:{$prefix}_InputName field='$field'/>[upload]" value="<inp2:{$prefix}_Field field='$field' format='file_names'/>">
			<input type="hidden" name="<inp2:{$prefix}_InputName field='$field'/>[tmp_ids]" id="<inp2:{$prefix}_InputName field='$field'/>[tmp_ids]" value="">
			<input type="hidden" name="<inp2:{$prefix}_InputName field='$field'/>[tmp_names]" id="<inp2:{$prefix}_InputName field='$field'/>[tmp_names]" value="">
			<input type="hidden" name="<inp2:{$prefix}_InputName field='$field'/>[tmp_deleted]" id="<inp2:{$prefix}_InputName field='$field'/>[tmp_deleted]" value="">

			<script type="text/javascript">
				UploadsManager.AddUploader('<inp2:{$prefix}_InputName field="$field"/>',
					{
						baseUrl: '<inp2:m_TemplatesBase />',
						allowedFiletypesDescription : '<inp2:{$prefix}_FieldOption field="$field" option="files_description" result_to_var="files_description"/><inp2:m_Phrase name="$files_description" js_escape="1"/>',
						allowedFiletypes : '<inp2:{$prefix}_FieldOption field="$field" option="file_types"/>',
						allowedFilesize : '<inp2:{$prefix}_FieldOption field="$field" option="max_size"/>',
						multiple : '<inp2:{$prefix}_FieldOption field="$field" option="multiple"/>',
						prefix : '<inp2:m_Param name="prefix"/>',
						field : '<inp2:m_Param name="field"/>',
						thumb_format: '<inp2:{$prefix}_FieldOption field="$field" option="thumb_format"/>',
						urls : '<inp2:{$prefix}_Field field="$field" format="file_urls" js_escape="1"/>',
						names : '<inp2:{$prefix}_Field field="$field" format="file_names" js_escape="1"/>',
						sizes : '<inp2:{$prefix}_Field field="$field" format="file_sizes" js_escape="1"/>',
						flashsid : '<inp2:m_SID/>',
						uploadURL : '<inp2:m_t pass="all,$prefix" {$prefix}_event="OnUploadFile" js_escape="1" no_amp="1" />',
						deleteURL : '<inp2:m_t pass="all,$prefix" {$prefix}_event="OnDeleteFile" field="#FIELD#" file="#FILE#" js_escape="1" no_amp="1"/>',
						tmp_url : '<inp2:m_t pass="all,$prefix" {$prefix}_event="OnViewFile" tmp="1" field="#FIELD#" file="#FILE#" id="#ID#" js_escape="1" no_amp="1" />',

						// Button settings
						buttonImageURL: 'img/upload.png',	// Relative to the Flash file
						buttonWidth: 63,
						buttonHeight: 21,
						buttonText: '<span class="theFont">Browse</span>',
						buttonTextStyle: ".theFont { font-size: 12; font-family: arial, sans}",
						buttonTextTopPadding: 2,
						buttonTextLeftPadding: 9,
						buttonPlaceholderId: '<inp2:{$prefix}_InputName field="$field"/>_place_holder'
					}
				)
			</script>

		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_hidden" db="">
	<input type="hidden" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field' db='$db'/>">
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_date" class="" error_field_suffix="_date">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<input type="text" name="<inp2:{$prefix}_InputName field='{$field}_date'/>" id="<inp2:{$prefix}_InputName field='{$field}_date'/>" value="<inp2:{$prefix}_Field field='{$field}_date' format='_input_'/>" tabindex="<inp2:m_Get name='tab_index'/>" size="<inp2:{$prefix}_Format field='{$field}_date' input_format='1' edit_size='edit_size'/>" class="<inp2:m_param name='class'/>" datepickerIcon="<inp2:m_ProjectBase/>core/admin_templates/img/calendar_icon.gif">&nbsp;
			<img src="img/calendar_icon.gif" id="cal_img_<inp2:{$prefix}_InputName field='{$field}'/>"
					     style="cursor: pointer; margin-right: 5px"
					     title="Date selector"
					/>
			<span class="small">(<inp2:{$prefix}_Format field="{$field}_date" input_format="1" human="true"/>)</span>
			<script type="text/javascript">
				Calendar.setup({
			        inputField		:	"<inp2:{$prefix}_InputName field='{$field}_date'/>",
			        ifFormat		:	Calendar.phpDateFormat("<inp2:{$prefix}_Format field='{$field}_date' input_format='1'/>"),
			        button			:	"cal_img_<inp2:{$prefix}_InputName field='{$field}'/>",
			        align			:	"br",
			        singleClick		:	true,
			        showsTime		:	true,
			        weekNumbers		:	false,
			        firstDay		:	<inp2:m_GetConfig var="FirstDayOfWeek"/>,
			        onUpdate	:	function(cal) {
			        	runOnChange('<inp2:$prefix_InputName field='{$field}_date'/>');
			       	}
				});
			</script>
			<input type="hidden" name="<inp2:{$prefix}_InputName field='{$field}_time'/>" id="<inp2:{$prefix}_InputName field='{$field}_time' input_format='1'/>" value="">
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_time" class="" error_field_suffix="_time">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<input type="text" name="<inp2:{$prefix}_InputName field='{$field}_time'/>" id="<inp2:{$prefix}_InputName field='{$field}_time'/>" value="<inp2:{$prefix}_Field field='{$field}_time' format='_input_'/>" tabindex="<inp2:m_Get name='tab_index'/>" size="<inp2:{$prefix}_Format field='{$field}_time' input_format='1' edit_size='edit_size'/>" class="<inp2:m_param name='class'/>">&nbsp;
			<span class="small">(<inp2:{$prefix}_Format field="{$field}_time" input_format="1" human="true"/>)</span>

			<input type="hidden" name="<inp2:{$prefix}_InputName field='{$field}_date'/>" id="<inp2:{$prefix}_InputName field='{$field}_date' input_format='1'/>" value="">
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_date_time" class="">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<input type="text" name="<inp2:{$prefix}_InputName field='{$field}_date'/>" id="<inp2:{$prefix}_InputName field='{$field}_date'/>" value="<inp2:{$prefix}_Field field='{$field}_date' format='_input_'/>" tabindex="<inp2:m_Get name='tab_index'/>" size="<inp2:{$prefix}_Format field='{$field}_date' input_format='1' edit_size='edit_size'/>" class="<inp2:m_param name='class'/>" datepickerIcon="<inp2:m_ProjectBase/>core/admin_templates/img/calendar_icon.gif">
			<img src="img/calendar_icon.gif" id="cal_img_<inp2:{$prefix}_InputName field="{$field}"/>"
					     style="cursor: pointer; margin-right: 5px"
					     title="Date selector"
					/>
				<span class="small">(<inp2:{$prefix}_Format field="{$field}_date" input_format="1" human="true"/>)</span>
			<input type="hidden" id="full_date_<inp2:{$prefix}_InputName field='{$field}'/>" value="<inp2:{$prefix}_Field field='{$field}' format=''/>" />
			<script type="text/javascript">
				Calendar.setup({
			        inputField	:	"full_date_<inp2:{$prefix}_InputName field='{$field}'/>",
			        ifFormat	:	Calendar.phpDateFormat("<inp2:{$prefix}_Format field='{$field}' input_format='1'/>"),
			        button		:	"cal_img_<inp2:{$prefix}_InputName field='{$field}'/>",
			        align		:	"br",
			        singleClick	:	true,
			        showsTime	:	true,
			        weekNumbers	:	false,
			        firstDay	:	<inp2:m_GetConfig var="FirstDayOfWeek"/>,
			        onUpdate	:	function(cal) {
			        	document.getElementById('<inp2:{$prefix}_InputName field="{$field}_date"/>').value = cal.date.print( Calendar.phpDateFormat("<inp2:{$prefix}_Format field="{$field}_date" input_format="1"/>") );
			        	document.getElementById('<inp2:{$prefix}_InputName field="{$field}_time"/>').value = cal.date.print( Calendar.phpDateFormat("<inp2:{$prefix}_Format field="{$field}_time" input_format="1"/>") );
			       	}
				});
			</script>
			&nbsp;<input type="text" name="<inp2:{$prefix}_InputName field='{$field}_time'/>" id="<inp2:{$prefix}_InputName field='{$field}_time'/>" value="<inp2:{$prefix}_Field field='{$field}_time' format='_input_'/>" tabindex="<inp2:m_Get name='tab_index'/>" size="<inp2:{$prefix}_Format field='{$field}_time' input_format='1' edit_size='edit_size'/>" class="<inp2:m_param name='class'/>"><span class="small"> (<inp2:{$prefix}_Format field="{$field}_time" input_format="1" human="true"/>)</span>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_date_time_combined" class="">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<input type="text" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field' format='_input_'/>" tabindex="<inp2:m_get param='tab_index'/>" size="<inp2:{$prefix}_Format field='$field' input_format='1' edit_size='edit_size'/>" class="<inp2:m_param name='class'/>" datepickerIcon="<inp2:m_ProjectBase/>core/admin_templates/img/calendar_icon.gif"/>

			<img src="img/calendar_icon.gif" id="cal_img_<inp2:{$prefix}_InputName field="{$field}"/>"
					     style="cursor: pointer; margin-right: 5px"
					     title="Date selector"
					/>
				<span class="small">(<inp2:{$prefix}_Format field="$field" input_format="1" human="true"/>)</span>

			<script type="text/javascript">
				Calendar.setup({
			        inputField	:	"<inp2:{$prefix}_InputName field='{$field}'/>",
			        ifFormat	:	Calendar.phpDateFormat("<inp2:{$prefix}_Format field='{$field}' input_format='1'/>"),
			        button		:	"cal_img_<inp2:{$prefix}_InputName field='{$field}'/>",
			        align		:	"br",
			        singleClick	:	true,
			        showsTime	:	true,
			        weekNumbers	:	false,
			        firstDay	:	<inp2:m_GetConfig var="FirstDayOfWeek"/>
				});
			</script>

			<input type="hidden" name="<inp2:{$prefix}_InputName field='{$field}_combined'/>" value="1"/>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="textarea_field_caption_element">
	<inp2:m_RenderElement name="default_field_caption_element" pass_params="1"/>

	<br>
	<inp2:m_if check="m_ParamEquals" name="allow_html" value="allow_html">
		<inp2:{$prefix}_InputName field="$field" result_to_var="input_name"/>
		<a href="<inp2:m_Link template='$edit_template' TargetField='$input_name' pass_through='TargetField' pass='m,$prefix'/>" onclick="openSelector('<inp2:m_Param name='prefix' js_escape='1'/>', this.href, '', '800x575'); return false;">
			<img src="img/icons/icon24_link_editor.gif" border="0">
		</a>
	</inp2:m_if>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_textarea" caption_render_as="textarea_field_caption_element" class="" format="" edit_template="popups/editor" allow_html="allow_html" style="text-align: left; width: 100%; height: 100px;" control_options="false" row_style="height: auto">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<textarea style="<inp2:m_Param name='style'/>" tabindex="<inp2:m_Get name='tab_index'/>" id="<inp2:{$prefix}_InputName field='$field'/>" name="<inp2:{$prefix}_InputName field='$field'/>" ><inp2:{$prefix}_Field field="$field" format="fck_ready;{$format}"/></textarea>
			<script type="text/javascript">
				Form.addControl('<inp2:{$prefix}_InputName field="$field"/>', <inp2:m_param name="control_options"/>);
			</script>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_fck" class="" maxlength="" bgcolor="" onblur="" format="" size="" onkeyup="" style="" has_caption="0" control_options="false">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell" style="padding: 0px;" colspan="3" onmouseover="show_form_error('<inp2:m_Param name='prefix' js_escape='1'/>', '<inp2:m_Param name='field' js_escape='1'/>')" onmouseout="hide_form_error('<inp2:m_Param name='prefix' js_escape='1'/>')">
			<inp2:FCKEditor field="$field" width="100%" height="200" bgcolor="$bgcolor" format="$format" late_load="1"/>
			<script type="text/javascript">
				if (typeof(fields['<inp2:m_Param name="prefix" js_escape="1"/>']) == 'undefined') {
					fields['<inp2:m_Param name="prefix" js_escape="1"/>'] = new Object();
				}
				fields['<inp2:m_Param name="prefix" js_escape="1"/>']['<inp2:m_Param name="field" js_escape="1"/>'] = '<inp2:m_phrase label="$title" js_escape="1"/>'

				Form.addControl('<inp2:$prefix_InputName field="$field"/>', <inp2:m_param name="control_options"/>);
			</script>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_codepress" style="width: 100%;" language="html" has_caption="0" control_options="false">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell" colspan="3" onmouseover="show_form_error('<inp2:m_Param name='prefix' js_escape='1'/>', '<inp2:m_Param name='field' js_escape='1'/>')" onmouseout="hide_form_error('<inp2:m_Param name='prefix' js_escape='1'/>')">
			<inp2:m_ifnot check="m_Get" name="codepress_included">
				<script type="text/javascript" src="<inp2:m_TemplatesBase/>/themes/codepress/codepress.js"></script>
				<script type="text/javascript">
					CodePress.path = '<inp2:m_TemplatesBase/>/themes/codepress/'; // set path here, because script tags are not found in table cells
				</script>
				<inp2:m_Set codepress_included="1"/>
			</inp2:m_ifnot>
			<textarea id="<inp2:$prefix_InputName field='$field'/>" name="<inp2:$prefix_InputName field='$field'/>" class="codepress <inp2:m_Param name='language'/>" style="<inp2:m_Param name='style'/>"><inp2:$prefix_Field field="$field"/></textarea>

			<script type="text/javascript">
				Application.setHook(
					new Array ('<inp2:m_Param name="prefix" js_escape="1"/>:OnPreSaveAndGoToTab', '<inp2:m_Param name="prefix" js_escape="1"/>:OnPreSaveAndGo', '<inp2:m_Param name="prefix" js_escape="1"/>:OnSave', '<inp2:m_Param name="prefix" js_escape="1"/>:OnCreate', '<inp2:m_Param name="prefix" js_escape="1"/>:OnUpdate'),
					function($event) {
						<inp2:m_Param name="field"/>.toggleEditor(); // enable textarea back to save data
						$event.status = true;
					}
				);
				if (typeof(fields['<inp2:m_Param name="prefix" js_escape="1"/>']) == 'undefined') {
					fields['<inp2:m_Param name="prefix" js_escape="1"/>'] = new Object();
				}
				fields['<inp2:m_Param name="prefix" js_escape="1"/>']['<inp2:m_Param name="field" js_escape="1"/>'] = '<inp2:m_phrase label="$title" js_escape="1"/>'

				Form.addControl('<inp2:$prefix_InputName field="$field"/>', <inp2:m_param name="control_options"/>);
			</script>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>


<inp2:m_DefineElement name="textarea_ml_field_caption_element">
	<inp2:m_RenderElement name="default_field_caption_element" pass_params="1"/>

	<br>
	<inp2:m_if check="m_ParamEquals" name="allow_html" value="allow_html">
		<inp2:{$prefix}_InputName field="$field" result_to_var="input_name"/>
		<a href="<inp2:m_Link template='$edit_template' TargetField='$input_name' pass_through='TargetField' pass='m,$prefix'/>" onclick="openSelector('<inp2:m_Param name='prefix' js_escape='1'/>', this.href, '', '800x575'); return false;">
			<img src="img/icons/icon24_link_editor.gif" style="cursor: hand;" border="0">
		</a>
	</inp2:m_if>

	<a href="javascript:PreSaveAndOpenTranslator('<inp2:m_param name="prefix"/>', '<inp2:m_param name="field"/>', 'popups/translator', 1);" title="<inp2:m_Phrase label='la_Translate'/>"><img src="img/icons/icon24_translate.png" border="0"></a>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_textarea_ml">
	<inp2:m_RenderElement name="inp_edit_textarea" format="no_default" pass_params="true"/>
	<!--##<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<textarea style="<inp2:m_Param name='style'/>" tabindex="<inp2:m_Get name='tab_index'/>" id="<inp2:{$prefix}_InputName field='$field'/>" name="<inp2:{$prefix}_InputName field='$field'/>" cols="<inp2:m_param name='cols'/>" rows="<inp2:m_param name='rows'/>" class="<inp2:m_param name='class'/>"><inp2:{$prefix}_Field field="$field" format="fck_ready,{$format}"/></textarea>
			<script type="text/javascript">
				Form.addControl('<inp2:{$prefix}_InputName field="$field"/>', <inp2:m_param name="control_options"/>);
			</script>
		</td>
	</inp2:m_RenderElement>##-->
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_user" class="" size="" old_style="0" onkeyup="">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<input type="text" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field'/>" tabindex="<inp2:m_Get name='tab_index'/>" size="<inp2:m_param name='size'/>" class="<inp2:m_param name='class'/>" onkeyup="<inp2:m_Param name='onkeyup'/>">
			<inp2:m_if check="m_ParamEquals" name="old_style" value="1">
				<a href="#" onclick="return OpenUserSelector('','kernel_form','<inp2:{$prefix}_InputName field="$field"/>');">
			<inp2:m_else/>
				<a href="javascript:openSelector('<inp2:m_param name='prefix'/>', '<inp2:m_t t='user_selector' pass='all,$prefix' escape='1'/>', '<inp2:m_param name='field'/>');">
			</inp2:m_if>
          		 <img src="img/icons/icon24_link_user.gif" style="cursor:hand;" border="0">
         	</a>

         	<script type="text/javascript">
	         	function processUserSelector($field, $selector) {
	         		var $field_mask = '<inp2:$prefix_InputName name="#FIELD_NAME#"/>';
					var $user_id = parseInt( $selector.Grids['u'].GetSelected() );

					$( jq('#' + $field_mask.replace('#FIELD_NAME#', '<inp2:m_Param name="field"/>')) ).val( $selector.$user_logins[$user_id] );
				}
         	</script>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_category" class="" size="" old_style="0" onkeyup="">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<inp2:m_RenderElement name="inp_edit_hidden" pass_params="1"/>

			<table cellpadding="0" cellspacing="0">
				<tr>
					<td id="<inp2:{$prefix}_InputName field='$field'/>_path"<inp2:m_ifnot check="Field" name="$field" db="db"> style="display: none;"</inp2:m_ifnot>>
						<inp2:$prefix_Field field='$field' db="db" result_to_var="category_id"/>
						<inp2:m_include template="categories/category_path" category_id="$category_id"/>
					</td>
					<td valign="middle">
						<img src="img/spacer.gif" width="3" height="1" alt=""/>
						<a href="javascript:openSelector('<inp2:m_param name='prefix'/>', '<inp2:adm_SelectorLink prefix='$prefix' selection_mode='single' tab_prefixes='none'/>', '<inp2:m_param name='field'/>');">
			          		 <img src="img/icons/icon24_cat.gif" width="24" height="24" border="0"/>
			         	</a>

			         	<a href="#" id="<inp2:{$prefix}_InputName field='$field'/>_disable_link"<inp2:m_ifnot check="Field" name="$field" db="db"> style="display: none;"</inp2:m_ifnot>><inp2:m_Phrase name="la_Text_Disable"/></a>

			         	<script type="text/javascript">
							function processItemSelector($field, $selector) {
								var $item_ids = $selector.Grids[$selector.$Catalog.ActivePrefix].GetSelected();

								CategorySelector.setCategory($field, $item_ids.length ? $item_ids.shift() : '');
							}

							function CategorySelector() {
							}

							CategorySelector.getField = function ($field) {
								return jq('<inp2:{$prefix}_InputName field="#FIELD_NAME#"/>'.replace('#FIELD_NAME#', $field));
							}

							CategorySelector.setCategory = function ($field, $category_id) {
								var $field_id = this.getField($field);

				         		$('#' + $field_id).val($category_id);

								$('#' + $field_id + '_path').load(
									'<inp2:m_Link template="categories/category_path" category_id="#ID#" no_amp="1" js_escape="1"/>'.replace('#ID#', $category_id),
									function () {
										$('#' + $field_id + '_path, #' + $field_id + '_disable_link').toggle( $category_id !== '' );
									}
								);
							}

							$(document).ready(
								function() {
									var $field_id = CategorySelector.getField('<inp2:m_Param name="field" js_escape="1"/>');

									$('#' + $field_id + '_disable_link').click(
										function ($e) {
											CategorySelector.setCategory('<inp2:m_Param name="field" js_escape="1"/>', '');

											return false;
										}
									);
								}
							);
					    </script>
					</td>
				</tr>
			</table>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_combo_target" caption_render_as="default_field_caption_element" read_only="0" has_empty="" hint_label="">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<inp2:m_if check="m_Param" name="read_only">
				<inp2:$prefix_Field name="{$field}Type"/>: "<inp2:$prefix_Field name="$field"/>"
			<inp2:m_else/>
				<select tabindex="<inp2:m_get param='tab_index'/>" name="<inp2:{$prefix}_InputName field='{$field}Type'/>" id="<inp2:{$prefix}_InputName field='{$field}Type'/>">
					<inp2:{$prefix}_PredefinedOptions field="{$field}Type" block="inp_option_phrase" selected="selected" has_empty="$has_empty"/>
				</select>

				<input type="text" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field'/>" tabindex="<inp2:m_get param='tab_index'/>" style="width: 250px;"/>
			</inp2:m_if>

			<script type="text/javascript">
				fields['<inp2:m_Param name="prefix" js_escape="1"/>']['<inp2:m_Param name="field" js_escape="1"/>Type'] = '<inp2:m_phrase label="{$title}Type" js_escape="1"/>'

				new AJAXDropDown(
					'<inp2:$prefix_InputName name="$field" js_escape="1"/>',
					function(cur_value) {
						var $type = $( jq('#<inp2:$prefix_InputName name="{$field}Type" js_escape="1"/>') ).val();

						if ( !isNaN( parseInt($type) ) ) {
							var $url = '<inp2:m_Link template="dummy" pass="m,$prefix" {$prefix}_event="OnSuggestAddress" value="#VALUE#" type="#TYPE#" no_amp="1"/>';

							return $url.replace('#VALUE#', encodeURIComponent(cur_value)).replace('#TYPE#', encodeURIComponent($type));
						}

						return false;
					}
				);

				$(document).ready(
					function () {
						$( jq('#<inp2:$prefix_InputName name="{$field}Type"/>') ).change(
							function ($e) {
								var $me = $(this);

								if ($me.attr('disabled')) {
									return ;
								}

								var $type_selected = !isNaN( parseInt( $me.val() ) );
								$( jq('#<inp2:$prefix_InputName name="$field"/>') ).attr('disabled', $type_selected ? '' : 'disabled');
							}
						)
						.change();
					}
				);
			</script>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="email_recipients_js" prefix="emailevents" to_readonly="auto">
	<script type="text/javascript">
		Recipients.formatLine = function($record_index) {
			if (this.Records[$record_index]['RecipientName']) {
				// name specified
				if (this.Records[$record_index]['RecipientAddressType'] == 1) {
					// email
					this.ResultMask = '#RecipientType#: "#RecipientName#" <#RecipientAddress#>';
				}
				else {
					// other
					this.ResultMask = '#RecipientType#: "#RecipientName#" <#RecipientAddress#> - #RecipientAddressType#';
				}
			}
			else {
				// name not specified
				this.ResultMask = '#RecipientType#: #RecipientAddress# - #RecipientAddressType#';
			}

			return MultiInputControl.prototype.formatLine.call(this, $record_index);
		}

		Recipients.compareRecords = function($record_a, $record_b) {
			var $equals = true;
			var $compare_fields = ['RecipientAddressType', 'RecipientAddress'];

			for (var $i = 0; $i < $compare_fields.length; $i++) {
				var $field_name = $compare_fields[$i];

				if ($record_a[$field_name] !== $record_b[$field_name]) {
					return false;
				}
			}

			return $equals;
		}

		<inp2:m_if check="m_Param" name="to_readonly" equals_to="auto">
			<inp2:$prefix_ToRecipientReadOnly result_to_var="to_readonly"/>
		</inp2:m_if>

		<inp2:m_if check="m_Param" name="to_readonly">
			Recipients.isReadOnly = function($record_index) {
				return this.Records[$record_index]['RecipientType'] == <inp2:m_GetConst name="EmailEvent::RECIPIENT_TYPE_TO"/>;
			}

			<inp2:$prefix_RestoreRecipientType/>
			Recipients.registerControl('RecipientType', {type: 'radio', required: true, options: <inp2:m_RenderElement name="inp_json_options" prefix="$prefix" field="RecipientType" strip_nl="2"/>, 'default': <inp2:m_GetConst name="EmailEvent::RECIPIENT_TYPE_CC"/>});
		<inp2:m_else/>
			Recipients.registerControl('RecipientType', {type: 'radio', required: true, options: <inp2:m_RenderElement name="inp_json_options" prefix="$prefix" field="RecipientType" strip_nl="2"/>, 'default': <inp2:$prefix_FieldOption field="RecipientType" option="default"/>});
		</inp2:m_if>

		Recipients.registerControl('RecipientAddressType', {type: 'select', required: true, options: <inp2:m_RenderElement name="inp_json_options" prefix="$prefix" field="RecipientAddressType" strip_nl="2"/>, 'default': <inp2:$prefix_FieldOption field="RecipientAddressType" option="default"/>});
		Recipients.registerControl('RecipientAddress', {type: 'textbox', required: true, 'default': '<inp2:$prefix_FieldOption field="RecipientAddress" option="default" js_escape="1"/>'});
		Recipients.registerControl('RecipientName', {type: 'textbox', required: false, 'default': '<inp2:$prefix_FieldOption field="RecipientName" option="default" js_escape="1"/>'});
		Recipients.LoadValues();
	</script>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_option_item">
	<option value="<inp2:m_param name='key'/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_option_phrase">
	<option value="<inp2:m_param name='key'/>"<inp2:m_param name="selected"/>><inp2:m_phrase label="$option"/></option>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_options" onchange="" has_empty="0" empty_value="" style="">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<select tabindex="<inp2:m_Get name='tab_index'/>" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" onchange="<inp2:m_Param name='onchange'/>" style="<inp2:m_Param name='style'/>">
				<inp2:m_if check="{$prefix}_FieldOption" field="$field" option="use_phrases">
					<inp2:{$prefix}_PredefinedOptions field="$field" block="inp_option_phrase" selected="selected" has_empty="$has_empty" empty_value="$empty_value"/>
				<inp2:m_else/>
					<inp2:{$prefix}_PredefinedOptions field="$field" block="inp_option_item" selected="selected" has_empty="$has_empty" empty_value="$empty_value"/>
				</inp2:m_if>
			</select>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_single_option">
	<option value="<inp2:m_param name='value'/>"<inp2:m_if check="{$prefix}_Selected" field="$field" value="$value"> selected</inp2:m_if>><inp2:$prefix_OptionValue field="$field" value="$value"/></option>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_multioptions" has_empty="0" empty_value="" style="">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<select multiple tabindex="<inp2:m_Get name='tab_index'/>" id="<inp2:{$prefix}_InputName field='$field'/>_select" onchange="update_multiple_options('<inp2:{$prefix}_InputName field='$field'/>');">
				<inp2:m_if check="{$prefix}_FieldOption" field="$field" option="use_phrases">
					<inp2:{$prefix}_PredefinedOptions field="$field" block="inp_option_phrase" selected="selected" has_empty="$has_empty" empty_value="$empty_value"/>
				<inp2:m_else/>
					<inp2:{$prefix}_PredefinedOptions field="$field" block="inp_option_item" selected="selected" has_empty="$has_empty" empty_value="$empty_value"/>
				</inp2:m_if>
			</select>
			<input type="hidden" id="<inp2:{$prefix}_InputName field='$field'/>" name="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field' db='db'/>"/>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_radio_item" onclick="" onchange="">
	<input type="radio" <inp2:m_param name="checked"/> name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>" tabindex="<inp2:m_Get name='tab_index'/>" onclick="<inp2:m_param name="onclick"/>" onchange="<inp2:m_param name="onchange"/>"><label for="<inp2:{$prefix}_InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_param name="option"/></label>&nbsp;
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_radio_phrase" onclick="" onchange="">
	<input type="radio" <inp2:m_param name="checked"/> name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>" tabindex="<inp2:m_Get name='tab_index'/>" onclick="<inp2:m_param name="onclick"/>" onchange="<inp2:m_param name="onchange"/>"><label for="<inp2:{$prefix}_InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_phrase label="$option"/></label>&nbsp;
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_radio" onclick="" onchange="">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<inp2:m_if check="{$prefix}_FieldOption" field="$field" option="use_phrases">
				<inp2:{$prefix}_PredefinedOptions field="$field" block="inp_radio_phrase" selected="checked" onclick="$onclick" onchange="$onchange" />
			<inp2:m_else />
				<inp2:{$prefix}_PredefinedOptions field="$field" block="inp_radio_item" selected="checked" onclick="$onclick" onchange="$onchange" />
			</inp2:m_if>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="js_option_item">
	'<inp2:m_Param name="key" js_escape="1"/>': '<inp2:m_Param name="option" js_escape="1"/>'<inp2:m_ifnot check="m_Param" name="is_last">, </inp2:m_ifnot>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="js_option_phrase">
	'<inp2:m_Param name="key" js_escape="1"/>': '<inp2:m_Phrase name="$option" js_escape="1"/>'<inp2:m_ifnot check="m_Param" name="is_last">, </inp2:m_ifnot>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_json_options">
	<inp2:m_if check="{$prefix}_FieldOption" field="$field" option="use_phrases">
		{<inp2:{$prefix}_PredefinedOptions field="$field" block="js_option_phrase" selected="selected"/>}
	<inp2:m_else />
		{<inp2:{$prefix}_PredefinedOptions field="$field" block="js_option_item" selected="selected"/>}
	</inp2:m_if>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_checkbox" field_class="" onchange="" onclick="" NamePrefix="_cb_">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<input type="hidden" id="<inp2:{$prefix}_InputName field='$field'/>" name="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field' db='db'/>">
			<input tabindex="<inp2:m_Get name='tab_index'/>" type="checkbox" id="_cb_<inp2:{$prefix}_InputName field='$field'/>" name="_cb_<inp2:{$prefix}_InputName field='$field'/>" <inp2:{$prefix}_Field field="$field" checked="checked" db="db"/> class="<inp2:m_param name='field_class'/>" onchange="update_checkbox(this, document.getElementById('<inp2:{$prefix}_InputName field='$field'/>'));<inp2:m_param name='onchange'/>" onclick="<inp2:m_param name='onclick'/>">
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_checkbox_item">
	<input type="checkbox" <inp2:m_param name='checked'/> id="<inp2:{$prefix}_InputName field='$field'/>_<inp2:m_param name='key'/>" value="<inp2:m_param name='key'/>" tabindex="<inp2:m_Get name='tab_index'/>" onclick="update_checkbox_options(/^<inp2:{$prefix}_InputName field='$field' as_preg='1'/>_([0-9A-Za-z-]+)/, '<inp2:{$prefix}_InputName field='$field'/>');"><label for="<inp2:{$prefix}_InputName field='$field'/>_<inp2:m_param name='key'/>"><inp2:m_param name="option"/></label><inp2:m_if check="m_Param" name="has_br"><br/><inp2:m_else/>&nbsp;</inp2:m_if>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_checkbox_phrase">
	<input type="checkbox" <inp2:m_param name='checked'/> id="<inp2:{$prefix}_InputName field='$field'/>_<inp2:m_param name='key'/>" value="<inp2:m_param name='key'/>" tabindex="<inp2:m_Get name='tab_index'/>" onclick="update_checkbox_options(/^<inp2:{$prefix}_InputName field='$field' as_preg='1'/>_([0-9A-Za-z-]+)/, '<inp2:{$prefix}_InputName field='$field'/>');"><label for="<inp2:{$prefix}_InputName field='$field'/>_<inp2:m_param name='key'/>"><inp2:m_phrase label="$option"/></label><inp2:m_if check="m_Param" name="has_br"><br/><inp2:m_else/>&nbsp;</inp2:m_if>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_checkboxes" no_empty="" has_br="0">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<inp2:m_if check="{$prefix}_FieldOption" field="$field" option="use_phrases">
				<inp2:{$prefix}_PredefinedOptions field="$field" no_empty="$no_empty" block="inp_checkbox_phrase" selected="checked" has_br="$has_br"/>
			<inp2:m_else/>
				<inp2:{$prefix}_PredefinedOptions field="$field" no_empty="$no_empty" block="inp_checkbox_item" selected="checked" has_br="$has_br"/>
			</inp2:m_if>
			<inp2:m_RenderElement prefix="$prefix" name="inp_edit_hidden" field="$field" db="db"/>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_single_checkbox">
	<input type="checkbox"<inp2:m_if check="{$prefix}_Selected" field="$field" value="$value"> checked</inp2:m_if> id="<inp2:{$prefix}_InputName field='$field'/>_<inp2:m_param name='value'/>" value="<inp2:m_param name='value'/>" onclick="update_checkbox_options(/^<inp2:{$prefix}_InputName field='$field' as_preg='1'/>_([0-9A-Za-z-]+)/, '<inp2:{$prefix}_InputName field='$field'/>');"><label for="<inp2:{$prefix}_InputName field='$field'/>_<inp2:m_param name='value'/>"><inp2:$prefix_OptionValue field="$field" value="$value"/></label>&nbsp;
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_checkbox_allow_html" field_class="" onchange="" onclick="" title="la_enable_html" hint_label="la_Warning_Enable_HTML">
	<inp2:m_RenderElement name="inp_edit_checkbox" pass_params="1"/>

	<!--##
	<inp2:m_if check="{$prefix}_FieldVisible" field="$field">
		<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>" id="<inp2:$prefix_InputName field='$field'/>_row">
			<td class="control-cell">
				<input type="hidden" id="<inp2:{$prefix}_InputName field='$field'/>" name="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field' db='db'/>">
				<input tabindex="<inp2:m_Get name='tab_index'/>" type="checkbox" id="_cb_<inp2:{$prefix}_InputName field='$field'/>" name="_cb_<inp2:{$prefix}_InputName field='$field'/>" <inp2:{$prefix}_Field field="$field" checked="checked" db="db"/> class="<inp2:m_param name='field_class'/>" onchange="update_checkbox(this, document.getElementById('<inp2:{$prefix}_InputName field='$field'/>'));<inp2:m_param name='onchange'/>" onclick="<inp2:m_param name='onclick'/>">
			</td>
			<inp2:m_RenderElement name="inp_edit_error" pass_params="1"/>
		</tr>
	</inp2:m_if>
	##-->
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_weight" class="" size="" maxlength="" onblur="">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="1">
				<input type="text" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field'/>" tabindex="<inp2:m_Get name='tab_index'/>" size="<inp2:m_param name='size'/>" maxlength="<inp2:m_param name='maxlength'/>" class="<inp2:m_param name='class'/>" onblur="<inp2:m_Param name='onblur'/>">
				<inp2:m_phrase label="la_kg" />
			</inp2:m_if>
			<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="2">
				<input type="text" name="<inp2:{$prefix}_InputName field='{$field}_a'/>" id="<inp2:{$prefix}_InputName field='{$field}_a'/>" value="<inp2:{$prefix}_Field field='{$field}_a'/>" tabindex="<inp2:m_Get name='tab_index'/>" size="<inp2:m_param name='size'/>" maxlength="<inp2:m_param name='maxlength'/>" class="<inp2:m_param name='class'/>" onblur="<inp2:m_Param name='onblur'/>">
				<inp2:m_phrase label="la_lbs" />
				<input type="text" name="<inp2:{$prefix}_InputName field='{$field}_b'/>" id="<inp2:{$prefix}_InputName field='{$field}_b'/>" value="<inp2:{$prefix}_Field field='{$field}_b'/>" tabindex="<inp2:m_Get name='tab_index'/>" size="<inp2:m_param name='size'/>" maxlength="<inp2:m_param name='maxlength'/>" class="<inp2:m_param name='class'/>" onblur="<inp2:m_Param name='onblur'/>">
				<inp2:m_phrase label="la_oz" />
			</inp2:m_if>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_minput" style="" format="" allow_add="1" allow_edit="1" allow_delete="1" allow_move="1" title="">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<table>
				<tr>
					<td colspan="2">
						<input type="button" class="button" style="width: 70px;" value="<inp2:m_Phrase name='la_btn_Add'/>" id="<inp2:$prefix_InputName field='$field'/>_add_button"/>
						<input type="button" class="button" style="width: 70px;" value="<inp2:m_Phrase name='la_btn_Cancel'/>" id="<inp2:$prefix_InputName field='$field'/>_cancel_button"/>
					</td>
				</tr>
				<tr>
					<td valign="top">
						<select multiple tabindex="<inp2:m_Get name='tab_index'/>" id="<inp2:$prefix_InputName field='$field'/>_minput" style="<inp2:m_Param name='style'/>">
						</select>
					</td>
					<td valign="top">
						<inp2:m_if check="m_Param" name="allow_edit">
							<input type="button" class="button" style="width: 100px;" value="<inp2:m_Phrase name='la_btn_Edit'/>" id="<inp2:$prefix_InputName field='$field'/>_edit_button"/><br />
							<img src="img/spacer.gif" height="4" width="1" alt=""/><br />
						</inp2:m_if>

						<inp2:m_if check="m_Param" name="allow_delete">
							<input type="button" class="button" style="width: 100px;" value="<inp2:m_Phrase name='la_btn_Delete'/>" id="<inp2:$prefix_InputName field='$field'/>_delete_button"/><br />
						</inp2:m_if>

						<inp2:m_if check="m_Param" name="allow_move">
							<br /><br />
							<input type="button" class="button" style="width: 100px;" value="<inp2:m_Phrase name='la_btn_MoveUp'/>" id="<inp2:$prefix_InputName field='$field'/>_moveup_button"/><br />
						<img src="img/spacer.gif" height="4" width="1" alt=""/><br />
							<input type="button" class="button" style="width: 100px;" value="<inp2:m_Phrase name='la_btn_MoveDown'/>" id="<inp2:$prefix_InputName field='$field'/>_movedown_button"/><br />
						</inp2:m_if>
					</td>
				</tr>
				<inp2:m_RenderElement name="inp_edit_hidden" prefix="$prefix" field="$field" db="db"/>
				<script type="text/javascript">
					var <inp2:m_Param name="field"/> = new MultiInputControl('<inp2:m_Param name="field"/>', '<inp2:{$prefix}_InputName field="#FIELD_NAME#"/>', fields['<inp2:m_Param name="prefix"/>'], '<inp2:m_Param name="format"/>');
					<inp2:m_Param name="field"/>.ValidateURL = '<inp2:m_Link template="dummy" pass="m,$prefix" {$prefix}_event="OnValidateMInputFields" js_escape="1"/>';
					<inp2:m_if check="m_Param" name="allow_add">
						<inp2:m_Param name="field"/>.SetPermission('add', true);
					</inp2:m_if>
					<inp2:m_if check="m_Param" name="allow_edit">
						<inp2:m_Param name="field"/>.SetPermission('edit', true);
					</inp2:m_if>
					<inp2:m_if check="m_Param" name="allow_delete">
						<inp2:m_Param name="field"/>.SetPermission('delete', true);
					</inp2:m_if>
					<inp2:m_if check="m_Param" name="allow_move">
						<inp2:m_Param name="field"/>.SetPermission('move', true);
					</inp2:m_if>
					<inp2:m_Param name="field"/>.InitEvents();

					<inp2:m_Param name="field"/>.SetMessage('required_error', '<inp2:m_Phrase name="la_err_required" escape="1"/>');
					<inp2:m_Param name="field"/>.SetMessage('unique_error', '<inp2:m_Phrase name="la_error_unique" escape="1"/>');
					<inp2:m_Param name="field"/>.SetMessage('delete_confirm', '<inp2:m_Phrase label="la_Delete_Confirm" escape="1"/>');
					<inp2:m_Param name="field"/>.SetMessage('add_button', '<inp2:m_Phrase name="la_btn_Add" escape="1"/>');
					<inp2:m_Param name="field"/>.SetMessage('save_button', '<inp2:m_Phrase name="la_btn_Save" escape="1"/>');
				</script>
			</table>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_picker" has_empty="0" empty_value="" style="width: 225px;" size="15">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<table cellpadding="0" cellspacing="0">
				<tr>
					<td><strong><inp2:m_Phrase label="la_SelectedItems" /></strong></td>
					<td>&nbsp;</td>
					<td><strong><inp2:m_Phrase label="la_AvailableItems" /></strong></td>
				</tr>
				<tr>
					<td>
						<inp2:m_DefineElement name="picker_option_block">
							<option value="<inp2:Field name='$key_field' />"><inp2:Field name="$value_field" /></option>
						</inp2:m_DefineElement>

						<select multiple id="<inp2:$prefix_InputName name='$field' />_selected" style="<inp2:m_param name='style'/>" size="<inp2:m_param name='size'/>">
							<inp2:$optprefix.selected_PrintList render_as="picker_option_block" key_field="$option_key_field" value_field="$option_value_field" per_page="-1" requery="1" link_to_prefix="$prefix" link_to_field="$field"/>
						</select>
					</td>
					<td align="center">
						<img src="img/icons/icon_left.gif" id="<inp2:$prefix_InputName name="$field" />_move_left_button"/><br />
						<img src="img/icons/icon_right.gif" id="<inp2:$prefix_InputName name="$field" />_move_right_button"/>
					</td>
					<td>
						<select multiple id="<inp2:$prefix_InputName name='$field' />_available" style="<inp2:m_param name='style'/>" size="<inp2:m_param name='size'/>">
							<inp2:$optprefix.available_PrintList render_as="picker_option_block" key_field="$option_key_field" value_field="$option_value_field" requery="1" per_page="-1" link_to_prefix="$prefix" link_to_field="$field"/>
						</select>
					</td>
				</tr>
			</table>

			<input type="hidden" name="<inp2:$prefix_InputName name='$field' />" id="<inp2:$prefix_InputName name='$field' />" value="<inp2:$prefix_Field field='$field' db='db'/>">
			<input type="hidden" name="unselected_<inp2:$prefix_InputName name='$field' />" id="<inp2:$prefix_InputName name='$field' />_available_field" value="">

			<script type="text/javascript">
				<inp2:m_Param name="field"/> = new EditPickerControl('<inp2:m_Param name="field"/>', '<inp2:$prefix_InputName name="$field" />');
				<inp2:m_Param name="field"/>.SetMessage('nothing_selected', '<inp2:m_Phrase label="la_error_SelectItemToMove" escape="1"/>');
			</script>

		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_filler" control_options="false">
	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>" style="height: auto">
		<td class="label-cell-filler" ></td>
		<td class="control-mid-filler" ></td>
		<td class="control-cell-filler">
			<input type="text" style="display: none;"/>
			<div id="form_filler" style="width: 100%; height: 5px; background-color: inherit"></div>
			<script type="text/javascript">
				Form.addControl('form_filler', <inp2:m_param name="control_options"/>);
			</script>
		</td>
	</tr>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="ajax_progress_bar">
	<table width="100%" border="0" cellspacing="0" cellpadding="2" class="tableborder">
		<tr class="<inp2:m_odd_even odd='table-color1' even='table-color2'/>">
			<td colspan="2">
				<img src="img/spacer.gif" height="10" width="1" alt="" /><br />
				<!-- progress bar paddings: begin -->
				<table width="90%" cellpadding="2" cellspacing="0" border="0" align="center">
					<tr>
						<td class="progress-text">0%</td>
						<td width="100%">
							<!-- progress bar: begin -->
							<table cellspacing="0" cellpadding="0" width="100%" border="0" align="center" style="background-color: #FFFFFF; border: 1px solid #E6E6E6;">
								<tr>
									<td colspan="3"><img src="img/spacer.gif" height="2" width="1" alt="" /></td>
								</tr>
								<tr>
									<td width="2"><img src="img/spacer.gif" height="13" width="3" alt="" /></td>
									<td align="center" width="100%">
										<table cellspacing="0" cellpadding="0" width="100%" border="0" style="background: url(img/progress_left.gif) repeat-x;">
											<tr>
												<td id="progress_bar[done]" style="background: url(img/progress_done.gif);" align="left"></td>
												<td id="progress_bar[left]" align="right"><img src="img/spacer.gif" height="9" width="1" alt="" /></td>
											</tr>
										</table>
									</td>
									<td width="1"><img src="img/spacer.gif" height="13" width="3" alt="" /></td>
								</tr>
								<tr>
									<td colspan="3"><img src="img/spacer.gif" height="2" width="1" alt="" /></td>
								</tr>
							</table>
							<!-- progress bar: end -->
						</td>
						<td class="progress-text">100%</td>
					</tr>
				</table>
				<!-- progress bar paddings: end -->
				<img src="img/spacer.gif" height="10" width="1" alt="" /><br />
			</td>
		</tr>
		<tr class="<inp2:m_odd_even odd='table-color1' even='table-color2'/>">
			<td width="50%" align="right"><inp2:m_phrase name="la_fld_PercentsCompleted"/>:</td>
			<td id="progress_display[percents_completed]">0%</td>
		</tr>
		<tr class="<inp2:m_odd_even odd='table-color1' even='table-color2'/>">
			<td align="right"><inp2:m_phrase name="la_fld_ElapsedTime"/>:</td>
			<td id="progress_display[elapsed_time]">00:00</td>
		</tr>
		<tr class="<inp2:m_odd_even odd='table-color1' even='table-color2'/>">
			<td align="right"><inp2:m_phrase name="la_fld_EstimatedTime"/>:</td>
			<td id="progress_display[Estimated_time]">00:00</td>
		</tr>
		<tr class="<inp2:m_odd_even odd='table-color1' even='table-color2'/>">
			<td align="center" colspan="2">
				<input type="button" class="button" onclick="<inp2:m_param name="cancel_action"/>" value="<inp2:m_phrase name="la_Cancel"/>" />
			</td>
		</tr>
	</table>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="edit_navigation" toolbar="a_toolbar">
	<inp2:m_if check="{$prefix}_IsTopmostPrefix">
		<inp2:m_if check="{$prefix}_IsSingle">
			<inp2:m_param name="toolbar"/>.HideButton('prev');
			<inp2:m_param name="toolbar"/>.HideButton('next');
		<inp2:m_else/>
			<inp2:m_if check="{$prefix}_IsLast">
				<inp2:m_param name="toolbar"/>.DisableButton('next');
			</inp2:m_if>
			<inp2:m_if check="{$prefix}_IsFirst">
				<inp2:m_param name="toolbar"/>.DisableButton('prev');
			</inp2:m_if>
		</inp2:m_if>
	</inp2:m_if>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="toolbar_button" icon="" title="" short_title="" toolbar="a_toolbar">
	<inp2:m_Param name="toolbar"/>.AddButton(
		new ToolBarButton(
			'<inp2:m_Param name="icon"/>',
			<inp2:m_if check="m_Param" name="short_title">
				'<inp2:m_Phrase label="$title" escape="1"/>::<inp2:m_phrase label="$short_title" escape="1"/>',
			<inp2:m_else/>
				'<inp2:m_Phrase label="$title" escape="1"/>',
			</inp2:m_if>
			function() {
				<inp2:m_Param name="content"/>
			}
		)
	);
</inp2:m_DefineElement>

<inp2:m_DefineElement name="tabs_container" tabs_render_as="">
	<table cellpadding="0" cellspacing="0" style="width: 100%;">
		<tr>
			<td style="width: 20px;">
				<img src="<inp2:m_TemplatesBase/>/img/spacer.gif" width="20" height="0" alt=""/><br/>
				<a href="#" class="scroll-left disabled"></a>
			</td>

			<td height="23" align="right">
				<div id="tab-measure" style="display: none; width: 100%; height: 23px;">&nbsp;</div>
				<div style="overflow: hidden; height: 23px;" class="tab-viewport">
					<table class="tabs" cellpadding="0" cellspacing="0" height="23">
						<tr>
							<inp2:m_RenderElement name="$tabs_render_as" pass_params="1"/>
						</tr>
					</table>
				</div>
			</td>

			<td class="scroll-right-container disabled">
				<img src="<inp2:m_TemplatesBase/>/img/spacer.gif" width="20" height="0" alt=""/><br/>
				<a href="#" class="scroll-right disabled"></a>
			</td>
		</tr>
	</table>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="edit_tabs_element">
	<inp2:m_DefineElement name="edit_tab">
		<inp2:m_RenderElement name="tab" title="$title" t="$template" main_prefix="$PrefixSpecial"/>
	</inp2:m_DefineElement>

	<inp2:{$prefix}_PrintEditTabs render_as="edit_tab" preset_name="$preset_name"/>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="edit_tabs" preset_name="Default">
	<inp2:m_if check="{$prefix}_HasEditTabs" preset_name="$preset_name">
		<inp2:m_RenderElement name="tabs_container" tabs_render_as="edit_tabs_element" pass_params="1"/>
	</inp2:m_if>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="ml_selector" prefix="">
	<inp2:m_if check="lang_IsMultiLanguage">
		<td align="right" style="padding-right: 5px;">
			<table width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td align="right">
						<inp2:m_phrase name="la_fld_Language"/>:
						<select name="language" onchange="submit_event('<inp2:m_param name='prefix'/>', 'OnPreSaveAndChangeLanguage');">
							<inp2:m_DefineElement name="lang_elem">
								<option value="<inp2:Field name='LanguageId'/>" <inp2:m_if check="SelectedLanguage" type="data">selected="selected"</inp2:m_if> ><inp2:Field name="LocalName" no_special='no_special' /></option>
							</inp2:m_DefineElement>
							<inp2:lang_PrintList render_as="lang_elem"/>
						</select>
					</td>
				</tr>
				<tr>
					<td align="right" style="vertical-align: bottom; padding: 2px 0px 5px 2px;">
						<span style="color: red">*</span>&nbsp;<span class="req-note"><inp2:m_Phrase name="la_text_RequiredFields"/></span>
					</td>
				</tr>
			</table>
		</td>
	<inp2:m_else/>
		<td align="right" style="vertical-align: bottom; padding: 2px 5px 5px 2px;">
			<span style="color: red">*</span>&nbsp;<span class="req-note"><inp2:m_Phrase name="la_text_RequiredFields"/></span>
		</td>
	</inp2:m_if>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="form_error_warning">
	<inp2:m_RenderElement design="form_message" pass_params="1">
		<inp2:m_Phrase name="la_Warning_NewFormError"/><br/>
		<span id="error_msg_<inp2:m_Param name='prefix'/>" style="font-weight: bold;"><br/></span>
    </inp2:m_RenderElement>
</inp2:m_DefineElement>
