<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 tab1 = $("#tabs-1").is(":visible");
				
				if(tab1)
					$("#tab_id").val("1");
				
				if ( oTable.length > 0 ) {
					oTable.fnAdjustColumnSizing();
				}
			}
		} );
	} );
        
	function frm_validation()
	{
		if(navigator.appName != "Microsoft Internet Explorer")
			frmname = document.survey;
		
		var tab1 = $("#tabs-1").is(":visible");
		
		if(tab1)
			$("#tab_id").val("1");
		
		if(tab1)
		{
			if(frmname.usr_pwd.value == "")
			{
				alert("Please Provide Password");
				frmname.usr_pwd.focus();
				return false;
			}
			else
			{
				if(frmname.usr_pwd.value != frmname.usr_repwd.value)
				{
					alert("Password and Retype Password Must be Same");
					frmname.usr_repwd.focus();
					return false;
				}
			}
		}
	}
</script>
<div style="width: 95%; margin: 0 auto; padding: 10px;">
    <div id="frm_display">
    <div id="tabs">
        <ul>
            <li class="active"><a href="#tabs-1">&nbsp;<?php echo $form_name; ?>&nbsp;</a></li>
        </ul>

        <form class="form" name="survey" id="survey" method="post" action="<?php echo $action; ?>" onsubmit="return frm_validation();">
            <div id="tabs-1">
                <div class="questionrow">
                    <div class="question">User Name</div>
                    <div class="answer">
                            <input type="hidden" name="tab_id" id="tab_id" value="" />
                            <input type="hidden" name="id" id="id" value="<?php echo $usr_id; ?>" />
                            <input type="hidden" name="status" id="status" value="1" />
                            <input type="hidden" name="usr_name" id="usr_name" value="<?php echo $full_name; ?>" />
                            <?php echo $full_name; ?>
                    </div>
                </div>
                <div class="clear_form">
                </div>
                <div class="questionrow">
                    <div class="question">Password</div>
                    <div class="answer">
                            <input type="password" name="usr_pwd" id="usr_pwd" value="" />
                    </div>
                </div>
                <div class="clear_form">
                </div>
                <div class="questionrow">
                    <div class="question">Retype Password</div>
                    <div class="answer">
                            <input type="password" name="usr_repwd" id="usr_repwd" value="" />
                    </div>
                </div>
                <div class="clear_form">
                </div>
                <div class="questionrow">
                    <div style="padding: 5px;" align="center">
                        <input type="submit" name="Submit" value="Submit" />
                    </div>
                </div>
            </div>
        </form>
            </div>
    </div>
</div>