<script>
var resizefunc = [];
</script>
<script src="<?php echo ASSEST_URL; ?>assets/js/final.js"></script>
<script type="text/javascript" src="<?php echo ASSEST_URL; ?>assets/js/bootstrap-datepicker.min.js"></script>
<script>
$(document).ready(function() {
	 $('#datatable').DataTable({});
	 $('#datatable1').DataTable({});
	jQuery('.datepicker').datepicker({
				autoclose: true,
				format: "yyyy-mm-dd",
				todayHighlight: true
		});
	jQuery('.schdatepicker').datepicker({
			autoclose: true,
			format: "yyyy-mm-dd",
			todayHighlight: true,
			startDate: new Date()
    });		
});
$('body').on('focus',".dobdatepicker", function(){
    if( $(this).hasClass('hasDatepicker') === false )  {
        $(this).datepicker({
			autoclose: true,
			format: "yyyy-mm-dd",
			todayHighlight: true,
			endDate: new Date()
    });
    }
});

</script>

<script>
var a = document.querySelectorAll(".sidebar-inner li.has_sub a");
for (var i = 0, length = a.length; i < length; i++) {
  a[i].onclick = function() {
    var b = document.querySelector(".sidebar-inner li.drop");
	if(b==this.parentNode)
		{
			b.classList.remove("drop");	
		} else {
			if (b) b.classList.remove("drop");
			this.parentNode.classList.add('drop');
		}
  };
}
window.onload = function() {
	var url = window.location.pathname;
	var filename = url.substring(url.lastIndexOf('/')+1);
	//	alert(filename);
	var links = document.querySelectorAll('.sidebar-inner a');
	for(var i = 0; i< links.length; i++){
	var sdmenuanc = links[i].href.substring(links[i].href.lastIndexOf('/')+1);
	  if(sdmenuanc==filename)
		{	
				links[i].parentNode.parentNode.parentNode.classList.add("drop");
				links[i].parentNode.classList.add("active");	
		}
	}
};
</script>
 









