</div>
<!--/.main-container-->

<a href="#" id="btn-scroll-up"
	class="btn-scroll-up btn btn-small btn-inverse"> <i
	class="icon-double-angle-up icon-only bigger-110"></i>
</a>
<!-- ------------------------------------------------MAIN FOOTER--------------------------------------------------- -->
<!--basic scripts-->

<?php
if ($query2ans == 'payslip') {
	?>
<script
	src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>

<!--<![endif]-->

<!--[if IE]>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<![endif]-->

<!--[if !IE]>-->

<script type="text/javascript">
			window.jQuery || document.write("<script src='<?php echo SITE_URL.'/assets/backend';?>/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
		</script>

<!--<![endif]-->

<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='assets/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
</script>
<![endif]-->

<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='<?php echo SITE_URL.'/assets/backend';?>/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
<script
	src="<?php echo SITE_URL.'/assets/backend';?>/js/bootstrap.min.js"></script>

<!--page specific plugin scripts-->

<!--[if lte IE 8]>
		  <script src="assets/js/excanvas.min.js"></script>
		<![endif]-->

<script
	src="<?php echo SITE_URL.'/assets/backend';?>/js/jquery-ui-1.10.3.custom.min.js"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend';?>/js/jquery.ui.touch-punch.min.js"></script>
<script src="<?php echo SITE_URL.'/assets/backend';?>/js/bootbox.min.js"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend';?>/js/jquery.easy-pie-chart.min.js"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend';?>/js/jquery.gritter.min.js"></script>
<script src="<?php echo SITE_URL.'/assets/backend';?>/js/spin.min.js"></script>


<!--ace scripts-->

<script
	src="<?php echo SITE_URL.'/assets/backend';?>/js/ace-elements.min.js"></script>
<script src="<?php echo SITE_URL.'/assets/backend';?>/js/ace.min.js"></script>
<script type="text/javascript">
			$(function() {
				$('[data-rel=tooltip]').tooltip();
				$('[data-rel=popover]').popover({html:true});
			});
		</script>

<script>
		
			$(document).ready(function(){
				$("#buttonshow").click(function(){
					
					var attribute= $(this).attr('value');
					
					if(attribute== 'none')
					{
						$(this).attr('value','block');
						$(this).html("Hide");
					}
					else
					{
						$(this).attr('value','none');
						$(this).html("Show More");
					}
					$(".showmore").toggle();
					});
				});
		</script>
<script>
				
				  $("#hide").click(function(){
				    $("#hide").hide(2000);
				  });
				  
				  $(".hide1").click(function(){
				  $(".hide1").hide(2000);
				  });
				
				</script>
<script> 
$(document).ready(function(){
	$(".assessable").keyup(function(){
		var assessablesum=0;
		$(".assessable").each(function(){
			total_assessable =Number($(this).val());
			assessablesum +=total_assessable;
			});
		
		var reliefsum=0;
		$(".relief").each(function(){
			total_relief =Number($(this).val());
			reliefsum +=total_relief;
			});
		
		var donation= $("#approved_donation").val();

			if(donation)
			{
				$.ajax({
					type:'POST',
					url:'<?php echo $link->link("singaporeajax", Admin);?>',
					data:'send_donation='+donation+'&sum='+assessablesum+'&reliefsum='+reliefsum,
					success:function(data){
						var splitdata= data.split("////");
						
						$(".assessableincome").val(splitdata[0]);
						$(".charageable").val(splitdata[1]);
						$("#charageabletax").val(splitdata[2]);
						}	
					});	
			}
			else
			{
				$(".assessableincome").val(assessablesum);
			}
		});
	$(".firsttwo").keyup(function(){
			var firstval= Number($("#first").val());
			var secondval= Number($("#second").val());
			var sum= firstval+secondval;
			$("#net").val(sum);
			var advance = Number($("#net-advance").val());
			var net_amount = Number($("#net").val());
			var remaining = net_amount-advance;
			$("#net-remaining").val(remaining);
		});
	$(".other").keyup(function(){
		var total= 0;
		$(".other").each(function(){
			totalval= Number($(this).val());
			total +=totalval;
			});
		$(".total_income").val(total);
		});
	$("#approved_donation").keyup(function(){
			var donation= $(this).val();
			var sum=0;
			$(".assessable").each(function(){
				total_val= Number($(this).val());
				sum +=total_val;
				});
			$.ajax({
				type:'POST',
				url:'<?php echo $link->link("singaporeajax", Admin);?>',
				data:'donation='+donation+'&assessable='+sum,
				success:function(data){
					$(".assessableincome").val(data);
					}
				});
		});
	$(".relief").keyup(function(){
		$("#loader-wrapper").show();
		$("#spinner").show();
		var reliefsum=0;
		$(".relief").each(function(){
			total_relief =Number($(this).val());
			reliefsum +=total_relief;
			});
			var assessable= $(".assessableincome").val();
			$.ajax({ 
				type:'POST',
				url:'<?php echo $link->link("singaporeajax", Admin);?>',
				data:'senddata='+reliefsum+'&assessable='+assessable,
				success:function(data){
					var splitdata= data.split('///');
					$(".charageable").val(splitdata[0])
					$("#charageabletax").val(splitdata[1]);
					$("#loader-wrapper").hide();
					$("#spinner").hide();
					}
				});
		});
	$("#parenthood").keyup(function(){
		$("#loader-wrapper").show();
		$("#spinner").show();
			var value= $(this).val();
			var tax= $("#charageabletax").val();
			$.ajax({
				type:'POST',
				url:'<?php echo $link->link("singaporeajax", Admin);?>',
				data:'send_value='+value+'&tax='+tax,
				success:function(data){
						if(data==1)
						{
							alert("Oops!!! Parenthood tax cannot be more than tax payable on charagable income..");
							$("#parenthood").val('');
							$("#loader-wrapper").hide();
							$("#spinner").hide();
						}
						else{
						$("#nettax").val(data);
						$("#loader-wrapper").hide();
						$("#spinner").hide();
						}
					}
				});
		});
});
</script>
<?php

} else {
	if ($query2ans == 'incometax_slab') {
		?>
<script>
				
				  $("#hide").click(function(){
				    $("#hide").hide(2000);
				  });
				  
				  $(".hide1").click(function(){
				  $(".hide1").hide(2000);
				  });
				
</script>
<?php
	
	}
	?>

<!--[if !IE]>-->

<?php
	if ($query2ans != 'home' && $query2ans != 'employee_attendence' 
			&& $query2ans != 'payment_details' && $query2ans != 'employee_awards' 
			&& $query2ans != 'earlier_awards' && $query2ans != 'employee_details' 
			&& $query2ans != 'client_details' && $query2ans != 'departments' 
			&& $query2ans != 'attendence' && $query2ans != 'displayuser' 
			&& $query2ans != 'salary_slip' && $query2ans != 'salary_slip_format' 
			&& $query2ans != 'singaporetable' && $query2ans != 'view_inventory' 
			&& $query2ans != 'view_location' && $query2ans != 'view_loan' && $query2ans != 'previous_payslip') {
		?>
<script
	src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<?php }?>
<!--<![endif]-->

<!--[if !IE]>-->

<script type="text/javascript">
			window.jQuery || document.write("<script src='<?php echo SITE_URL.'/assets/backend/js/jquery-2.0.3.min.js'?>'>"+"<"+"/script>");
		</script>

<!--<![endif]-->



<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='<?php echo SITE_URL.'/assets/backend/js/jquery.mobile.custom.min.js'?>'>"+"<"+"/script>");
		</script>
<?php
	// if($query2ans !='salary_slip')
	{
		?>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/bootstrap.min.js'?>"></script>
<?php }?>
<!--page specific plugin scripts-->

<!--[if lte IE 8]>
		  <script src="assets/js/excanvas.min.js"></script>
		<![endif]-->

<?php
	
	if ($query2ans == 'singaporetable') {
		?>

<script
	src="<?php echo SITE_URL.'/assets/backend';?>/js/jquery-ui-1.10.3.custom.min.js"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend';?>/js/jquery.ui.touch-punch.min.js"></script>
<script src="<?php echo SITE_URL.'/assets/backend';?>/js/bootbox.min.js"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend';?>/js/jquery.easy-pie-chart.min.js"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend';?>/js/jquery.gritter.min.js"></script>
<script src="<?php echo SITE_URL.'/assets/backend';?>/js/spin.min.js"></script>
<script>
$('[data-rel=tooltip]').tooltip();
$('[data-rel=popover]').popover({html:true});
</script>
<script
	src="<?php echo SITE_URL.'/assets/backend';?>/js/jquery.dataTables.min.js"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend';?>/js/jquery.dataTables.bootstrap.js"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend';?>/js/ace-elements.min.js"></script>
<script src="<?php echo SITE_URL.'/assets/backend';?>/js/ace.min.js"></script>
<script type="text/javascript">
			$(function() {
				var oTable1 = $('#sample-table-2').dataTable( {
				"aoColumns": [
			      { "bSortable": false },
			      null, null,null, null, null,
				  { "bSortable": false }
				] } );
				
				
				$('table th input:checkbox').on('click' , function(){
					var that = this;
					$(this).closest('table').find('tr > td:first-child input:checkbox')
					.each(function(){
						this.checked = that.checked;
						$(this).closest('tr').toggleClass('selected');
					});
						
				});
			
			
				$('[data-rel="tooltip"]').tooltip({placement: tooltip_placement});
				function tooltip_placement(context, source) {
					var $source = $(source);
					var $parent = $source.closest('table')
					var off1 = $parent.offset();
					var w1 = $parent.width();
			
					var off2 = $source.offset();
					var w2 = $source.width();
			
					if( parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2) ) return 'right';
					return 'left';
				}
			})
		</script>

<script>
				
				  $("#hide").click(function(){
				    $("#hide").hide(2000);
				  });
				  
				  $(".hide1").click(function(){
				  $(".hide1").hide(2000);
				  });
				
				</script>
<script
	src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script> 
$(document).ready(function(){
	$(".assessable").keyup(function(){
		var assessablesum=0;
		$(".assessable").each(function(){
			total_assessable =Number($(this).val());
			assessablesum +=total_assessable;
			});
		
		var reliefsum=0;
		$(".relief").each(function(){
			total_relief =Number($(this).val());
			reliefsum +=total_relief;
			});
		
		var donation= $("#approved_donation").val();

			if(donation)
			{
				$.ajax({
					type:'POST',
					url:'<?php echo $link->link("singaporeajax", Admin);?>',
					data:'send_donation='+donation+'&sum='+assessablesum+'&reliefsum='+reliefsum,
					success:function(data){
						var splitdata= data.split("////");
						
						$(".assessableincome").val(splitdata[0]);
						$(".charageable").val(splitdata[1]);
						$("#charageabletax").val(splitdata[2]);
						}	
					});	
			}
			else
			{
				$(".assessableincome").val(assessablesum);
			}
		});
	$(".firsttwo").keyup(function(){
			var firstval= Number($("#first").val());
			var secondval= Number($("#second").val());
			var sum= firstval+secondval;
			$("#net").val(sum);
		});
	$(".other").keyup(function(){
		var total= 0;
		$(".other").each(function(){
			totalval= Number($(this).val());
			total +=totalval;
			});
		$(".total_income").val(total);
		});
	$("#approved_donation").keyup(function(){
			var donation= $(this).val();
			var sum=0;
			$(".assessable").each(function(){
				total_val= Number($(this).val());
				sum +=total_val;
				});
			$.ajax({
				type:'POST',
				url:'<?php echo $link->link("singaporeajax", Admin);?>',
				data:'donation='+donation+'&assessable='+sum,
				success:function(data){
					$(".assessableincome").val(data);
					}
				});
		});
	$(".relief").keyup(function(){
		$("#loader-wrapper").show();
		$("#spinner").show();
		var reliefsum=0;
		$(".relief").each(function(){
			total_relief =Number($(this).val());
			reliefsum +=total_relief;
			});
			var assessable= $(".assessableincome").val();
			$.ajax({ 
				type:'POST',
				url:'<?php echo $link->link("singaporeajax", Admin);?>',
				data:'senddata='+reliefsum+'&assessable='+assessable,
				success:function(data){
					var splitdata= data.split('///');
					$(".charageable").val(splitdata[0])
					$("#charageabletax").val(splitdata[1]);
					$("#loader-wrapper").hide();
					$("#spinner").hide();
					}
				});
		});
	$("#parenthood").keyup(function(){
		$("#loader-wrapper").show();
		$("#spinner").show();
			var value= $(this).val();
			var tax= $("#charageabletax").val();
			$.ajax({
				type:'POST',
				url:'<?php echo $link->link("singaporeajax", Admin);?>',
				data:'send_value='+value+'&tax='+tax,
				success:function(data){
						if(data==1)
						{
							alert("Oops!!! Parenthood tax cannot be more than tax payable on charagable income..");
							$("#parenthood").val('');
							$("#loader-wrapper").hide();
							$("#spinner").hide();
						}
						else{
						$("#nettax").val(data);
						$("#loader-wrapper").hide();
						$("#spinner").hide();
						}
					}
				});
		});
});
</script>
<?php
	}
	?>
<?php

	if ($query2ans != 'salary_slip' && $query2ans != 'singaporetable') {
		?>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.ui.touch-punch.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.slimscroll.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.easy-pie-chart.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.sparkline.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/flot/jquery.flot.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/flot/jquery.flot.pie.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/flot/jquery.flot.resize.min.js'?>"></script>
<?php }?>
<!--ace scripts-->
<?php if ($query2ans != 'singaporetable'){?>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/ace-elements.min.js'?>"></script>
<script src="<?php echo SITE_URL.'/assets/backend/js/ace.min.js'?>"></script>
<?php
		$getnullvalue = $db->get_col ( "calculator", array ("id" => 1 ), "incometaxnull" );
		?>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.maskedinput.min.js'?>"></script>
<script>
	//only numeric value are allowed
	$(".txtboxToFilter").mask("9?9%");
	
	</script>
<script>
	$("document").ready(function(){
		$("#basic_salary").keyup(function(){
			$("#spinner").show();
			var inputval= $(this).val();
			//if($.isNumeric(inputval))
			if(inputval.match(/^[0-9]+$/))
			{
				
					var nullvalue= '<?php echo $getnullvalue[0];?>';
					var compare = Math.max(inputval, nullvalue);
					if(compare == inputval)
					{
						//alert("xcfgdf");
						$(".incometaxinput").hide();
						$(".txtboxToFilter").show();
						$(".txtboxToFilter").focus();
					}
					else
					{
						$(".txtboxToFilter").val("");
						$(".txtboxToFilter").hide();
						$(".incometaxinput").show();
						$(".netsalar").val('');
					}
					 $.ajax({
						type:'POST',
						url:'<?php echo $link->link("salary_ajax", Admin);?>',
						data:'sendvalue='+inputval,
						success:function(data){
								if(data ==1)
								{
									$("#spinner").hide();
									$("#totalearning_vipin").val('');
									$("#totaldeduction_vipin").val('');
									$(".grossincome").val('');	
									$(".netsalar").val('');
								} 
								else
								{
									var arr= data.split(",");
									$("#spinner").hide();
										$("#totalearning_vipin").val(arr[0]);
										$("#totaldeduction_vipin").val(arr[1]);
										$(".grossincome").val(arr[2]);
										$(".netsalar").val(arr[2]);
									var ded= arr[3].split("***");
										
									for (var i = 0; i < ded.length; i++) {
										$("#dedid_"+i).html("Rs."+ded[i]);
									}
									//alert(arr[4]);
									var ear= arr[4].split("***");
									for (var a = 0; a < ear.length; a++) {
										$("#earid_"+a).html("Rs."+ear[a]);
									}
								}
							}	
						 });
				
			}
			else
			{
				if(inputval == '')
				{
					$("#spinner").hide();
					$("#totalearning_vipin").val('');
					$("#totaldeduction_vipin").val('');
					$(".grossincome").val('');	
					$(".netsalar").val('');
				}
				else
				{
					alert("Your Value Is Not Numeric, Put The Numeric Value");
					$(this).val("");	
				}
			}
			
			});
		$(".txtboxToFilter").keyup(function(){
			$("spinner").show();
			var inputvalue= $(this).val();
			var grossincome= $(".grossincome").val();
			var sendinput= inputvalue.split("%");
			$.ajax({
				type:'POST',
				url:'<?php echo $link->link("salary_ajax", Admin);?>',
				data:'send_value='+sendinput[0]+'&send_gross='+grossincome,
				success:function(data){
						//alert(data);
						var arr= data.split(",");
						$(".inometax").html("Income Tax "+arr[0]);
						$(".netsalar").val(arr[1]);
						$("spinner").hide();
					}
				});
			});
		});
</script>

<!--inline scripts related to this page-->
<?php }?>

<!-- ---------------------------------------------HOME JS START---------------------------------------------------->
<?php
	if ($query2ans == 'home') {
		?>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.bootstrap.js'?>"></script>
	<script src="<?php echo SITE_URL.'/assets/backend/'?>/js/bootbox.min.js"></script>
	
	<script type="text/javascript">
				$(function() {
					var oTable1 = $('#sample-table-2').dataTable( {
					"aoColumns": [
				      { "bSortable": false },
				      null, null,null, null, null,
					  { "bSortable": false }
					] } );
					
					
					
					$('table th input:checkbox').on('click' , function(){
						var that = this;
						$(this).closest('table').find('tr > td:first-child input:checkbox')
						.each(function(){
							this.checked = that.checked;
							$(this).closest('tr').toggleClass('selected');
						});
							
					});
				
				
					$('[data-rel="tooltip"]').tooltip({placement: tooltip_placement});
					function tooltip_placement(context, source) {
						var $source = $(source);
						var $parent = $source.closest('table')
						var off1 = $parent.offset();
						var w1 = $parent.width();
				
						var off2 = $source.offset();
						var w2 = $source.width();
				
						if( parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2) ) return 'right';
						return 'left';
					}
				})
			</script>
			<script type="text/javascript">
				$(function() {
					$('[data-rel=tooltip]').tooltip();
					$('[data-rel=popover]').popover({html:true});
				});
			</script>
<?php
	}
	?>

