so gehts:
<script language="JavaScript">
<!--
function screenw()
{ // der Navigator hat teilweise Schwierigkeiten mit der Bildschirmbreite, deshalb: getrennte Auswertung
if (document.all) {
document.write("<h2>Die Zahlen sind nur evt korrekt!!!!</h2>Aufloesung: " + screen.width + " x " + screen.height + ", bei " + screen.colorDepth + " Bit Farbtiefe, davon frei verfuegbar: " + screen.availWidth + " x " + screen.availHeight);}
else {
if (screen.width < 640) { alert("Unter 640x480 bei " +screen.colorDepth + "Bit")}
if (screen.width >= 640 && screen.width < 800) { alert("640x480 bei " +screen.colorDepth + "Bit")};
if (screen.width >= 800 && screen.width < 1024) { alert("800x600 bei " +screen.colorDepth + "Bit")};
if (screen.width >= 1024 && screen.width < 1152) { alert("Mindestens 1024x768, bei " +screen.colorDepth + "Bit")};
if (screen.width >= 1152) { alert("Über 1152x864 bei " +screen.colorDepth + "Bit")};
}
}
screenw();
// -->
</script>