localStorage['serviceURL'] = "http://localhost/test/kotz/hr/";
var serviceURL =localStorage['serviceURL'] ;
var serviceURLHR =localStorage['serviceURLHR'];
var id = getUrlVars()["employee_id"];
employeereportses();
function getUrlVars() {
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for(var i = 0; i < hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
   }
       return vars;
                     }

function employeetimesheet(pagenum){ 
var month=$("month").val();
var year=$("year").val();
var employees=$("employees").val();
	$.ajax({
   url: serviceURLHR+"timesheet_individuals.php?page="+pagenum+"&month="+month+"&year="+year+"&employees="+employees,
   success: function(data){
	   $("#employeetimesheet" ).html(data);
   }
 });	
}
function  pagination(pagenum,ingredient,divname)
{
var month=$("month").val();
var year=$("year").val();
var employees=$("employees").val();
$.ajax({
   url: serviceURLHR+"timesheet-individualpagination.php?page="+pagenum+"&month="+month+"&year="+year+"&employees="+employees,
   success: function(data){
	 
          $("#"+divname+"" ).html(data);
	 
   }
 });	
}
function gonextpage(page)
{ 
	employeetimesheet(page);
}

function dropdownval(num,ing)
{
	$.ajax({
   url: serviceURLHR+"dropdownvalue.php?table=employee&field1=e_fname&field2=e_id&ingvalue="+ing,
   success: function(data){
     $("#employees").html(data);
   }
 });	
}
