//KMI - added to check length of multi line textbox's
function doKeypress(control,len){
    maxLength = len;
    value = control.value;
     if(maxLength && value.length > maxLength-1){
          event.returnValue = false;
          maxLength = parseInt(maxLength);
     }
}

function doBeforePaste(control,len){
    maxLength = len;
     if(maxLength)
     {
          event.returnValue = false;
     }
}

function doPaste(control,len){
    maxLength = len;
    value = control.value;
     if(maxLength){
          event.returnValue = false;
          maxLength = parseInt(maxLength);
          var oTR = control.document.selection.createRange();
          var iInsertLength = maxLength - value.length + oTR.text.length;
          var sData = window.clipboardData.getData("Text").substr(0,iInsertLength);
          oTR.text = sData;
     }
}
