If you stick with XHTML then you must set your Content-Type appropriately to prevent it being parsed as malformed HTML. Read this list of common coding errors and follow the links on the section about XHTML.
The use of Javascript to provide different pages based on screen size is a monumentally bad idea. It means you have to maintain n different versions of your page every time you make an update, and also disallows anyone without Javascript from viewing your page. If you code it properly in the first place, the page will resize itself appropriately.
You should have been validating your page as you coded, rather than leaving it to the last minute. When you know how to write mostly-correct pages without the aid of the validator then you can afford to do that, but until then you should validate after every new change (and check my list, too!).
bluewalrus: don't pixel-size your fonts, and don't use fonts without providing a generic font family on which to fall back (especially with weird and wacky fonts: I don't have a 'Century Gothic' font, and my computer wouldn't have a clue what to render instead if you don't provide it with one). The layout shouldn't be pixel-sized either. Does nobody read my links? I created that list precisely that I wouldn't have to type this out for every new page. That page still doesn't work without Javascript.
Bookmarks