Split string at index field length or just before that if there is white space
Your indentation is a bit off here, with the true case of the if being indented one extra level. The else case is missing its brackets, which is probably the cause of confusion.

    var firstRight = firstLine.substring(13);
    if(firstRight.indexOf(' ')&gt;-1) 
        {
            //If There is white space, break the line at it
           instr = firstLeft+firstRight.substr(0,firstRight.indexOf(' '))+" \n"+firstRight.substr(firstRight.indexOf(' ')+1);
        }
    else
        //else just split the string, according to the field size
        instr = instr.substring(0,fieldSize)+"\n "+instr.substring(fieldSize);
    }


Aside from that, you call firstRight.indexOf(' ') three times, and you'd be better off placing this in a separate variable.