﻿function focusControl(ControlName){
   var obj=document.getElementById(ControlName);
   if (obj!=null){
      obj.focus();
   }
}

function ChangeFocusWhenMaxLenghtReached(e,SourceInput, DestinationInput) {
    var KeyID = (window.event) ? event.keyCode : e.keyCode;
    if (KeyID >= 32) {
        var obj = document.getElementById(SourceInput);
        if (obj != null) {
            if (obj.maxLength == obj.value.length) {
                focusControl(DestinationInput);
            }
        }
    }
    
}

