Photoshop can also be used to code your layout.
There is a tool called Slice tool where you actually slice your layout and define the images and the spaces where ou are going to put your text, once you sliced all you just "save for web" (under save) and it saves as an html page and it cuts all the images you sliced.
I think thats what they do, than they modify the script by adding some .css to it, and than they are done