Have you restarted? Do the regular arrow keys work? Have you tried restoring the default keyboard shortcuts in the Keyboard & Mouse pane of System Preferences?
I have noticed that on some sites I have to click on the page before Home and End work. I don't know why this is so but you could give it a try. Do the Page keys not work anywhere in Safari?
Well, Pacifist should allow you to reinstall Safari from the OSX discs. Alternatively, you could reinstall the latest combo update for your machine. Depending on what sort of iMac you have and what OS you're running, I can provide you with a link.
I have now updated to 10.4.9 and reinstalled safari... It's still not working for me. It did for a few seconds then died. I really want to use Safari, I prefer the way it handles pages and text.