<script type="text/javascript">
<!--
var ipb_lang_tt_prompt = "{$this->ipsclass->lang['tt_prompt']}";
var ipb_lang_js_del_1  = "{$this->ipsclass->lang['js_del_1']}";
var ipb_lang_js_del_2  = "{$this->ipsclass->lang['js_del_2']}";
var addquotebutton     = "{$this->ipsclass->vars['img_url']}/p_mq_add.gif";
var removequotebutton  = "{$this->ipsclass->vars['img_url']}/p_mq_remove.gif";
var unselectedbutton = "{$this->ipsclass->vars['img_url']}/topic_unselected.gif";
var selectedbutton   = "{$this->ipsclass->vars['img_url']}/topic_selected.gif";
var lang_gobutton    = "{$this->ipsclass->lang['f_go']}";
var lang_suredelete  = "{$this->ipsclass->lang['cp_js_delete']}";
var js_error_no_permission = "{$this->ipsclass->lang['js_error_no_permission']}";
var js_no_empty_post = "{$this->ipsclass->lang['js_no_empty_post']}";
//-->
</script>
<script type="text/javascript" src="jscripts/ipb_topic.js"></script>
<script type="text/javascript" src="jscripts/ips_text_editor_lite.js"></script>
<script type='text/javascript'>
//<![CDATA[
topic_rate = new topic_rate();
//]]>
</script>
<a name="top"></a>
<!--IBF.FORUM_RULES-->
<if="$threaded == 0">
<table class='ipbtable' cellspacing="0">
	<tr>
		<td style='padding-left:0px' width="40%" valign="middle" nowrap="nowrap"><div>{$data['TOPIC']['SHOW_PAGES']}&nbsp;{$data['TOPIC']['go_new']}</div></td>
		<td class='nopad' style='padding:0px 0px 5px 0px' align="right" width="60%" valign="middle"><!--IBF.TOPIC_REPLY--><a href="{$this->ipsclass->base_url}act=post&amp;do=new_post&amp;f={$data['FORUM']['id']}" title="{$this->ipsclass->lang['start_new_topic']}"><{A_POST}></a></td>
	</tr>
</table>
</if>
<div class="borderwrap">
	<div class="maintitle">
	<!-- TABLE FIX FOR MOZILLA WRAPPING-->
	<table width='100%' style='padding:0px' cellspacing='0' cellpadding='0'>
	<tr>
	 <td width='99%' style='word-wrap:break-word;'><div><b>{$data['TOPIC']['title']}</b>{$data['TOPIC']['description']}</div></td>
	 
	 <td width='1%' align='right' nowrap='nowrap'>
		
		<if="$data['TOPIC']['_allow_rate'] != 0">
			<div class='popmenubutton' id='topic-rating'>
				<a href='#topicrating'>{$this->ipsclass->lang['topic_rating']}</a>
				{$data['TOPIC']['_rate_img']} <img src='{$this->ipsclass->vars['img_url']}/menu_action_down.gif' alt='V' title='{$this->ipsclass->lang['global_open_menu']}' border='0' />
			</div>&nbsp;
		<else />
			<if="$data['TOPIC']['_rate_show'] == 1 AND $data['TOPIC']['_rate_img'] != ''">
				<div class='popmenubutton' id='topic-rating'>
					{$this->ipsclass->lang['topic_rating']} {$data['TOPIC']['_rate_img']} <img src='{$this->ipsclass->vars['img_url']}/menu_action_down.gif' alt='V' title='{$this->ipsclass->lang['global_open_menu']}' border='0' />
				</div>&nbsp;
			</if>
		</if>
		<if="$data['TOPIC']['_allow_rate'] != 0">
			<div id='topic-rating_menu' class='popupmenu-new' style='display:none;width:140px'>
				<div class='popupmenu-item'>
					<div id='topic-rating-wrapper'></div>
				</div>
				<div class='popupmenu-item'>
					{$this->ipsclass->lang['you_have_rated_x']} <span id='topic-rating-my-rating'>{$data['TOPIC']['_rating_value']}</span>
				</div>
				<div class='popupmenu-item-last'>
					{$this->ipsclass->lang['total_ratings']} <span id='topic-rating-hits'>{$data['TOPIC']['topic_rating_hits']}</span>
				</div>
			</div>
			<script type='text/javascript'>
				ipsmenu.register( "topic-rating" );
			</script>
		</if>
     </td>
	 <td width='1%' align='right' nowrap='nowrap'>
	    <div class='popmenubutton' id='topicmenu-options'><a href='#topicoptions'>{$this->ipsclass->lang['topic_options']}</a> <img src='{$this->ipsclass->vars['img_url']}/menu_action_down.gif' alt='V' title='{$this->ipsclass->lang['global_open_menu']}' border='0' /></div>
	 </td>
	</tr>
  </table>
	 
 </div>
 <!--{IBF.POLL}-->
<script type="text/javascript">
<!--
menu_build_menu(
"topicmenu-options",
new Array(   img_item + " <a href='{$this->ipsclass->base_url}act=usercp&amp;CODE=start_subs&amp;method=topic&amp;tid={$data['TOPIC']['tid']}'>{$this->ipsclass->lang['track_topic']}</a>",
 			 img_item + " <a href='{$this->ipsclass->base_url}act=Forward&amp;f={$data['FORUM']['id']}&amp;t={$data['TOPIC']['tid']}'>{$this->ipsclass->lang['forward']}</a>",
 			 img_item + " <a href='{$this->ipsclass->base_url}act=Print&amp;client=printer&amp;f={$data['FORUM']['id']}&amp;t={$data['TOPIC']['tid']}'>{$this->ipsclass->lang['print']}</a>",
             img_item + " <a href='{$this->ipsclass->base_url}act=Print&amp;client=choose&amp;f={$data['FORUM']['id']}&amp;t={$data['TOPIC']['tid']}'>{$this->ipsclass->lang['av_title']}</a>",
 			 img_item + " <a href='{$this->ipsclass->base_url}act=usercp&amp;CODE=start_subs&amp;method=forum&amp;fid={$data['FORUM']['id']}'>{$this->ipsclass->lang['ft_title']}</a>",
 			 "~~NODIV~~<div class='popupmenu-category' align='center'>{$this->ipsclass->lang['dd_display_modes']}</div>",
 			 img_item + " {$data['TOPIC']['to_button_threaded']}",
 			 img_item + " {$data['TOPIC']['to_button_standard']}",
 			 img_item + " {$data['TOPIC']['to_button_linearpl']}"
	    ) );
topic_rate.settings['allow_rating']       = parseInt("{$data['TOPIC']['_allow_rate']}");
topic_rate.settings['default_rating']     = parseInt("{$data['TOPIC']['_rate_int']}");
topic_rate.settings['img_base_url']       = ipb_var_image_url + '/folder_topic_view';
topic_rate.settings['div_rating_wrapper'] = 'topic-rating-wrapper';
topic_rate.settings['text_rating_image']  = 'topic-rating-img-';
topic_rate.languages['img_alt_rate']      = "{$this->ipsclass->lang['js_img_alt_rate']}";
topic_rate.languages['rate_me']           = "{$this->ipsclass->lang['js_rate_me']}";
topic_rate.init_rating_images();
-->
</script>