I didn't create this Java-Script, I took it from Humberto M. Gonzalez. I tried to get in contact with him, but without any success. So, I give him credit for the following.
1Uses partial pivoting. 2On output A contains upper triangular U and permuted version of strictly lower triangular I - L.