<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");
		$("#username").focus();
	} );
	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.password.value == "")
		{
			alert("Please Provide Password");
			frmname.password.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="display:none;">
					<div style="margin: 10px auto; font-size: 36px; text-align: center;">Login</div>
				</div>
				<?php if($msg != "") { 
					$usr = $_REQUEST['username'];
					$pwd = $_REQUEST['password'];
				?>
				<div style="font-size: 20px; padding-bottom: 22px; text-align: center;"><?php echo $msg; ?></div>
				<?php } 
					else
					{
					?>
					<div style="padding-top:30px;">&nbsp;</div>
					<?php
						$usr = "";
						$pwd = "";
					}
				?>
                <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">Password</div>
                        <div class="answer">
                        	<input type="password" name="password" id="password" value="<?php echo $pwd; ?>" />
                        </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']; ?>','forgot_password','',0);" style="cursor: pointer; text-decoration: underline;">Forgot Password?</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>