javascript replaceall not a function