newchar.php: Bug #2 (3)

fixed the JS bug introduced in last update.