<!-- ------------------------------------------------FINISH HOME END------------------------------------------------->
<!-- ------------------------------------------------Calendar js Start-------------------------------------------- -->
<?php
	
	if ($query2ans == 'calendar') {
		?>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery-ui-1.10.3.custom.min.js';?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.ui.touch-punch.min.js';?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/fullcalendar.min.js';?>"></script>
<script src="<?php echo SITE_URL.'/assets/backend/js/bootbox.min.js';?>"></script>

<script type="text/javascript">
	
			$(function() {

/* initialize the external events
	-----------------------------------------------------------------*/

	$('#external-events div.external-event').each(function() {

		// create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)
		// it doesn't need to have a start or end
		var eventObject = {
			title: $.trim($(this).text()) // use the element's text as the event title
		};

		// store the Event Object in the DOM element so we can get to it later
		$(this).data('eventObject', eventObject);

		// make the event draggable using jQuery UI
		$(this).draggable({
			zIndex: 999,
			revert: true,      // will cause the event to go back to its
			revertDuration: 0  //  original position after the drag
		});
		
	});



<?php
		$attendence = $db->get_all ( 'attendence' );
		
		?>
	/* initialize the calendar
	-----------------------------------------------------------------*/

	var date = new Date();
	var d = date.getDate();
	var m = date.getMonth();
	var y = date.getFullYear();
	
	var calendar = $('#calendar').fullCalendar({
		 buttonText: {
			prev: '<i class="icon-chevron-left"></i>',
			next: '<i class="icon-chevron-right"></i>'
		},
	
		header: {
			left: 'prev,next today',
			center: 'title',
			right: 'month',
			class: 'fc-state-active'
		},
		<?php
		
		$present = $db->get_all ( "attendence", array ("firsthalf" => 0.00, 'secondhalf' => 0.00, 'e_id' => $id [1] ) );
		$days = $db->get_col ( "office", array ('id' => 1 ), "w_day" );
		// echo date_format(date_create('2014-07-26'), 'l');
		$days = $days [0];
		$dayval = unserialize ( $days );
		
		foreach ( $dayval as $row => $key ) {
			$finalday .= $row . ',';
		}
		// echo $finalday;
		$finalday = explode ( ",", $finalday );
		?>
		events: [
		<?php foreach ($present as $row) { $date= explode('-', $row['date']); ?>		 		
		{
			title: 'Present Full Day',
			start: new Date(<?php echo $date[0];?>, <?php echo $date[1]-1;?>, <?php echo $date[2];?>),
			className: 'label-info'
			
		},
		<?php
			
			$tableday = date_format ( date_create ( $row [date] ), 'l' );
			$tableday = $feature->textstyler ( $tableday, 2 );
			if (! in_array ( $tableday, $finalday )) {
				?>
		{
			title: 'Non Working Day',
			start: new Date(<?php echo $date[0];?>, <?php echo $date[1]-1;?>, <?php echo $date[2];?>),
			className: 'label-warning'
			
		},
		<?php }}?>
		<?php $absent= $db->run("select * from attendence where `secondhalf` = '0.50' and `firsthalf` = '0.00' and `e_id` = '$id[1]' ")->fetchAll();?>
		<?php foreach ($absent as $row) { $date= explode('-', $row['date']); ?>
		{
			title: 'Absent Second Half  (<?php echo $row['t_leave'];?>)',
			start: new Date(<?php echo $date[0];?>, <?php echo $date[1]-1;?>, <?php echo $date[2];?>),
			className: 'label-important'
		},
		{
			title: 'Present First Half',
			start: new Date(<?php echo $date[0];?>, <?php echo $date[1]-1;?>, <?php echo $date[2];?>),
			className: 'label-success'
		},
		<?php
			
			$tableday = date_format ( date_create ( $row [date] ), 'l' );
			$tableday = $feature->textstyler ( $tableday, 2 );
			if (! in_array ( $tableday, $finalday )) {
				?>
				{
					title: 'Non Working Day',
					start: new Date(<?php echo $date[0];?>, <?php echo $date[1]-1;?>, <?php echo $date[2];?>),
					className: 'label-warning'
					
				},
		<?php }}?>
		<?php $half= $db->run("select * from attendence where firsthalf =0.50 and secondhalf=0.00  and e_id= $id[1]")->fetchAll();?>
		<?php foreach ($half as $row) { $date= explode('-', $row['date']); ?>
		{
			title: 'Absent Second Half (<?php echo $row['t_leave'];?>)',
			start: new Date(<?php echo $date[0];?>, <?php echo $date[1]-1;?>, <?php echo $date[2];?>),
			className: 'label-important' 
		},
		
		{
			title: 'Present First Half',
			start: new Date(<?php echo $date[0];?>, <?php echo $date[1]-1;?>, <?php echo $date[2];?>),
			className: 'label-success' 
		},
		
		<?php
			
			$tableday = date_format ( date_create ( $row [date] ), 'l' );
			$tableday = $feature->textstyler ( $tableday, 2 );
			if (! in_array ( $tableday, $finalday )) {
				?>
				{
					title: 'Non Working Day',
					start: new Date(<?php echo $date[0];?>, <?php echo $date[1]-1;?>, <?php echo $date[2];?>),
					className: 'label-warning'
					
				},
		<?php }}?> 
		<?php $half= $db->run("select * from attendence where firsthalf =0.50 and secondhalf=0.50  and e_id= $id[1]")->fetchAll();?>
		<?php
		
		foreach ( $half as $row ) {
			$date = explode ( '-', $row ['date'] );
			$tableday = date_format ( date_create ( $row [date] ), 'l' );
			$tableday = $feature->textstyler ( $tableday, 2 );
			if (! in_array ( $tableday, $finalday )) {
				?>
				{
					title: 'Non Working Day',
					start: new Date(<?php echo $date[0];?>, <?php echo $date[1]-1;?>, <?php echo $date[2];?>),
					className: 'label-warning'
					
				},
		<?php
			
			} else {
				?>
		{
			title: 'Absent Full Day (<?php echo $row['t_leave'];?>)',
			start: new Date(<?php echo $date[0];?>, <?php echo $date[1]-1;?>, <?php echo $date[2];?>),
			className: 'label-info' 
		},
		
<?php }}?> 
		/*{
			title: 'Some Event',
			start: new Date(y, m, d-3, 16, 0),
			allDay: false
		}*/]
		
	});


})
		</script>
<?php }?>
<!-- ------------------------------------------------CALENDAR JS END---------------------------------------------- -->


