Javascript Replaces most PHP