Another method you may want to consider is just serving up an alternative site or CSS based on the detected screen resolution. For example:

Code:
function detectRes() {
if (screen.width < 400) location.replace('http://mobile.epiphanet.com');
}
or for CSS based...
Code:
if (screen.width < 400) {
document.write('<link rel="stylesheet" href="mobile.css"
...