<!-- ------------------------------------------------employee_attendence JS START---------------------------------------- -->
<?php
	if ($query2ans == 'employee_attendence' || $query2ans == 'salary_slip') {
		?>

<!--page specific plugin scripts-->

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.bootstrap.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/bootstrap-datepicker.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/moment.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/daterangepicker.min.js'?>"></script>


<script type="text/javascript">
					$(function() {
						
						$('.date-picker').datepicker().next().on(ace.click_event, function(){
							$(this).prev().focus();
						});
					});
				</script>

<script type="text/javascript">
					$(function() {
						
						$('#id-date-range-picker-1').daterangepicker().prev().on(ace.click_event, function(){
							$(this).next().focus();
						});
					});
				</script>

<!--ace scripts-->



<!--inline scripts related to this page-->

<script>
				
				  $("#hide").click(function(){
				    $("#hide").hide(2000);
				  });
				  
				  $(".hide1").click(function(){
				  $(".hide1").hide(2000);
				  });
				
				</script>
<?php
	}
	?>
<!-- ------------------------------------------------employee_attendence END------------------------------------------ -->

<!-- ----------------------------------------------DEPARTMENTS JS START------------------------------------- -->
<?php
	if ($query2ans == 'attendence') {
		?>

<!--page specific plugin scripts-->

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.bootstrap.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/moment.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/daterangepicker.min.js'?>"></script>




<script type="text/javascript">
					$(function() {
						
						$('#id-date-range-picker-1').daterangepicker().prev().on(ace.click_event, function(){
							$(this).next().focus();
						});
					});
				</script>

<!--ace scripts-->



<!--inline scripts related to this page-->

<script>
				
				  $("#hide").click(function(){
				    $("#hide").hide(2000);
				  });
				  
				  $(".hide1").click(function(){
				  $(".hide1").hide(2000);
				  });
				
				</script>

<?php
	}
	?>
