<?php

/**
* @version 2.8.10
* @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;
$eventId = JRequest::getVar('eventId',0);

include(DTreg::get_template_path('event'.DS.'tmpl'.DS.'event_header.php'));
?>

<form name="frmcart" method="post">

  <div id="dttype_choice" style="text-align:center; width:600px; margin-left:auto; margin-right:auto">
	
	<div style="clear:both"><strong><?php echo JText::_( 'SELECT_OPTION' );?> </strong><br /></div>
	
	<div style="float:left">
		   
               <a href="<?php echo JRoute::_('index.php?option=com_dtregister&Itemid='.$Itemid.'&eventId='.$eventId.'&controller=event&task=individualRegister',$xhtml_url ); ?>"> <img src="<?php echo  JURI::root(true);?>/components/com_dtregister/assets/images/individual.jpg" alt="" vspace="5" border="0" width="120" height="100" /></a>

               <br /><input name="rtype" type="radio" value="individualRegister" />

			     	<?php echo JText::_( 'INDIVIDUAL_REGISTRATION' );?>

    </div>

    <div style="float:right">
               
               <a href="<?php echo JRoute::_('index.php?option=com_dtregister&Itemid='.$Itemid.'&eventId='.$eventId.'&controller=event&task=groupNum',$xhtml_url ) ?>" > <img src="<?php echo JURI::root(true);?>/components/com_dtregister/assets/images/group.jpg" alt="" vspace="5" border="0" width="120" height="100" /></a>

               <br /><input name="rtype" type="radio" value="groupNum" /><input type="hidden" name="eventId" value="<?php echo $eventId?>" />

	          	<?php echo JText::_( 'GROUP_REGISTRATION' );?>

    </div>

	<div style="clear:both; margin:10px 0 0 0"><input type="button" name="send" value="<?php echo JText::_( 'DT_NEXT_BUTTON' ); ?>" class="button" onclick="validateit();" /></div>
		
   </div>

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

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

</form>
      <script type="text/javascript">
           //<![CDATA[
			function validateit()

			{

				if(document.frmcart.rtype[0].checked==false && document.frmcart.rtype[1].checked==false){

					alert ("Please Select any type first");

					document.frmcart.rtype[0].focus();

			    	return;

			    }

				if(document.frmcart.rtype[0].checked){
                      
					window.location ="<?php echo  JRoute::_('index.php?option=com_dtregister&Itemid='.$Itemid.'&eventId='.$eventId.'&controller=event&task=individualRegister',false ) ; ?>";

				} else if(document.frmcart.rtype[1].checked){

			    	window.location ="<?php echo  JRoute::_('index.php?option=com_dtregister&Itemid='.$Itemid.'&eventId='.$eventId.'&controller=event&task=groupNum',false ) ?>";

				} else {

					return;

				}

			}
           //]]>
		</script>
