}
}
print $t_order->htmlFormElement('order_id');
print caHTMLHiddenInput('transaction_id', array('value' => $t_transaction->getPrimaryKey()));
print "</div><!-- end caClientOrderCommunicationFormBg -->";
print caFormSubmitButton($this->request, __CA_NAV_BUTTON_SAVE__, _t("Send"), 'caClientCommunicationsReplyForm');
if (sizeof($va_messages)) {
    ?>
		<a href="#" class="button" onclick="jQuery('#caClientOrderCommunicationForm').slideUp(); jQuery('#caClientOrdersComposeButton').show(); return false;" style="float:right;"><?php 
    print _t("Cancel");
    ?>
 &rsaquo;</a>
<?php 
}
?>
		</form></div><!-- end caClientOrderCommunicationForm -->
	
<?php 
if (is_array($va_messages) && sizeof($va_messages)) {
    print "<H2>" . sizeof($va_messages) . " " . (sizeof($va_messages) == 1 ? _t("Message") : _t("Messages")) . "</H2>";
    // Print existing messages
    foreach (array_reverse($va_messages) as $vn_i => $va_message) {
        print "<div style='border-bottom:1px solid #333333; padding-bottom:10px; margin-bottom: 10px;'>" . caClientServicesFormatMessage($this->request, $va_message) . "</div>";
    }
}
?>
	<div class="editorBottomPadding"><!-- empty --></div>
<?php 
//	print $vs_control_box;
?>
<div class="editorBottomPadding"><!-- empty --></div>
 * WITHOUT ANY WARRANTIES whatsoever, including any implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
 *
 * This source code is free and modifiable under the terms of 
 * GNU General Public License. (http://www.gnu.org/copyleft/gpl.html). See
 * the "license.txt" file for details, or visit the CollectiveAccess web site at
 * http://www.CollectiveAccess.org
 *
 * ----------------------------------------------------------------------
 */
$t_message = $this->getVar('message');
$va_snapshot = $t_message->get('set_snapshot');
?>
 	<div id="caClientCommunicationsMessage">
 <?php 
print caClientServicesFormatMessage($this->request, $va_data = $t_message->getFieldValuesArray(), array('replyButton' => "<a href='#' class='caClientCommunicationsMessageReplyButton' onclick='jQuery(\"#caClientCommunicationsMessageDisplay\").load(\"" . caNavUrl($this->request, 'client', 'Communications', 'Reply', array('transaction_id' => $va_data['transaction_id'], 'communication_id' => $va_data['communication_id'])) . "\");'>" . _t("Reply") . "</a>"));
if (is_array($va_snapshot) && is_array($va_snapshot['items']) && sizeof($va_snapshot['items'])) {
    $va_ids = array();
    foreach ($va_snapshot['items'] as $vn_id => $vn_dummy) {
        $va_ids[] = (int) $vn_id;
    }
    $t_object = new ca_objects();
    $qr_res = $t_object->makeSearchResult('ca_objects', $va_ids);
    ?>
	<div class="caClientCommunicationsAttachedMediaContainer">
<?php 
    if ($vn_communication_id = $t_message->get('communication_id')) {
        print "<div>" . caNavLink($this->request, _t('Create new order with attached media'), 'caClientCommunicationsNewOrderButton', 'client', 'OrderEditor', 'CreateNewOrderFromCommunication', array('communication_id' => $vn_communication_id)) . "</div>";
    }
    ?>
		<a href="#" onclick="showHideCommunicationAttachedMedia(); return false;" id="caClientCommunicationsAttachedMediaControl" class="caClientCommunicationsAttachedMediaControl"><?php