car idleing up and down 600rpms to 1600rpms on 1996 Lexus LS400

while driving the battery light came on and the dash board lights dimmed and the radio turned off. Turned car off and when started back up it reved/idled up and down constantly on its own.

Asked by for the 1996 Lexus LS400