$('#chooseEmp').live('change', function () {
    var val = $(this).val();

    if (val === '0' || val === '') {
        alert('aaaaaaaaa');
    } else {
        $('#search_Me').submit();
    }
});


$(document).ready(function () {

    var empSalary = Number($('#empSalary').val());
    var bonuses = Number($('#bonuses').val());
    var houseAllowance = Number($('#houseAllowance').val());
    var payAdvances = Number($('#payAdvances').val());
    var transportationAllowance = Number($('#transportationAllowance').val());
    var otherAllowance = Number($('#otherAllowance').val());

    var eradat = empSalary + bonuses + houseAllowance + payAdvances + transportationAllowance + otherAllowance;

    var absence_delay = Number($('#absence_delay').val());
    var discounts = Number($('#discounts').val());
    var withdrawals = Number($('#withdrawals').val());
    var predecessor = Number($('#predecessor').val());
    var permission = Number($('#permission').val());
    var leave = Number($('#leave').val());

    var disco = absence_delay + discounts + withdrawals + predecessor + permission + leave;

    var sub = eradat - disco;
    if (sub === '') {
        document.getElementById('miniteLateCost').innerHTML = 0;

    } else {
        document.getElementById('miniteLateCost').innerHTML = sub;
    }
});