<script type="text/javascript">

    jQuery(document).ready(function($){
        $('table.compare tr:odd').addClass('paros');
        
        $('.event_chooser input:radio').click(function(){
            $('input:radio').parent('td').removeClass('selected');
            $('input:radio:checked').parent('td').addClass('selected');
        });
    });

</script>
<style type="text/css">

    div.registration_form_container{
        margin: 20px;
        padding: 10px;
        border: 1px solid #c4c4c4;
    }
    
    div.banner_picture{
        text-align: center;
        margin: 40px 0px;
    }
    
    td.date{
        font-size: 14px;
        font-weight: bold;
        text-align: center;
        padding: 5px 10px !important;
    }
    
    th.times{
        color: white;
        background-color: black;
        text-align: center;
    }
    
    tr.paros{
        background-color: #EDEAE8;
    }
    
    td.selected{
        background: url('/public/img/bg/jqueryui/84bc71_light_green_crossed.png') repeat scroll 50% 50% #84bc71;
    }
    
    div.error{
        color: red;
        text-align: center;
    }
    
    div.event_chooser td.full{
        background: url('/public/img/bg/jqueryui/c1bebe_light_gray_crossed.png') repeat scroll 50% 50% #c1bebe;
    }

</style>


<?
	$lap = $this->mpages->get_row(802);
	print "<h1>".$lap->page_title."</h1>";
	print $lap->page_body;
	$hetnapok = array("Sunday", "Monday", "Tuesday");
?>


<?if($esemenyek):?>
<?=form_open('presentation/kbb', array('id' => 'registration_form'))?>
<?=form_hidden('do', 'OK')?>
<div class="event_chooser" style="margin: 20px 0px;">
	
	<table cellpadding="5" cellspacing="0" border="1" align="center" class="compare">
	<tr class="head">
        <th>&nbsp;</th>
	<?for($i=21;$i<=21;$i++):?>
		<th class="times"><?=$i?> May 2013, <?=$hetnapok[($i-19)]?></th>
	<?endfor;?>
	</tr>
	
	<?$kezdotime = 1369087200;?>
	<?foreach($times as $time):?>
	<tr>
		<td class="date"><?=$esemenyek[1369087200][$time]->name."<br />".$time?></td>
		<?//print_r($esemenyek);?>
		
		
		<?if( time() > $kezdotime+(0*60*60*24) || !isset($esemenyek[$kezdotime+(0*60*60*24)][$time])):?>
		<td class="full">&nbsp;</td>
        <?elseif($esemenyek[$kezdotime+(0*60*60*24)][$time]->able_to_reg):?>
		<td align="center"<?if(!$esemenyek[$kezdotime+(0*60*60*24)][$time]->able_to_reg):?> class="full"<?endif;?>>
            <input type="radio" name="construma2012" value="<?=$esemenyek[$kezdotime+(0*60*60*24)][$time]->event_id?>" />
			
        <?else:?>
			<td align="center"<?if(!$esemenyek[$kezdotime+(0*60*60*24)][$time]->able_to_reg):?> class="full"<?endif;?>>
            Full
        <?endif;?>
        </td>
		
	</tr>
	<?endforeach;?>
	</table>
	<br /><br />
	
	
	<br /><br />
	
</div>
<?if($error):?>
<div class="error"><?=$error?></div>
<?endif;?>
<div class="registration_form_container">
    <table cellpadding="10" cellspacing="0" align="center">
		<tr>
			<td width="75"><strong><?=lang('events_form_name')?>:</strong></td>
			<td><?=form_input('nev',$this->input->post('nev'))?></td>
		</tr>
		<tr>
			<td width="75">Company:</td>
			<td><?=form_input('cegnev',$this->input->post('cegnev'))?></td>
		</tr>
		<tr>
			<td width="75"><?=lang('events_form_city')?>:</td>
			<td><?=form_input('varos',$this->input->post('varos'))?></td>
		</tr>
		<tr>
			<td width="75"><?=lang('events_form_zip')?>:</td>
			<td><?=form_input('irsz',$this->input->post('irsz'))?></td>
		</tr>
		<tr>
			<td width="75"><?=lang('events_form_address')?>:</td>
			<td><?=form_input('cim',$this->input->post('cim'))?></td>
		</tr>
		<tr>
			<td width="75"><strong><?=lang('events_form_phone')?>:</strong></td>
			<td><?=form_input('tel',$this->input->post('tel'))?></td>
		</tr>
		<tr>
			<td width="75"><strong>E-mail:</strong></td>
			<td><?=form_input('email',$this->input->post('email'))?></td>
		</tr>
		<tr>
			<td width="75"><?=lang('events_form_comment')?>:</td>
			<td><?=form_input('comment',$this->input->post('comment'))?></td>
		</tr>
		<tr>
			<td align="center" colspan="2"><?=form_button(array('type' => 'submit', 'id' => 'mehet', 'name' => 'mehet', 'content'=> 'Register'))?></td>
		</tr>
	</table>
</div>
<?=form_close()?>
<?endif;?>