Shawn has a great post and a wonderful little graphic (shown below) related to resisting temptation.
No temptation has seized you except what is common to man. And God is faithful; he will not let you be tempted beyond what you can bear. But when you are tempted, he will also provide a way out so that you can stand up under it. (1 Corinthians 10.13)