updating javascript main.php