////////////////////////////////////////////////////////////////////////////////////////////////
//Function by Amol Patil
    // following function will only allow the permitted characters into textbox

        function keyRestrict(e, validchars)
     {
        var key = '', keychar = '';
        key = getKeyCode(e);
        if (key == null) return true;
        keychar = String.fromCharCode(key);
        keychar = keychar.toLowerCase();
        validchars = validchars.toLowerCase();
        if (validchars.indexOf(keychar) != -1)
            return true;
        if (key == null || key == 0 || key == 8 || key == 9 || key == 13 || key == 27)
            return true;
        return false;
    }

    function getKeyCode(e) {
        if (window.event)
            return window.event.keyCode;
        else if (e)
            return e.which;
        else
            return null;
    }



////////////////////////////////////////////////////////////////////////////////////////////////
//Function by Amol Patil
    // following function will limit the max length of textbox

    function limitCharsLength(Object, MaxLen, e, validchars) 
    {

        if (Object.value.length > MaxLen - 1) 
        {

            Object.value = Object.value.substring(0, MaxLen);

        }
        var key = '', keychar = '';
        key = getKeyCode(e);
        if (key == null) return true;
        keychar = String.fromCharCode(key);
        keychar = keychar.toLowerCase();
        validchars = validchars.toLowerCase();
        if (validchars.indexOf(keychar) != -1)
            return true;
        if (key == null || key == 0 || key == 8 || key == 9 || key == 13 || key == 27)
            return true;
        return false;

    }


////////////////////////////////////////////////////////////////////////////////////////////////
//Function by Amol Patil
// Function to disable month dropdown if fresher selected in year dropdown

        function month() 
        
        {
            if (document.getElementById('Drp_year').value == '30 +')
             {
                document.getElementById("drp_month").style.display = 'none';
            }
            else
            {
                document.getElementById("drp_month").style.display = 'inline'; 
            }
            return false;
        }


      