function loadPopupModal(url,title,size){
    var options = {
        url: url,
        title:title,
        size: size,
        buttons:false,
    };
    eModal.ajax(options);
}
var d = new Date();
//d.setDate(d.getDate() - 180);
d.setFullYear( d.getFullYear() - 17);
var _commonFunctions =function(){
    $('.datepicker').datetimepicker({
        format: 'DD/MM/YYYY',
         maxDate: d.toLocaleString(),
        // debug: true,
        tooltips: {
            today: 'Go to today',
            clear: 'Clear selection',
            close: 'Close the picker',
            selectMonth: 'Select Month',
            prevMonth: 'Previous Month',
            nextMonth: 'Next Month',
            selectYear: 'Select Year',
            prevYear: 'Previous Year',
            nextYear: 'Next Year',
            selectDecade: 'Select Decade',
            prevDecade: 'Previous Decade',
            nextDecade: 'Next Decade',
            prevCentury: 'Previous Century',
            nextCentury: 'Next Century'
        }
    });
    $('.datetimepicker').datetimepicker({
        format: 'DD/MM/YYYY hh:mm a',
        showClose: true,
        showTodayButton: true,
        toolbarPlacement: 'top',
        // debug: true,
        tooltips: {
            today: 'Go to today',
            clear: 'Clear selection',
            close: 'Close the picker',
            selectMonth: 'Select Month',
            prevMonth: 'Previous Month',
            nextMonth: 'Next Month',
            selectYear: 'Select Year',
            prevYear: 'Previous Year',
            nextYear: 'Next Year',
            selectDecade: 'Select Decade',
            prevDecade: 'Previous Decade',
            nextDecade: 'Next Decade',
            prevCentury: 'Previous Century',
            nextCentury: 'Next Century'
        }
    });
    $('.m-select').multiselect({
        enableClickableOptGroups: true,
        enableCollapsibleOptGroups: true,
        enableFiltering: true,
        includeSelectAllOption: true,
        enableCaseInsensitiveFiltering: true,
    });
}
$(_commonFunctions);
$(window).ajaxComplete(_commonFunctions);