<!-- ------------------------------------------------ATTENDENCE JS END------------------------------------------->

<!-- ----------------------------------------------DEPARTMENTS JS START------------------------------------- -->
<?php
	if ($query2ans == 'displayuser') {
		?>

<!--page specific plugin scripts-->

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.bootstrap.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/moment.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/daterangepicker.min.js'?>"></script>




<script type="text/javascript">
					$(function() {
						
						$('#id-date-range-picker-1').daterangepicker().prev().on(ace.click_event, function(){
							$(this).next().focus();
						});
					});
				</script>

<!--ace scripts-->



<!--inline scripts related to this page-->

<script>
				
				  $("#hide").click(function(){
				    $("#hide").hide(2000);
				  });
				  
				  $(".hide1").click(function(){
				  $(".hide1").hide(2000);
				  });
				
				</script>

<?php
	}
	?>

<!-- ------------------------------------------------DISPLAY USER JS END------------------------------------------ -->
<?php
	if ($query2ans == 'payment_details') {
		?>

<!--page specific plugin scripts-->

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.bootstrap.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/moment.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/daterangepicker.min.js'?>"></script>




<script type="text/javascript">
					$(function() {
						
						$('#id-date-range-picker-1').daterangepicker().prev().on(ace.click_event, function(){
							$(this).next().focus();
						});
					});
				</script>

<!--ace scripts-->



<!--inline scripts related to this page-->

<script>
				
				  $("#hide").click(function(){
				    $("#hide").hide(2000);
				  });
				  
				  $(".hide1").click(function(){
				  $(".hide1").hide(2000);
				  });
				
				</script>

<?php
	}
	?>
<!-- -----------------------------------------------PAYMENT DETAILS END--------------------------------------- -->
<?php
	if ($query2ans == 'earlier_awards') {
		?>

<!--page specific plugin scripts-->

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.bootstrap.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/moment.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/daterangepicker.min.js'?>"></script>




<script type="text/javascript">
					$(function() {
						
						$('#id-date-range-picker-1').daterangepicker().prev().on(ace.click_event, function(){
							$(this).next().focus();
						});
					});
				</script>

<!--ace scripts-->



<!--inline scripts related to this page-->

<script>
				
				  $("#hide").click(function(){
				    $("#hide").hide(2000);
				  });
				  
				  $(".hide1").click(function(){
				  $(".hide1").hide(2000);
				  });
				
				</script>

<?php
	}
	?>
<!-- -----------------------------------------------EARLIER AWARDS JS END--------------------------------------- -->
<?php
	if ($query2ans == 'employee_awards') {
		?>

<!--page specific plugin scripts-->

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.bootstrap.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/moment.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/daterangepicker.min.js'?>"></script>




<script type="text/javascript">
					$(function() {
						
						$('#id-date-range-picker-1').daterangepicker().prev().on(ace.click_event, function(){
							$(this).next().focus();
						});
					});
				</script>

<!--ace scripts-->



<!--inline scripts related to this page-->

<script>
				
				  $("#hide").click(function(){
				    $("#hide").hide(2000);
				  });
				  
				  $(".hide1").click(function(){
				  $(".hide1").hide(2000);
				  });
				
				</script>

<?php
	}
	?>
<!-- -----------------------------------------------EMPLOYEE DETAILS START------------------------------------ -->
<?php
	if ($query2ans == 'employee_details') {
		?>

<!--page specific plugin scripts-->

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.bootstrap.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/moment.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/daterangepicker.min.js'?>"></script>




<script type="text/javascript">
					$(function() {
						
						$('#id-date-range-picker-1').daterangepicker().prev().on(ace.click_event, function(){
							$(this).next().focus();
						});
					});
				</script>

<!--ace scripts-->



<!--inline scripts related to this page-->

<script>
				
				  $("#hide").click(function(){
				    $("#hide").hide(2000);
				  });
				  
				  $(".hide1").click(function(){
				  $(".hide1").hide(2000);
				  });
				
				</script>

<?php
	}
	?>
	
	<!-- -----------------------------------------------EDIT DISPLAY USER JS START-------------------------------- -->
<?php
	if ($query2ans == 'edit_displayuser') {
		?>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.autosize-min.js'?>"></script>


<script type="text/javascript">
						$(function() {
							$('textarea[class*=autosize]').autosize({append: "\n"});
							});
				</script>

<script>
				$(document).ready(function(){
				  $("#hide").click(function(){
				    $(this).hide('slow');
				  });
				  
				  $(".hide1").click(function(){
				  $(this).hide('slow');
				  });
				});
				</script>
<?php }?>
<!-- -----------------------------------------------END EDIT DISPLAY USER JS---------------------------------- -->
<!-- -----------------------------------------------EDIT PAYMENT DETAILS JS-------------------------------------->
<?php
	if ($query2ans == 'edit_paymentdetails') {
		?>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/chosen.jquery.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.autosize-min.js'?>"></script>
<script type="text/javascript">
					$(function() {
						$('textarea[class*=autosize]').autosize({append: "\n"});
						});
				</script>


<script
	src="<?php echo SITE_URL.'/assets/backend/js/fuelux/fuelux.spinner.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/bootstrap-datepicker.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.inputlimiter.1.3.1.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.maskedinput.min.js'?>"></script>

<script type="text/javascript">
					$(function() {
						
						$('.date-picker').datepicker().next().on(ace.click_event, function(){
							$(this).prev().focus();
						});
					});
				</script>

<script>
				
				  $("#hide").click(function(){
				    $("#hide").hide('slow');
				  });
				  
				  $(".hide1").click(function(){
				  $(this).hide('slow');
				  });
				
				</script>
<?php
	}
	?>
<!-- -----------------------------------------------END EDIT PAYMENT DETAILS JS --------------------------------->

