uninstalling mac os x


well...I installed mac os x a while ago and it worked great. Then I deleted it by dragging everything related into the trash. And now everytime I try to reinstall it all is corrupted and all the apps don't work. I was hoping that someone could tell me how to uninstall os x the real way so I can reinstall os x. Hopfully that will fix my problems.

-thanks so much!