generalmente dovresti cavartela così:

codice:
<script language="javascript">
<!--
var screen_width = null;
var screen_height = null;
screen_width = screen.width;
screen_height = screen.height;
alert("La risoluzione è di "+screen_width+"x"+screen_height+"pixel.");
// -->
</script>
ciao