	<!-- central part -->
<script language="JavaScript" type="text/javascript">
    var TEMPLATE_PATH = "{$site_root}{$template_root}";
    var GB_IMG_DIR = "{$site_root}{$template_root}/greybox/";
    var SERVER = "{$server}";
    var SITE_ROOT = "{$site_root}";
	var SEO_SITE_ROOT = "{$seo_site_root}";
</script>
<div>
	<h2>
		{if !$edit}
			{$lang.add_to_hotlist.top_header}
		{else}
			{$lang.add_to_hotlist.top_header_edit}
		{/if}
	</h2>

	<p>
		{if !$edit}
			{$lang.add_to_hotlist.top_text}
		{else}
			{$lang.add_to_hotlist.top_text_edit}
		{/if}
	</p>

	<div id="err" {if $form.err} style="display:block;" {else} style="display:none;" {/if}>
		<font class="error_msg">*&nbsp;{$form.err}</font><br>&nbsp;
	</div>

	<div class="hotlist">
		<form action="{$form.action}" method="get" name="hotlist" style="margin:0px">
		{$form.hidden}
				{section name=s loop=$types}
				<p>
					<input type="radio" name="type" value="{$types[s].type}" {if $type==$types[s].type}checked{/if}>&nbsp;
					{$types[s].name}
				</p>
				{/section}
				<p>
					<input type="radio" name="type" value="0" {if !edit || !$type}checked{/if}>&nbsp;
					{$lang.add_to_hotlist.not_indicate}
				</p>
				<p>				
					<input type="button" class="button" onclick="javascript: Hotlist(); $('#mask').hide(); $('.window').hide();" value="{if !$edit}{$lang.button.add}{else}{$lang.button.save}{/if}">
					<input type="button" class="button" onclick="javascript: parent.location.reload(); $('#mask').hide(); $('.window').hide();" value="{$lang.button.close}">
					{if !$edit}<input type="button" class="button" onclick="javascript: parent.location.href=SEO_SITE_ROOT+'/{$seo.hotlist}';" value="{$lang.top_menu.my_hotlist}">{/if}
				</p>
		</form>
	</div>
</div>
  	{literal}
	<script type="text/javascript">
	function Hotlist() {
		sel = $("#sel").val();
		file = $("#file").val();
		id_user = $("#id_user").val();
		type = $('input:radio[name=type]:checked').val();
        $(".error_msg").html('');
		if (type)
		$.post(file,{ sel:sel,id:id_user,type:type,ajax:1{/literal}{if $edit},'edit':'1'{/if}{literal} },
			function(data) {
				$("#err").css("display","block"),
				$(".error_msg").html('*&nbsp;'+data);
                parent.location.reload();
			}
		);        
	}
	</script>
	{/literal}