<script language="javascript">
	var asInitVals = new Array();
	
	$(document).ready(function() {
		
		$("#tabs").tabs( {
			"show": function(event, ui) {
				var oTable = $('div.dataTables_scrollBody>table.display', ui.panel).dataTable();
				var tab3 = $("#tabs-3").is(":visible");
				
				if(tab3)
					$("#tab_id").val("3");
				
				if ( oTable.length > 0 ) {
					oTable.fnAdjustColumnSizing();
				}
			}
		} );
		$(".ui-widget-content").removeAttr("class");
	} );
	function part_id()
	{
		if(navigator.appName != "Microsoft Internet Explorer")
			frmname = document.recuirtment;
		
		lcn = frmname.location.value;
		lcn_typ = frmname.location_type.value;
		frmname.participant_id.value = lcn+lcn_typ;
		
		
		/*if(frmname.location.value == "")
		{
			alert("Please Provide Report Type");
			frmname.location.focus();
			return false;
		}*/
	}
	
	
	
	function frm_validation()
	{
		if(navigator.appName != "Microsoft Internet Explorer")
			frmname = document.recuirtment;
		
		if(frmname.username.value == "")
		{
			alert("Please Provide Username");
			frmname.username.focus();
			return false;
		}
		if(frmname.email.value == "")
		{
			alert("Please Provide Email");
			frmname.email.focus();
			return false;
		}
		else
		{
			if(!checkEmail(frmname.email.value))
			{
				alert("Please Provide Valid Email");
				frmname.email.focus();
				return false;
			}
		}
	}
</script>
<div style="margin: 0 auto; padding: 10px;" class="login"> 
	<div id="frm_display">
        <div id="tabs">
            <form class="form" name="recuirtment" id="recuirtment" method="post" action="<?php echo $action; ?>" onsubmit="return frm_validation();">
				<div style="font-size: 20px; text-align: center;">Forgot Password</div>
				<?php
					$msg = isset($msg) ? $msg : "";
				if($msg != "") { 
					$usr = $_REQUEST['username'];
					$email = $_REQUEST['email'];
				?>
				<div style="font-size: 20px; padding-top: 7px; padding-left: 100px; text-align: center;"><?php echo $msg; ?></div>
				<?php } 
					else
					{
					?>
					<div style="padding-top:5px;">&nbsp;</div>
					<?php
						$usr = "";
						$email = "";
					}
				?>
                <div id="tabs-3">
                    <div class="questionrow">
                        <div class="question">Username</div>
                        <div class="answer">
                        	<input type="text" name="username" id="username" value="<?php echo $usr; ?>" />
                        </div>
                    </div>
                    <div class="clear_form">
                    </div>
                    <div class="questionrow">
                        <div class="question">Email</div>
                        <div class="answer">
                        	<input type="text" name="email" id="email" value="<?php echo $email; ?>" />
                        </div>
                    </div>
                    <div class="clear_form">
                    </div>
                    <div class="questionrow">
                        <div class="question" style="text-align: center; width: 100%;">
							<a onclick="return form_action_load('<?php echo $_SERVER['PHP_SELF']; ?>','','',0);" style="cursor: pointer; text-decoration: underline;">Sign in</a>
						</div>
                    </div>
                    <div class="clear_form" style="display:none;">
                    </div>
                    <div class="questionrow">
                        <div style="padding: 5px;" align="center">
                            <input type="submit" name="Submit" value="Submit" />
                        </div>
                    </div>
                </div>
            </form>
		</div>
	</div>
</div>