<script type="text/javascript">
jQuery(document).ready(function($){
	
	/*$('input[name=event_id]').click(function(){
		if( $(this).val()=="personal" )
			$('#trtema').removeClass("rejtettelem");
		else
			$('#trtema').addClass("rejtettelem");
	});*/
	$('input[name=al_javaslat]').click(function(){
		if( this.checked==true )
			$('#trtema').removeClass("rejtettelem");
		else
			$('#trtema').addClass("rejtettelem");
	});
	
	$('#mehet').click(function(){
		var error = "";
		
		if( $('#nev').val() == "" ){
			error += "Nincs név";
			$('#nev').css({ 'background-color': '#FFAA44' });
		}else
			$('#nev').css({ 'background-color': '' });
		
		if( $('#tel').val() == "" ){
			error += "Nincs telefon";
			$('#tel').css({ 'background-color': '#FFAA44' });
		}else
			$('#tel').css({ 'background-color': '' });
		
		if( $('#email').val() == "" ){
			error += "Nincs email";
			$('#email').css({ 'background-color': '#FFAA44' });
		}else{
			$('#email').css({ 'background-color': '' });
		}
		
		if( !$('#feltetel').is(':checked') ){
			error += "<?=lang('event_elkellfog')?>";
			$('#feltetelspan').css({ 'background-color': '#FFAA44' });
		}else
			$('#feltetelspan').css({ 'background-color': '' });
		
		
		var esemeny = $('input:radio[name=event_id]:checked').val();
		if( typeof esemeny == 'undefined' ){
			error += "Válasszon ki egy időpontot";
			<?if(hun()):?>alert("Válasszon ki egy időpontot");<?else:?>alert("Choose time");<?endif;?>
		}
		
		
		if(error == "")
			$('#registration_form').submit();
		
		return false;
	});
	
	/*mrgtop = $('#alkl-bal').height() - 63; //$(this).height();
	$('#klubimg').css('top',mrgtop+'px');
	
	$(window).bind("resize", function(){
		mrgtop = $('#alkl-bal').height() - 63;
		$('#klubimg').css('top',mrgtop+'px');
	});*/
});
</script>

<div id="alkl-bal" style="width: 705px; float: left; margin-left: -5px;">
<div class="alkl-top"></div>
<div class="alkl-repeat">
<h1 style="border-bottom: 0px;"><?=$page->page_title?></h1>
</div>
<div class="alkl-bottom"></div>

<div class="alkl-top"></div>
<div class="alkl-repeat">
<?=$page->page_body?>
</div>
<div class="alkl-bottom"></div>


