TOKYO - Japan's parliament on Friday enacted revised laws to replace a controversy-plagued foreign trainee program with a new system that encourages workers from abroad to stay longer, as authorities look to address the serious labor shortage created by the country's demographic crisis.