<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.mnu_name.value == "")
			{
				alert("Please Provide Main Menu Name");
				frmname.mnu_name.focus();
				return false;
			}
			if(frmname.mnu_title.value == "")
			{
				alert("Please Provide Main Menu Title");
				frmname.mnu_title.focus();
				return false;
			}
		}
	}
        
        function frm_edit_val(frmval)
        {
            $("#id").val(frmval["min_mnu_id"]);
            $("#mnu_name").val(frmval["min_mnu_name"]);
            $("#mnu_title").val(frmval["min_mnu_desc"]);
            
            if(frmval['status'] != 0)
                $("#status").attr("checked", true);
            else
                $("#status").attr("checked", false);
            
            close_frame();
            $("#delete_img").show();
        }
</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;Main Menu&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">Main Menu Name</div>
                    <div class="answer">
                            <input type="hidden" name="tab_id" id="tab_id" value="" />
                            <input type="hidden" name="id" id="id" value="" />
                            <input type="text" name="mnu_name" id="mnu_name" value="" />
                    </div>
                </div>
                <div class="clear_form">
                </div>
                <div class="questionrow">
                    <div class="question">Main Menu Title</div>
                    <div class="answer">
                            <input type="text" name="mnu_title" id="mnu_title" value="" />
                    </div>
                </div>
                <div class="clear_form">
                </div>
                <div class="questionrow">
                    <div class="question">Status</div>
                    <div class="answer">
                            <input type="checkbox" name="status" id="status" value="1" />
                    </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>