<div class="alkl-top"></div>
<?
$xx = $this->phpsession->get('wshiba');
unset($_SESSION['default']['wshiba']);
?>
<div id="regdiv" class="alkl-repeat">
	<?if($xx!==""):?><div style="color: #f00; text-align: center;"><?=$xx?></div><?endif;?>
	<?=form_open('events/regisztracio', array('id' => 'registration_form'))?>
	<?=form_hidden('do', 'OK')?>
	<?=form_hidden('event_main_id', $eventid)?>
	<div class="event_chooser_list" style="margin: auto; width: 620px;">
		<ul>
			<?if( count($dates) > 0 ):?>
			<?foreach($dates as $date):?>
			<?if($date->times->able_to_reg):?>
			<?/* Ha még van szabad hely */?>
			<li>
				<input type="radio" name="event_id" id="eventid<?=$date->event_id?>" value="<?=$date->event_id?>" />
				<label for="eventid<?=$date->event_id?>">
				<?=$this->dateclass->getDateString($date->start_ts)?> <?=date('H:i',$date->start_ts)?> - <?=date('H:i',$date->end_ts)?>
				<?if($temak[$date->location]):?>
					<a href="<?=$this->uri->segment(1)?>/<?=$date->location?>"><?=str_replace("ARCHLine Klub: ","",$date->name)?></a>
				<?else:?>
					<?=str_replace("ARCHLine Klub: ","",$date->name)?>
				<?endif;?>
				</label>
			</li>
			<?/*Ha betelt akkor várólistás jelentkezés*/?>
			<?elseif(hun()):?>
			<li>
				<input type="radio" name="event_id" id="vl_eventid<?=$date->event_id?>" value="vl_<?=$date->event_id?>" />
				<label for="vl_eventid<?=$date->event_id?>">
				<?=$this->dateclass->getDateString($date->start_ts)?> <?=date('H:i',$date->start_ts)?> - <?=date('H:i',$date->end_ts)?> 
				<?if($temak[$date->location]):?>
					<a href="archline-klub/<?=$date->location?>"><?=str_replace("ARCHLine Klub: ","",$date->name)?></a>
				<?else:?>
					<?=str_replace("ARCHLine Klub: ","",$date->name)?>
				<?endif;?>
				<b><span style="color: #C00;"><u>betelt</u></span>, Várólistára jelentkezem</b>
				</label>
			</li>
			<?endif;?>
			
			<?endforeach;?>
			<?endif;?>
			<?/*<li>
				<input type="radio" name="event_id" id="idopkeres" value="personal" />
				<label for="idopkeres"><?=lang('al-klub-javujtem')?></label>
			</li>
			<li>
				<input type="radio" name="event_id" id="eloado" value="eloado" />
				<label for="eloado"><?=lang('al-klub-eloadojel')?></label> <span style="color: #00f;" title="<?=lang('al-klub-eloadoleiras')?>">(i)</span>
			</li>*/?>
			<li>
				<input type="checkbox" name="al_javaslat" id="al_javaslat" />
				<label for="al_javaslat"><?=lang('al-klub-javujtem')?></label>
			</li>
			<li>
				<input type="checkbox" name="al_eloado" id="al_eloado" />
				<label for="al_eloado"><?=lang('al-klub-eloadojel')?></label> <span style="color: #00f;" title="<?=lang('al-klub-eloadoleiras')?>">(i)</span>
			</li>
		</ul>
	</div>
	
	<table cellpadding="5" cellspacing="0" align="center" width="450px">
		<tr>
			<td><strong><?=lang('events_form_name')?>:</strong></td>
			<td><input type="text" name="strName1" id="nev" value="<?=$this->input->post('strName1')?>" /></td>
		</tr>
		<tr>
			<td><strong><?=lang('events_form_phone')?>:</strong></td>
			<td><input type="text" name="strTel" id="tel" value="<?=$this->input->post('strTel')?>" /></td>
		</tr>
		<tr>
			<td nowrap="nowrap"><strong><?=lang('events_form_email')?>:</strong></td>
			<td><input type="text" name="strEMail" id="email" value="<?=$this->input->post('strEMail')?>" /></td>
		</tr>
		<tr class="rejtettelem" id="trtema">
			<td><?=lang('al-klub-javtema')?>:</td>
			<td><input type="text" name="ujtema" value="<?=$this->input->post('ujtema')?>" /></td>
		</tr>
		<tr>
			<td><?=lang('events_form_comment')?>:</td>
			<td><input type="text" name="comment" value="<?=$this->input->post('comment')?>" /></td>
		</tr>
		<tr class="rejtettelem">
			<td>Link:</td>
			<td><input type="text" name="url" value="" /></td>
		</tr>
		<tr>
			<td colspan="2" style="text-align: center;">
				<span id="feltetelspan">
				<input type="checkbox" name="feltetel" id="feltetel" />
				<label for="feltetel"><?=lang('al-klub-feltelfogad')?>*</label>
				</span>
			</td>
		</tr>
		<tr>
			<td align="center" colspan="4"><button name="mehet" type="submit" id="mehet" ><?=lang('events_form_sub_reg')?></button>
</td>
		</tr>
	</table>
	<?=form_close()?>
<p>* <?//=lang('al-klub-feltleiras')?><?=$conditions->page_body?></p>
</div> <?/* END regdiv */?>
<div class="alkl-bottom"></div>

</div>


<div id="alkl-jobb" style="width: 252px; float: right; margin-right: -20px;">

<?foreach($klubtemak as $tema):?>
<div class="ws-cim-top"></div>
<div class="keret">
<div class="tema" style="margin-top: 0px;"><a href="/<?=$this->uri->segment(1)?>/<?=$tema->url?>" class="tema"><?=$tema->menu_cim?></a></div>
</div>
<div class="ws-cim-bottom"></div>
<?endforeach;?>

<img src="/public/img/al_klub_box_pic.png" id="klubimg" alt="archline klub" <?if(count($klubtemak)>4):?> style="margin: 0;"<?else:?> style="margin: 30px 0 0 0;"<?endif;?> />

</div>