<div class="portletBody">
	<h3>
		$tlang.getString("premes.premes")
	</h3>
<h4>$tlang.getString("premes.repto")</h4>
<h5 class="textPanelHeader">	
	#if ($starOrThread != "thread")
		$topic.getDiscussionHeader().getSubject()
	#else
		$validator.escapeHtml($currentMessage.DiscussionHeader.Category) &gt; $topic.getDiscussionHeader().getSubject() &gt; $validator.escapeHtml($currentMessage.getDiscussionHeader().getSubject())
	#end
</h5>	
	#if ($alertMessage)<div class="alertMessage">$tlang.getString("gen.alert") $validator.escapeHtml($alertMessage)</div>#end
		#set ($starOrThread = "thread")
		#set ($props = $topic.getProperties())
		#if ($!props)
			#set ($starOrThread = $props.getProperty($props.getNamePropReplyStyle()))
		#end
		#if ($starOrThread != "thread")
		<p class="textPanelFooter">
			$validator.escapeHtml($currentMessage.getDiscussionHeader().getFrom().getDisplayName()) ($currentMessage.getDiscussionHeader().getDate().toStringLocalFullZ())
		</p>	
		<div class="textPanel">$validator.limit($topic.Body, 100)</div>
		#else
		<p class="textPanelFoooter">
			$validator.escapeHtml($currentMessage.getDiscussionHeader().getFrom().getDisplayName()) ($currentMessage.getDiscussionHeader().getDate().toStringLocalFullZ())
		</p>	
		<div class="textPanel">$validator.escapeHtmlFormattedText($currentMessage.getBody())</div>
		#end
		#set ($size = 0)
		#set ($props = false)
		#foreach ($attachment in $currentMessage.Header.Attachments) 
			#set ($props = $attachment.Properties) 
			#if ($!props)
				#set ($size = $size + 1)
			#end
		#end
		#if ($size == 0)
		#else
			<ul class="attachList">
				#foreach ($attachment in $currentMessage.Header.Attachments) 
					#set ($props = false)
					#set ($props = $attachment.Properties) 
					#if ($!props)
						<li>
							#if ($props.getBooleanProperty($props.NamePropIsCollection))
								<img src = "#imageLink($contentTypeImageService.getContentTypeImage("folder"))" border="0" alt="$tlang.getString("gen.folatt")" />
							#else
								<img src = "#imageLink($contentTypeImageService.getContentTypeImage($props.getProperty($props.NamePropContentType)))" border="0" alt="$tlang.getString("gen.filatt")" />
							#end
							<a href="$attachment.Url" target="_blank">$validator.escapeHtml($props.getPropertyFormatted($props.NamePropDisplayName))</a>						
							#if (!$props.getBooleanProperty($props.NamePropIsCollection))
								($props.getPropertyFormatted($props.NamePropContentLength))
							#end
						</li>
					#end
				#end
			</ul>
		#end
		<hr class="itemSeparator" />
	<form action="#toolForm($action)" method="post">
		<input type="hidden" name="portletid" value="$portlet.ID" />
		<input type="hidden" name="topicId" value="$topic.Id" />
		<input type="hidden" name="messageId" value="$currentMessage.Id" />
		<h4>
			$tlang.getString("rep.yourrep")
		</h4>	
				#if ($currentMessage.ReplyToDepth != 0)
					#if ($starOrThread.equals("star"))
						<input type="hidden" name="replyto" value="totopic" id ="replytotopic" />
					#else
#*
						<tr>
							<td class="chefLabel">
								$tlang.getString("premes.repto")
							</td>
							<td>
								#if ($!replyto=="totopic")
									<input type="radio" name="replyto" value="totopic" id ="replytotopic" checked="checked" /><label for="replytotopic">$tlang.getString("premes.totop")</label>
									<input type="radio" name="replyto" value="tomessage" id="replytomessage" /><label for="replytomessage">$tlang.getString("premes.thimes")</label>
								#else
									<input type="radio" name="replyto" value="totopic" id ="replytotopic" /><label for="replytotopic">$tlang.getString("premes.totop")</label>
									<input type="radio" name="replyto" value="tomessage" id="replytomessage" checked="checked" /><label for="replytomessage">$tlang.getString("premes.thimes")</label>
								#end
							</td>
						</tr>
*#
					#end
				#else
					<input type="hidden" name="replyto" value="totopic" />
				#end
				<input type="hidden" name="subject" id="subject" value="$!subject" />
				<h5 class="textPanelHeader">$!subject</h5>
				<input type="hidden" name="body" id="body" value="$validator.escapeHtml("$!body")" />
				<div class="textPanel">$validator.escapeHtmlFormattedText("$!body")</div>
						#set ($size = 0)
						#set ($props = false)
						#foreach ($attachment in $attachments) 
							#set ($props = $attachment.Properties) 
							#if ($!props)
								#set ($size = $size + 1)
							#end
						#end
						#if ($size == 0)
						#else
							<ul class="attachList">
								#foreach ($attachment in $attachments) 
									#set ($props = false)
									#set ($props = $attachment.Properties) 
									#if ($!props)
										<li>
											#if ($props.getBooleanProperty($props.NamePropIsCollection))
												<img src = "#imageLink($contentTypeImageService.getContentTypeImage("folder"))" border="0" alt="$tlang.getString("gen.folatt")" />
											#else
												<img src = "#imageLink($contentTypeImageService.getContentTypeImage($props.getProperty($props.NamePropContentType)))" border="0" alt="$tlang.getString("gen.filatt")" />
											#end
											<a href="$attachment.Url" target="_blank">$validator.escapeHtml($props.getPropertyFormatted($props.NamePropDisplayName))</a>						
											#if (!$props.getBooleanProperty($props.NamePropIsCollection))
												($props.getPropertyFormatted($props.NamePropContentLength))
											#end
										</li>
									#end
								#end
							</ul>
						#end							
		<div class="act">
			<input type="submit" accesskey="s" class="active"  name="eventSubmit_doRespond" value="$tlang.getString("rep.addrep")" />
			<input type="submit" accesskey="e" name="eventSubmit_doCancel_reply_preview" value="$tlang.getString("gen.revise")" />
##			<input type="submit" name="eventSubmit_doCancel_reply_preview" value="Revise" />
			<input type="submit" accesskey="d" name="eventSubmit_doRespond_draft" value="$tlang.getString("gen.savdra")" />
			<input type="submit" accesskey="x" name="eventSubmit_doCancel_reply_preview" value="$tlang.getString("gen.can")" />
		</div>
	</form>
</div>
