remove style control code from JavaScript