problem with parallax ping
Please try to format the program code with code sample button.

Your code seems to be correct, I could use it with my Duemilanove and Parallax Ping.
Are the wires of the Ping correctly connected? 5 V to 5 Volt, GND to ground and SNG to Pin 7?