<?php

/**
* @version 2.8.14
* @package Joomla 2.5
* @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,$xhtml_url;  

if(DT_Session::get('register.User.process')){
 // include(JPATH_SITE.DS.'components'.DS.'com_dtregister'.DS.'views'.DS.'user'.DS.'tmpl'.DS.'event_header.php');
  include(DTreg::get_template_path('user'.DS.'tmpl'.DS.'event_header.php'));
}else{
  ?>
  <h2><?php echo JText::_('DT_EVENT_REGISTRATION')?>: <?php echo JText::_( 'DT_PAYMENT' );?></h2>
  <?php	
}
$action = JRoute::_("index.php?option=com_dtregister&Itemid=".$Itemid,false);
?>

<form method="post" action="<?php echo $action ?>" name="frmcart" id="frmcart">

<div style="clear:both">

  <?php echo $this->form; ?>

</div>

<div class="dtnav_buttons" style="clear:both; padding: 10px 0px 0px 10px">

<input type="submit" id="billinginfo" name="billinginfo" value="Submit" />

<input type="hidden" name="option" value="com_dtregister" />

<input type="hidden" name="controller" value="payment" />

<input type="hidden" name="task" value="billinginfo" />

<input type="hidden" name="Itemid" value="<?php echo $Itemid; ?>" />

</div>

</form>

<script type="text/javascript">
  
  DTjQuery(function(){
	  
	  DTjQuery.validator.messages.required = " ";
	  DTjQuery.validator.messages.remote = " ";
	  DTjQuery(document.frmcart).validate({
			  success: function(label) {
				  label.addClass("success");
			  }
  
	  });
	  
	  DTjQuery("#billinginfo").click(function(){
			if(DTjQuery(document.frmcart).valid()){
				DTjQuery(this).attr('disabled','disabled');
				document.frmcart.submit();
			}
			  
	  });
  })
  
</script>