<!-- -----------------------------------------------REGISTER JS START----------------------------------------- -->
<?php
	if ($query2ans == 'register') {
		?>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.autosize-min.js'?>"></script>
<script type="text/javascript">
					$(function() {
						$('textarea[class*=autosize]').autosize({append: "\n"});
						});
				</script>
<script>
				
				  $("#hide").click(function(){
				    $("#hide").hide('slow');
				  });
				  
				  $(".hide1").click(function(){
				  $(this).hide('slow');
				  });
				
				</script>


<?php } ?>
<!-- -----------------------------------------------REGISTER JS END----------------------------------------------- -->
<!-- ---------------------------------------------PAYMENT JS-------------------------------------------- -->
<?php
	if ($query2ans == 'payment') {
		?>


<script
	src="<?php echo SITE_URL.'/assets/backend/js/chosen.jquery.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.autosize-min.js'?>"></script>
<script type="text/javascript">
					$(function() {
						$('textarea[class*=autosize]').autosize({append: "\n"});
						});
				</script>


<script
	src="<?php echo SITE_URL.'/assets/backend/js/fuelux/fuelux.spinner.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/bootstrap-datepicker.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.inputlimiter.1.3.1.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.maskedinput.min.js'?>"></script>

<script type="text/javascript">
					$(function() {
						
						$('.date-picker').datepicker().next().on(ace.click_event, function(){
							$(this).prev().focus();
						});
					});
				</script>

<script>
				
				  $("#hide").click(function(){
				    $("#hide").hide(2000);
				  });
				  
				  $(".hide1").click(function(){
				  $(".hide1").hide(2000);
				  });
				
				</script>
<?php
	}
	?>
<!-- ---------------------------------------------END PAYMENT JS---------------------------------------- -->


<!-- ---------------------------------------------GIVE AWAY JS START------------------------------------ -->
<?php
	if ($query2ans == 'give_away') {
		?>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/bootstrap-datepicker.min.js'?>"></script>

<script type="text/javascript">
					$(function() {
						
						$('.date-picker').datepicker().next().on(ace.click_event, function(){
							$(this).prev().focus();
						});
					});
				</script>

<script>
				
				  $("#hide").click(function(){
				    $("#hide").hide('slow');
				  });
				  
				  $(".hide1").click(function(){
				  $(this).hide('slow');
				  });
				
				</script>
<?php
	}
	?>
<!-- ---------------------------------------------GIVE AWAY JS END-------------------------------------- -->

<!-- ---------------------------------------------NEW EMPLOYEE JS START-------------------------------------- -->
<?php
	if ($query2ans == 'new_employee') {
		?>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/chosen.jquery.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.autosize-min.js'?>"></script>
<script type="text/javascript">
					$(function() {
						$('textarea[class*=autosize]').autosize({append: "\n"});
						});
				</script>


<script
	src="<?php echo SITE_URL.'/assets/backend/js/fuelux/fuelux.spinner.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/bootstrap-datepicker.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.inputlimiter.1.3.1.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.maskedinput.min.js'?>"></script>

<script type="text/javascript">
					$(function() {
						
						$('.date-picker').datepicker().next().on(ace.click_event, function(){
							$(this).prev().focus();
						});
					});
				</script>

<script>
				
				  $("#hide").click(function(){
				    $("#hide").hide('slow');
				  });
				  
				  $(".hide1").click(function(){
				  $(this).hide('slow');
				  });
				
				</script>



<?php
	}
	?>
<!-- --------------------------------------------- NEW EMPLOYEE JS END--------------------------------- -->
<!-- ----------------------------------------------EDIT EMPLOYEE DETAILS JS START---------------------------- -->
<?php
	if ($query2ans == 'edit_employeedetails') {
		?>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/chosen.jquery.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.autosize-min.js'?>"></script>
<script type="text/javascript">
						$(function() {
							$('textarea[class*=autosize]').autosize({append: "\n"});
							});
					</script>


<script
	src="<?php echo SITE_URL.'/assets/backend/js/fuelux/fuelux.spinner.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/bootstrap-datepicker.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.inputlimiter.1.3.1.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.maskedinput.min.js'?>"></script>

<script type="text/javascript">
						$(function() {
							
							$('.date-picker').datepicker().next().on(ace.click_event, function(){
								$(this).prev().focus();
							});
						});
					</script>

<script>
					
					  $("#hide").click(function(){
					    $("#hide").hide('slow');
					  });
					  
					  $(".hide1").click(function(){
					  $(this).hide('slow');
					  });
					
					</script>
<?php
	}
	?>
