<?php

/**
* @version 2.7.7
* @package Joomla 1.6
* @subpackage DT Register
* @copyright Copyright (C) 2006 DTH Development
* @copyright contact dthdev@dthdevelopment.com
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/

global $Itemid,$print_option;
$document =& JFactory::getDocument();
$document->addScript( JURI::root(true)."/components/com_dtregister/assets/js/dt_jquery.js");
$document->addScript( JURI::root(true)."/components/com_dtregister/assets/js/print.js");
if($print_option) {
  echo '<button id="simplePrint">'.JText::_('DT_PRINT').'</button>' ;
}
echo '<div id="dt_message">';

$first_row =  true;

if($this->messages){
  
   foreach($this->messages as $message){
	   if(!$first_row) {
	   		echo "<br />";
	   } 
	   echo "<div id='dtthanks'>".$message."</div>";
	   
	   $first_row = false;
   }	
}
$continue = JRoute::_('index.php?option=com_dtregister&controller=event&cart=continue&Itemid='.$Itemid);

echo "</div>";

?>
<script>
  DTjQuery(function(){
     
     DTjQuery("#simplePrint").click(function() {
       DTjQuery("#dt_message").printElement({printMode:'popup'});
     }); 
     


 })
</script>