<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
	<script type="text/javascript" src="/public/js/jquery.js"></script>
	<script type="text/javascript" src="/public/js/jquery_ui.js"></script>
	<link href="/public/css/jquery.ui.css" rel="stylesheet" type="text/css" />
	<style type="text/css">
	.gomb{
		width: 177px;
		height: 40px;
		padding-bottom: 1px;
		font-size: 1.1em;
		border: 0px;
		float: right;
		margin-top: 10px;
		margin-bottom: -15px;
	}
	textarea{ overflow: auto; }
	</style>
	
	<script type="text/javascript">
	jQuery(document).ready(function($){
		var ellenorizve = false;
		
		$('#crashform').submit(function(){
			//alert("submit volt");
			
			var error = "";
			var email = $('#email');
			
			if(email.val() == ''){
				error = "Missing e-mail address!\n";
			}
			
			
			//	alert(error);
			
			if(ellenorizve){
				//$('#crashform').submit();
			}
			else if(error!=""){
				ellenorizve = true;
				$('#dialog').dialog('open');
				return false;
			}
			/*else
				$('#crashform').submit();*/
			
		});
		
		$('#dialog').dialog({
			 autoOpen: false,
			 modal: true,
			 width: 650,
			 buttons: {
				 '<?if(hun()):?>Megerősít<?else:?>Confirm<?endif;?>': function(){
					myconfirm();
					$('#dialog').dialog('close');
				}
			}
		});
		
		function myconfirm(){
			ellenorizve = true;
			$('#email').val($('#email2').val());
			$('#crashform').submit();
		}
		
	});
	</script>
	
</head>
<body>
<div style="width: 694px; font-family: Arial,Helvetica,sans-serif; font-size: 16px;">
<div style="background: url('/public/img/bg/crash/box_main_top.png') no-repeat; width: 100%; height: 14px;"></div>
<div style="background: url('/public/img/bg/crash/box_main_repeat.png') repeat-y; width: 644px; padding: 0 30px 0 20px;">
	<h1 style="margin: 0px;"><?=lang('crash_cim')?></h1>
	<p style="margin-bottom: 0px;"><?=lang('crash_desc1')?>
	<?if($error===false):?>
	<?=lang('crash_desc2')?><br /><br /></p>
	<form action="/other/crashformsubmit/ujsubmit" method="post" id="crashform">
	<?=lang('crash_email')?> <input type="text" name="email" id="email" value="" style="width: 200px;" /> <span style="font-size: 0.8em"><?=lang('crash_desc3')?></span>
	<input type="hidden" name="guid" value="<?=$guid?>" />
	<?=lang('crash_leiras')?><br />
	<textarea name="info" rows="15" cols="50" style="width: 100%; height: 150px;"></textarea>
	<input type="submit" class="gomb" value="<?=lang('crash_kuldes')?>" style="background: url(/public/img/bg/crash/button_send.png); color: #FFFFFF; margin-bottom: 0px;" />
	<div style="clear: both; height: 1px; margin: 0px; padding: 0px; font-size: 1px;"></div>
	</form>
	<?endif;?>
</div>
<div style="background: url('/public/img/bg/crash/box_main_bottom.png') no-repeat; width: 100%; height: 14px;"></div>
<img src="/public/img/bg/crash/logo.png" style="margin: 5px 15px;" />

<div id="dialog" style="display: none; font-size: 16px;" title="E-mail">
	<?=$emailmegadas->page_body?>
</div>

</div>



</body>
</html>