<!-- ----------------------------------------------EDIT EMPLOYEEES DETAILS JS END ------------------------------>
<!-- ----------------------------------------------EMPLOYEE PREVIEW JS START ----------------------------------->
<?php
	if ($query2ans == 'employee_preview' || $query2ans=='add_inventory' || $query2ans=='view_inventory') {
		?>
		<script src="<?php echo SITE_URL.'/assets/backend/'?>/js/bootbox.min.js"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/bootstrap-datepicker.min.js'?>"></script>
<script type="text/javascript">
						$(function() {
							$('.date-picker').datepicker().next().on(ace.click_event, function(){
								$(this).prev().focus();
							});
						});
					</script>
<script>
					$(".abhi").click(function(){
				 	$(".abhi").hide(2000);
				 	$("#upllnk").show(2000);
				 	});
				 	
					$("#upllnk").click(function(){
					 	$("#ufile1").click();
					 	$("#upllnk").hide();
					 	$(".select").show(1000);
					 	var $img = $("<img>").attr("src", response);
					 	$('#image_list').append($img);
					});	  


					function readURL(input) {
				        if (input.files && input.files[0]) {
				            var reader = new FileReader();
				            
				            reader.onload = function (e) {
				                $('#blahh').attr('src', e.target.result);
				            }
				            
				            reader.readAsDataURL(input.files[0]);
				        }
				    }
				    
				    $("#ufile1").change(function(){
				        readURL(this);
				    });

				    $("#cancel1").click(function(){
					    $(".select").hide(2000);
					    $(".abhi").show(2000);
				    });
			</script>
<script>
					
					  $("#hide").click(function(){
					    $("#hide").hide('slow');
					  });
					  
					  $(".hide1").click(function(){
					  $(this).hide('slow');
					  });
					
			</script>


<script>

				$("#employee").click(function(){
					$("#employee").hide();
					$(".emp").show();
					});
				$("#cancel_emp").click(function(){
					$(".emp").hide();
					$("#employee").show();
					});
				
				$("#department").click(function(){
					$("#department").hide();
					$(".dep").show();
					});
				$("#cancel_dep").click(function(){
					$(".dep").hide();
					$("#department").show();
					});

				$("#dob").click(function(){
					$("#dob").hide();
					$(".dob").show();
					});
				$("#cancel_dob").click(function(){
					$(".dob").hide();
					$("#dob").show();
					});

				$("#ecode").click(function(){
					$("#ecode").hide();
					$(".ecode").show();
					});
				$("#cancel_ecode").click(function(){
					$(".ecode").hide();
					$("#ecode").show();
					});

				$("#mobile").click(function(){
					$("#mobile").hide();
					$(".mobile").show();
					});
				$("#cancel_mobile").click(function(){
					$(".mobile").hide();
					$("#mobile").show();
					});

				$("#telephone").click(function(){
					$("#telephone").hide();
					$(".telephone").show();
					});
				$("#cancel_telephone").click(function(){
					$(".telephone").hide();
					$("#telephone").show();
					});

				$("#adate").click(function(){
					$("#adate").hide();
					$(".adate").show();
					});
				$("#cancel_adate").click(function(){
					$(".adate").hide();
					$("#adate").show();
					});

				$("#jdate").click(function(){
					$("#jdate").hide();
					$(".jdate").show();
					});
				$("#cancel_jdate").click(function(){
					$(".jdate").hide();
					$("#jdate").show();
					});

				
				$("#father").click(function(){
					$("#father").hide();
					$(".father").show();
					});
				$("#cancel_father").click(function(){
					$(".father").hide();
					$("#father").show();
					});

				$("#email").click(function(){
					$("#email").hide();
					$(".email").show();
					});
				$("#cancel_email").click(function(){
					$(".email").hide();
					$("#email").show();
					});

				$("#address").click(function(){
					$("#address").hide();
					$(".address").show();
					});
				$("#cancel_address").click(function(){
					$(".address").hide();
					$("#address").show();
					});

				$("#bank").click(function(){
					$("#bank").hide();
					$(".bank").show();
					});
				$("#cancel_bank").click(function(){
					$(".bank").hide();
					$("#bank").show();
					});

				$("#account").click(function(){
					$("#account").hide();
					$(".account").show();
					});
				$("#cancel_account").click(function(){
					$(".account").hide();
					$("#account").show();
					});

				$("#branch").click(function(){
					$("#branch").hide();
					$(".branch").show();
					});
				$("#cancel_branch").click(function(){
					$(".branch").hide();
					$("#branch").show();
					});

				$("#city").click(function(){
					$("#city").hide();
					$(".city").show();
					});
				$("#cancel_city").click(function(){
					$(".city").hide();
					$("#city").show();
					});

				$("#ifsccode").click(function(){
					$("#ifsccode").hide();
					$(".ifsccode").show();
					});
				$("#cancel_ifsccode").click(function(){
					$(".ifsccode").hide();
					$("#ifsccode").show();
					});

				$("#salary").click(function(){
					$("#salary").hide();
					$(".salary").show();
					});
				$("#cancel_salary").click(function(){
					$(".salary").hide();
					$("#salary").show();
					});

				$("#remarks").click(function(){
					$("#remarks").hide();
					$(".remarks").show();
					});
				$("#cancel_remarks").click(function(){
					$(".remarks").hide();
					$("#remarks").show();
					});
			
				$("#high").click(function(){
					$("#high").hide();
					$(".high").show();		
				});
				$("#cancel_high").click(function(){
					$(".high").hide();
					$("#high").show();
					});

				$("#inter").click(function(){
					$("#inter").hide();
					$(".inter").show();
					});
				$("#cancel_inter").click(function(){
					$(".inter").hide();
					$("#inter").show();
					});

				$("#graduation").click(function(){
					$("#graduation").hide();
					$(".graduation").show();
					});
				$("#cancel_graduation").click(function(){
					$(".graduation").hide();
					$("#graduation").show();
					});

				$("#p_graduation").click(function(){
					$("#p_graduation").hide();
					$(".p_graduation").show();
					});
				$("#cancel_pgraduation").click(function(){
					$(".p_graduation").hide();
					$("#p_graduation").show();
					});

				$("#extraa").click(function(){
					$("#extraa").hide();
					$(".extraa").show();
					});
				$("#cancel_extra").click(function(){
					$(".extraa").hide();
					$("#extraa").show();
					});

				$(".211").click(function(){
					$("#211").hide();
					$("#221").show();
					});
				$("#231").click(function(){
					$("#221").hide();
					$("#211").show();
					});

				

				$(".11").click(function(){
					$("#11").hide();
					$("#21").show();
					});
				$("#31").click(function(){
					$("#21").hide();
					$("#11").show();
					});
				
				$('.12').click(function(){
					$('#12').hide();
					$('#22').show();
					});
				$('#32').click(function(){
					$('#22').hide();
					$('#12').show();
					});

				$('.13').click(function(){
					$('#13').hide();
					$('#23').show();
					});
				$('#33').click(function(){
					$('#23').hide();
					$('#13').show();
					});


				$('.14').click(function(){
					$('#14').hide();
					$('#24').show();
					});
				$('#34').click(function(){
					$('#24').hide();
					$('#14').show();
					});

				
				$('.15').click(function(){
					$('#15').hide();
					$('#25').show();
					});
				$('#35').click(function(){
					$('#25').hide();
					$('#15').show();
					});


				$("#idproof").click(function(){
					$("#idproof").hide();
					$(".idproof").show();
					});
				$("#cancel_idproof").click(function(){
					$(".idproof").hide();
					$("#idproof").show();
					});

				$("#idproof1").click(function(){
					$("#idproof1").hide();
					$(".idproof1").show();
					});
				$("#cancel_idproof1").click(function(){
					$(".idproof1").hide();
					$("#idproof1").show();
					});


				$("#idproof2").click(function(){
					$("#idproof2").hide();
					$(".idproof2").show();
					});
				$("#cancel_idproof2").click(function(){
					$(".idproof2").hide();
					$("#idproof2").show();
					});

				$(".111").click(function(){
					$("#111").hide();
					$("#121").show();
					});
				$("#131").click(function(){
					$("#121").hide();
					$("#111").show();
					});


				$(".112").click(function(){
					$("#112").hide();
					$("#122").show();
					});
				$("#132").click(function(){
					$("#122").hide();
					$("#112").show();
					});


				$(".113").click(function(){
					$("#113").hide();
					$("#123").show();
					});
				$("#133").click(function(){
					$("#123").hide();
					$("#113").show();
					});
				$("#declaration1").click(function(){
					$("#declaration").hide();
					$(".declaration1").show();
					});
				$("#cancel_declaration1").click(function(){
					$(".declaration1").hide();
					$("#declaration").show();
					});
				$("#last_declaration1").click(function(){
					$("#last_declaration").hide();
					$(".last_declaration1").show();
					});
				$("#cancel_last_declaration1").click(function(){
					$(".last_declaration1").hide();
					$("#last_declaration").show();
					});				
			</script>

<script type="text/javascript">
				$(function() {
					$('[data-rel=tooltip]').tooltip();
					$('[data-rel=popover]').popover({html:true});
				});
			</script>


<?php
	}
	?>

<!-- ----------------------------------------------END EMPLOYEE PREVIEW JS ---------------------------------- -->
<!-- ---------------------------------------------- EDIT CLIENT DETAILS JS START----------------------------------- -->
<?php
	if ($query2ans == 'edit_clientdetails') {
		?>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/chosen.jquery.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.autosize-min.js'?>"></script>
<script type="text/javascript">
						$(function() {
							$('textarea[class*=autosize]').autosize({append: "\n"});
							});
					</script>

<script>
					
					  $("#hide").click(function(){
					    $("#hide").hide('slow');
					  });
					  
					  $(".hide1").click(function(){
					  $(this).hide('slow');
					  });
					
					</script>
<?php
	}
	?>
<!-- ----------------------------------------------END EDIT CLIENT DETAILS JS --------------------------------------->

<!-- -----------------------------------------------CLIENT DETAILS START------------------------------------ -->
<?php
	if ($query2ans == 'client_details') {
		?>

<!--page specific plugin scripts-->

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.bootstrap.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/moment.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/daterangepicker.min.js'?>"></script>




<script type="text/javascript">
					$(function() {
						
						$('#id-date-range-picker-1').daterangepicker().prev().on(ace.click_event, function(){
							$(this).next().focus();
						});
					});
				</script>

<!--ace scripts-->



<!--inline scripts related to this page-->

<script>
				
				  $("#hide").click(function(){
				    $("#hide").hide(2000);
				  });
				  
				  $(".hide1").click(function(){
				  $(".hide1").hide(2000);
				  });
				
				</script>

<?php
	}
	?>

<!-- ----------------------------------------------NEW CLIENT JS START--------------------------------------- -->
<?php
	if ($query2ans == 'new_client') {
		?>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/chosen.jquery.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.autosize-min.js'?>"></script>
<script type="text/javascript">
						$(function() {
							$('textarea[class*=autosize]').autosize({append: "\n"});
							});
					</script>

<script>
					
					  $("#hide").click(function(){
					    $("#hide").hide('slow');
					  });
					  
					  $(".hide1").click(function(){
					  $(this).hide('slow');
					  });
					
					</script>
<?php
	}
	?>
<!-- ----------------------------------------------END NEW CLIENT JS --------------------------------------- -->

