Changing the color of text

I want to change the color of the NOAA warning when there is actual warning to red text. My java script validator says there are no syntax errors, but it does not work and I do not know why. Normally the blue would be black but was set to blue to see if it works. My limited knowledge of java script and programing in general I think it should work, fiddled with it all weekend with no joy…

<script>
 (var NOAAThreshold = document.getElementById('NOAA'));
    if (val  NOAAThreshold == ('AZZ544 There are no active watches, warnings or advisories');{
      document.getElementById('NOAA').style.color= 'blue'; }
       )
  else {
      // if val  NOAAThreshold != ('AZZ544 There are no active watches, warnings or advisories');
       document.getElementById('NOAA').style.color= 'red'; }
</script>
 </head>

<span id="NOAA">  [i]"noaaraw tag"[/i] AZZ544 There are no active watches, warnings or advisories</span>

Not sure, but have a look here. I think with some revisions your script will work.