<div class="portletBody">
	<h3>
		##$tlang.getString("rep.resto") "$validator.escapeHtml($currentMessage.getDiscussionHeader().getSubject())" $tlang.getString("rep.by") $validator.escapeHtml($currentMessage.getDiscussionHeader().getFrom().getDisplayName()) ($currentMessage.getDiscussionHeader().getDate().toStringLocalFullZ())
		$tlang.getString("rep.newrep")
	</h3>
	#if ($alertMessage)
		<div class="alertMessage">$tlang.getString("gen.alert") $validator.escapeHtml($alertMessage)</div>
		<div class="clear"></div>
	#end
	#set ($starOrThread = "thread")
	#set ($props = $topic.getProperties())
	#if ($!props)
		#set ($starOrThread = $props.getProperty($props.getNamePropReplyStyle()))
	#end
	<h4 class="textPanelHeader">
		$tlang.getString("premes.inrepto") $!replyPath
	</h4>
	<p class="textPanelFooter">
		$validator.escapeHtml($currentMessage.getDiscussionHeader().getFrom().getDisplayName()) ($currentMessage.getDiscussionHeader().getDate().toStringLocalFullZ())
	</p>
	<div class="textPanel">
		$validator.escapeHtmlFormattedText($currentMessage.getBody())
	</div>
			#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" />
	<script type="text/javascript">
		focus_path = [ "subject" ];
		if (parent) if (parent.parent) parent.parent.window.scrollTo(0,400);
	</script>
		<p class="instruction indnt0">$tlang.getString("rep.reqite")</p>
	<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" />
			#if ($currentMessage.ReplyToDepth != 0)
				#if ($starOrThread.equals("star"))
					<input type="hidden" name="replyto" value="totopic" id ="replytotopic" />
					#*					
				#else
					<tr>
						<td class="chefLabel">
					$tlang.getString("gen.repto")
						</td>
						<td></td>
						<td>
							#if ($!replyto=="totopic")
								<input type="radio" name="replyto" value="totopic" id ="replytotopic" checked="checked" /><label for="replytotopic">$tlang.getString("rep.top")</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("rep.top")</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
			<h4>$tlang.getString("rep.yourrep")</h4>
			<p class="shorttext">
				<span class="reqStar">*</span>
				<label for="shorttext">
					$tlang.getString("rep.subtit")
				</label>	
				<input type="text" name="subject" id="subject" value="$!subject" 
							onkeydown="if ((event.which && event.which == 13) || (event.keyCode && event.keyCode == 13)){return false}"
				/>
			</p>
			<p class="labelindnt">
				$realDate.toStringLocalFullZ()
			</p>

			<div class="longtext">
				<label for="bodyx" class="block">
					 $tlang.getString("gen.mes2")
				</label>
				<table border="0" summary="layout"><tr><td>
				<textarea name = "body" id = "body" cols="80" rows="30" wrap="virtual">$validator.escapeHtmlFormattedTextarea("$!body")</textarea>
				#chef_setupformattedtextarea("body")
				</td></tr></table>
			</div>	
				<h4>$tlang.getString("gen.att")</h4>

			#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)
				<p class="instruction indnt1">$tlang.getString("gen.noatt")</p>
			<div class="act">
				<input type="submit" name="eventSubmit_doAttachments" value="$tlang.getString("gen.addatt")" />
			</div>
			#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>
				<div class="act">
					<input type="submit" name="eventSubmit_doAttachments" value="$tlang.getString("gen.addrem")" />
				</div>
			#end							
		
		<div class="act">
			<input type="submit" accesskey="s" class="active" name="eventSubmit_doRespond" value="$tlang.getString("rep.addrep")" />
			<input type="submit" accesskey="v" name="eventSubmit_doPreview" value="$tlang.getString("gen.pre")" />
			<input type="submit" accesskey="d" name="eventSubmit_doRespond_draft" value="$tlang.getString("gen.savdra")" />
			<input type="submit" accesskey="x" name="eventSubmit_doCancel_reply" value="$tlang.getString("gen.can")" />
		</div>
	</form>
</div>

