MKay: Warum funktioniert innerHTML nicht?

Beitrag lesen

Hallo, ich versuche folgendes zu bewerkstelligen(zwischen <head>):

<script type="text/javascript">
if(screen.width <= 1280)
{
document.all.STYLA.innerHTML="<style type='text/css'><!-- body {background-attachment: fixed; background-image: url(images/back.jpg); background-repeat: repeat; background-position: -200px -100px;}--></style>}"
else
{
document.all.STYLA.innerHTML="<style type='text/css'><!-- body {background-attachment: fixed; background-image: url(images/back2.jpg); background-repeat: repeat; background-position: -200px -100px;}--></style>}"
}
</script>
<div id="STYLA"></div>
</head>

Das ganze soll 2 verschiedene Hintergrundbilder für die Seite laden, je nach Auflösung, aber es klappt einfach nicht :(

Danke für eure Hilfe im Voraus!