I have a text area

HTML Code:
<textarea name="InversemultipleInputs" 
              rows="10" style="width: 506px"></textarea>
On button click I pass it to a JS function

HTML Code:
<input value="COMPUTE MULTI LINE" onclick="var t = SomeFunction(document.inverse.InversestartingPoint.value, document.inverse.InversemultipleInputs.value, document.inverse.format[1].checked, document.inverse.prec.selectedIndex); 
			document.inverse.statusInverseMultipleMethod.value = t.status; 
			document.inverse.resultsInverseMultipleMethod.value = t.s12;" type="button" />
This is the area of the function that i have to split the textarea input

Code:
function SomeFunction(startingPoint,input, dmsformat, prec) {
    
    if (document.all) {
        lines = input.split("\r\n");
    }
    else {
        lines = input.split("\n");
    }
When i show the lines variable it looks the same before and after it is split. I loop through the lines after the split but it reads the whole textarea like it is one line. I don't see why the code is not split in the input.