function isNumberKey(evt)
{
    var charCode = (evt.which) ? evt.which : event.keyCode
   if (charCode > 31 && (charCode < 48 || charCode > 57))
    {
        return false;
    }
    else
    {
        return true;
    }
}
      
function isDateFormat(evt)
{
    var charCode = (evt.which) ? evt.which : event.keyCode
   if (charCode > 31 && (charCode < 47 || charCode > 57))
    {
        return false;
    }
    else
    {
        return true;
    }
}


function textCounter(field,cntfield,maxlimit) 
{
    if (field.value.length > maxlimit)
    {
        field.value = field.value.substring(0, maxlimit);
    }
    else
    {
        cntfield.value = maxlimit - field.value.length;
    }
}