What OS verison are you running? Do you have any 3rd party apps that might be causing the problem (such as Quickeys)? If your on OSX 10.3 or above, you can start up in Safe Mode, this will disable any non essential items. If you have no problems in Safe Mode, then you know it's a 3rd party app of some sort. Here are the instructions:
During some troubleshooting procedures, you may need to start up in Safe Mode (also called a Safe Boot). In Safe Mode, only required items in the Startup Items and Extensions folders are loaded.
Note: This procedure requires you to turn off your computer. You may want to print this page for reference.
1 Shut down the computer.
2 Press the Power button.
3 Immediately after you hear the startup tone, press and hold the Shift key.
4 Release the Shift key when the spinning progress indicator appears below the gray apple on the screen.
Some features or applications may not work in Safe Mode, and startup may take longer than usual. You should only use Safe Mode if you need to troubleshoot a problem starting up your computer.
To leave Safe Mode, restart the computer normally.