
function isAlpha(evt)//onkeypress="return isAlpha(event)"
{
    var keyCode = evt.which ? evt.which : evt.keyCode;
    if ((keyCode >= 'a'.charCodeAt() && keyCode <= 'z'.charCodeAt()) || (keyCode >= 'A'.charCodeAt() && keyCode <= 'Z'.charCodeAt()) || (keyCode >= 8 && keyCode <= 46))
        return true;
    return false;
}


function digitonly(input, evt)//onkeypress="return digitonly(this,event)"
{
    var keyCode = evt.which ? evt.which : evt.keyCode;
    var lisShiftkeypressed = evt.shiftKey;

    if (lisShiftkeypressed && parseInt(keyCode) != 9) {
        return false;
    }
    if ((parseInt(keyCode) >= 48 && parseInt(keyCode) <= 57) || keyCode == 37/*LFT ARROW*/ || keyCode == 39/*RGT ARROW*/ || keyCode == 8/*BCKSPC*/ || keyCode == 46/*DEL*/ || keyCode == 9/*TAB*/) {
        return true;

    }

    return false;

}


function allKey(input, evt)//onkeypress="return digitonly(this,event)"
{
    return false;
}


function leftTrim(element) {
    if (element)
        element.value = element.value.replace(/^\s+/, "");
}



function convertToCaps(field) {

    
    field.value = field.value.substr(0, 1).toUpperCase() + field.value.substr(1);

}