<!-- ----------------------------------------------DEPARTMENTS JS START------------------------------------- -->
<?php
	if ($query2ans == 'departments') {
		?>

<!--page specific plugin scripts-->

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.dataTables.bootstrap.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/moment.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/daterangepicker.min.js'?>"></script>




<script type="text/javascript">
					$(function() {
						
						$('#id-date-range-picker-1').daterangepicker().prev().on(ace.click_event, function(){
							$(this).next().focus();
						});
					});
				</script>

<!--ace scripts-->



<!--inline scripts related to this page-->

<script>
				
				  $("#hide").click(function(){
				    $("#hide").hide(2000);
				  });
				  
				  $(".hide1").click(function(){
				  $(".hide1").hide(2000);
				  });
				
				</script>

<?php
	}
	?>


<!-- ----------------------------------------------NEW DEPARTMENTS JS START--------------------------------- -->
<?php
	if ($query2ans == 'new_departments') {
		?>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/chosen.jquery.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.autosize-min.js'?>"></script>
<script type="text/javascript">
						$(function() {
							$('textarea[class*=autosize]').autosize({append: "\n"});
							});
					</script>

<script>
					
					  $("#hide").click(function(){
					    $("#hide").hide('slow');
					  });
					  
					  $(".hide1").click(function(){
					  $(this).hide('slow');
					  });
					
					</script>
<?php
	}
	?>
<!-- ----------------------------------------------END NEW DEPARTMENTS JS----------------------------------- -->
<!-- ----------------------------------------------EDIT DEPARTMENT JS START--------------------------------- -->
<?php
	if ($query2ans == 'edit_departments') {
		?>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/chosen.jquery.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.autosize-min.js'?>"></script>
<script type="text/javascript">
						$(function() {
							$('textarea[class*=autosize]').autosize({append: "\n"});
							});
					</script>

<script>
					
					  $("#hide").click(function(){
					    $("#hide").hide('slow');
					  });
					  
					  $(".hide1").click(function(){
					  $(this).hide('slow');
					  });
					
					</script>
<?php
	}
	?>
<!-- ----------------------------------------------END EDIT DEPARTMENT JS----------------------------------- -->
<!-- ----------------------------------------------CHANGE PASSWORD JS START--------------------------------- -->
<?php
	if ($query2ans == 'change_pass') {
		?>
<script>
					
					  $("#hide").click(function(){
					    $("#hide").hide('slow');
					  });
					  
					  $(".hide1").click(function(){
					  $(this).hide('slow');
					  });
					
					</script>
<?php
	}
	?>
<!-- ----------------------------------------------END CHANGE PASSWORD JS----------------------------------- -->
<!-- ----------------------------------------------PROFILE JS START----------------------------------------- -->
<?php
	if ($query2ans == 'profile') {
		?>
<script>
					
					  $("#hide").click(function(){
					    $("#hide").hide('slow');
					  });
					  
					  $(".hide1").click(function(){
					  $(this).hide('slow');
					  });
					
					</script>
<?php
	}
	?>
<!-- ----------------------------------------------END PROFILE JS END--------------------------------------- -->
<!-- ----------------------------------------------LEAVES JS START------------------------------------------ -->
<?php
	if ($query2ans == 'leaves') {
		?>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery-ui-1.10.3.custom.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/chosen.jquery.min.js'?>"></script>


<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/bootstrap-datepicker.min.js'?>"></script>


<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/moment.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/daterangepicker.min.js'?>"></script>


<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.autosize-min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.maskedinput.min.js'?>"></script>

<script type="text/javascript">
					$(function() {
						
						$('#id-date-range-picker-1').daterangepicker().prev().on(ace.click_event, function(){
							$(this).next().focus();
						});
					});
				</script>
<script>
					
					  $("#hide").click(function(){
					    $("#hide").hide('slow');
					  });
					  
					  $(".hide1").click(function(){
					  $(this).hide('slow');
					  });
					
				</script>
<?php
	}
	?>
<!-- ----------------------------------------------LEAVES JS END-------------------------------------------- -->
<!-- ----------------------------------------------SETTING JS START----------------------------------------- -->
<?php
	if ($query2ans == 'setting') {
		?>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/bootstrap-datepicker.min.js'?>"></script>

<script type="text/javascript">
					$(function() {
						
						$('.date-picker').datepicker().next().on(ace.click_event, function(){
							$(this).prev().focus();
						});
					});
				</script>

<script>
					
					  $("#hide").click(function(){
					    $("#hide").hide('slow');
					  });
					  
					  $(".hide1").click(function(){
					  $(this).hide('slow');
					  });
					
				</script>
<?php
	}
	?>
<!-- ----------------------------------------------END SETTING JS ----------------------------------------- -->
<!-- ----------------------------------------------OFFICE MANAGEMENT JS START------------------------------ -->
<?php
	if ($query2ans == 'office_management') {
		?>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery-ui-1.10.3.custom.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/chosen.jquery.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/bootstrap-datepicker.min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/bootstrap-timepicker.min.js'?>"></script>

<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/daterangepicker.min.js'?>"></script>


<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.autosize-min.js'?>"></script>
<script
	src="<?php echo SITE_URL.'/assets/backend/js/jquery.maskedinput.min.js'?>"></script>
<script type="text/javascript">
					$(function() {
						$('#timepicker1').timepicker({
							minuteStep: 1,
							showSeconds: true,
							showMeridian: false
						})
						$('#timepicker2').timepicker({
							minuteStep: 1,
							showSeconds: true,
							showMeridian: false
						})
						$('#timepicker3').timepicker({
							minuteStep: 1,
							showSeconds: true,
							showMeridian: false
						})
						$('#timepicker4').timepicker({
							minuteStep: 1,
							showSeconds: true,
							showMeridian: false
						})
						$('#timepicker5').timepicker({
							minuteStep: 1,
							showSeconds: true,
							showMeridian: false
						})
						$('#timepicker6').timepicker({
							minuteStep: 1,
							showSeconds: true,
							showMeridian: false
						})
					});
				</script>

<script>
					
					  $("#hide").click(function(){
					    $("#hide").hide('slow');
					  });
					  
					  $(".hide1").click(function(){
					  $(this).hide('slow');
					  });
					
				</script>

<?php
	}
	?>
<!-- ----------------------------------------------END OFFICE MANAGEMENT JS-------------------------------- -->
<!-- ----------------------------------------------ATTENDENCE JS START------------------------------------- -->
<?php
	if ($query2ans == 'attendence' || $query2ans == 'employee_preview' || $query2ans == 'salary_slip_format') {
		?>
<script src="<?php echo SITE_URL.'/assets/backend/js/bootbox.min.js'?>"></script>
<!-- <script src="<?php echo SITE_URL.'/assets/backend/js/date-time/daterangepicker.min.js'?>"></script>-->
<script
	src="<?php echo SITE_URL.'/assets/backend/js/date-time/bootstrap-datepicker.min.js'?>"></script>


<script>

			$("#set").change(function(){
				
				  var str= $("#set option:selected").val();
				
				  if(str == 'absent')
				  {
					 $(".range1").hide(2000);
					 $("#date").show(2000);
					 $(".second").show(2000);
				  }
				  else
				  {
					  $(".second").hide(2000);
					  
					  $(".range1").show(2000);
				  }
				});
			
			

			$("#example").modal({show:false});

			
			</script>

<script type="text/javascript">
					$(function() {
						
						$('.date-picker').datepicker().next().on(ace.click_event, function(){
							$(this).prev().focus();
						});
						
					});
			</script>

<script>
				$(document).ready(function(){
				  $("#hide").click(function(){
				    $("#hide").hide('slow');
				  });
				  
				  $(".hide1").click(function(){
				  $(".hide1").hide('slow');
				  });
				});
			</script>

<?php
	}
	?>
<!-- ----------------------------------------------END ATTENDENCE JS--------------------------------------- -->
<?php
	
	if ($query2ans != 'employee_attendence' && $query2ans != 'payment_details' 
			&& $query2ans != 'employee_details' && $query2ans != 'client_details' 
			&& $query2ans != 'salary_slip' && $query2ans != 'salary_slip_format' 
			&& $query2ans != 'singaporetable' && $query2ans != 'view_inventory' 
			&& $query2ans != 'view_location' && $query2ans != 'view_loan' && $query2ans != 'previous_payslip') {
		?>
<!-- -----------------------------------------------MAIN JS START------------------------------------------------->
<script type="text/javascript">
			$(function() {
				$('.easy-pie-chart.percentage').each(function(){
			 		var $box = $(this).closest('.infobox');
					var barColor = $(this).data('color') || (!$box.hasClass('infobox-dark') ? $box.css('color') : 'rgba(255,255,255,0.95)');
					var trackColor = barColor == 'rgba(255,255,255,0.95)' ? 'rgba(255,255,255,0.25)' : '#E2E2E2';
					var size = parseInt($(this).data('size')) || 50;
					$(this).easyPieChart({
						barColor: barColor,
						trackColor: trackColor,
						scaleColor: false,
						lineCap: 'butt',
						lineWidth: parseInt(size/10),
						animate: /msie\s*(8|7|6)/.test(navigator.userAgent.toLowerCase()) ? false : 1000,
						size: size
					});
				})
			
				$('.sparkline').each(function(){
					var $box = $(this).closest('.infobox');
					var barColor = !$box.hasClass('infobox-dark') ? $box.css('color') : '#FFF';
					$(this).sparkline('html', {tagValuesAttribute:'data-values', type: 'bar', barColor: barColor , chartRangeMin:$(this).data('min') || 0} );
				});
			
			
			
			
			  var placeholder = $('#piechart-placeholder').css({'width':'90%' , 'min-height':'150px'});
			  var data = [
				{ label: "social networks",  data: 38.7, color: "#68BC31"},
				{ label: "search engines",  data: 24.5, color: "#2091CF"},
				{ label: "ad campaings",  data: 8.2, color: "#AF4E96"},
				{ label: "direct traffic",  data: 18.6, color: "#DA5430"},
				{ label: "other",  data: 10, color: "#FEE074"}
			  ]
			  function drawPieChart(placeholder, data, position) {
			 	  $.plot(placeholder, data, {
					series: {
						pie: {
							show: true,
							tilt:0.8,
							highlight: {
								opacity: 0.25
							},
							stroke: {
								color: '#fff',
								width: 2
							},
							startAngle: 2
						}
					},
					legend: {
						show: true,
						position: position || "ne", 
						labelBoxBorderColor: null,
						margin:[-30,15]
					}
					,
					grid: {
						hoverable: true,
						clickable: true
					}
				 })
			 }
			 drawPieChart(placeholder, data);
			
			 /**
			 we saved the drawing function and the data to redraw with different position later when switching to RTL mode dynamically
			 so that's not needed actually.
			 */
			 placeholder.data('chart', data);
			 placeholder.data('draw', drawPieChart);
			
			
			
			  var $tooltip = $("<div class='tooltip top in hide'><div class='tooltip-inner'></div></div>").appendTo('body');
			  var previousPoint = null;
			
			  placeholder.on('plothover', function (event, pos, item) {
				if(item) {
					if (previousPoint != item.seriesIndex) {
						previousPoint = item.seriesIndex;
						var tip = item.series['label'] + " : " + item.series['percent']+'%';
						$tooltip.show().children(0).text(tip);
					}
					$tooltip.css({top:pos.pageY + 10, left:pos.pageX + 10});
				} else {
					$tooltip.hide();
					previousPoint = null;
				}
				
			 });
			
			
			
			
			
			
				var d1 = [];
				for (var i = 0; i < Math.PI * 2; i += 0.5) {
					d1.push([i, Math.sin(i)]);
				}
			
				var d2 = [];
				for (var i = 0; i < Math.PI * 2; i += 0.5) {
					d2.push([i, Math.cos(i)]);
				}
			
				var d3 = [];
				for (var i = 0; i < Math.PI * 2; i += 0.2) {
					d3.push([i, Math.tan(i)]);
				}
				
			
				var sales_charts = $('#sales-charts').css({'width':'100%' , 'height':'220px'});
				$.plot("#sales-charts", [
					{ label: "Domains", data: d1 },
					{ label: "Hosting", data: d2 },
					{ label: "Services", data: d3 }
				], {
					hoverable: true,
					shadowSize: 0,
					series: {
						lines: { show: true },
						points: { show: true }
					},
					xaxis: {
						tickLength: 0
					},
					yaxis: {
						ticks: 10,
						min: -2,
						max: 2,
						tickDecimals: 3
					},
					grid: {
						backgroundColor: { colors: [ "#fff", "#fff" ] },
						borderWidth: 1,
						borderColor:'#555'
					}
				});
			
			
				$('#recent-box [data-rel="tooltip"]').tooltip({placement: tooltip_placement});
				function tooltip_placement(context, source) {
					var $source = $(source);
					var $parent = $source.closest('.tab-content')
					var off1 = $parent.offset();
					var w1 = $parent.width();
			
					var off2 = $source.offset();
					var w2 = $source.width();
			
					if( parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2) ) return 'right';
					return 'left';
				}
			
			
				$('.dialogs,.comments').slimScroll({
					height: '300px'
			    });
				
				
				//Android's default browser somehow is confused when tapping on label which will lead to dragging the task
				//so disable dragging when clicking on label
				var agent = navigator.userAgent.toLowerCase();
				if("ontouchstart" in document && /applewebkit/.test(agent) && /android/.test(agent))
				  $('#tasks').on('touchstart', function(e){
					var li = $(e.target).closest('#tasks li');
					if(li.length == 0)return;
					var label = li.find('label.inline').get(0);
					if(label == e.target || $.contains(label, e.target)) e.stopImmediatePropagation() ;
				});
			
				$('#tasks').sortable({
					opacity:0.8,
					revert:true,
					forceHelperSize:true,
					placeholder: 'draggable-placeholder',
					forcePlaceholderSize:true,
					tolerance:'pointer',
					stop: function( event, ui ) {//just for Chrome!!!! so that dropdowns on items don't appear below other items after being moved
						$(ui.item).css('z-index', 'auto');
					}
					}
				);
				$('#tasks').disableSelection();
				$('#tasks input:checkbox').removeAttr('checked').on('click', function(){
					if(this.checked) $(this).closest('li').addClass('selected');
					else $(this).closest('li').removeClass('selected');
				});
				
			
			})
		</script>
<?php }?>
<?php }?>
<!---------------------------------------------------END MAIN SRCIPT------------------------------------------------->
<script type="text/javascript">
$('#hide-pay-amount').hide();

$('select[name="installment"]').change(function() {
    if ($(this).find('#installment_yes').is(':selected')){
    	$('#hide-pay-amount').show();
       
    }
});
$('select[name="installment"]').change(function() {
    if ($(this).find('#installment_no').is(':selected')){
    	$('#hide-pay-amount').hide();
    	
    }
    
});

/*$('#add-content').click(function(){
	$('#hide-pay-amount').append('<div class="row-fluid"><div class="span12"><div class="span6"><div class="control-group"><label class="control-label">Payment Amount </label><div class="controls"><input name="payment_amount" class="span12" type="text" value=""/></div></div></div><div class="span6"><div class="control-group"><label class="control-label">Payment Date </label><div class="controls"><div class="input-append"><input name="payment_date" class="span12 date-picker-2" id="" type="text" data-date-format="dd-mm-yyyy" value="<?php if($edit_id['0']=='edit_id') echo $get_inventory['payment_date']; else echo $payment_date;?>"/><span class="add-on"><i class="icon-calendar"></i></span></div></div></div></div></div></div>');
});
*/

/*
var rowNum = 0;
function addRow(frm) {
	
rowNum ++;
var row = '<p id="rowNum'+rowNum+'"><div class="row-fluid"><div class="span12"><div class="span6"><div class="control-group"><label class="control-label">Payment Amount </label><div class="controls"><input name="payment_amount[]" class="span12" type="text" value="'+frm.payment_amount.value+'"/></div></div></div><div class="span6"><div class="control-group"><label class="control-label">Payment Date </label><div class="controls"><div class="input-append"><input name="payment_date[]" class="span12" id="date-picker2" type="text" data-date-format="dd-mm-yyyy" value="'+frm.payment_date.value+'"/><span class="add-on"><i class="icon-calendar"></i></span></div></div></div></div></div></div></p>';
$('#hide-pay-amount').append(row);
frm.payment_amount.value = '';
frm.payment_date.value = '';
}	*/	

</script>

</body>
</html>