missing parenthesis error in javascript
<p>I am using this function:</p>

<pre><code>function sel_test(e) {
  //alert(e.length-1);

  var splitdata = e.split("d");
  var newstr = e.substring(0,e.length-1);

  dropcall = 1;
  nodes = newstr.split(';');
  o = 0;
  if (nodes[0] == '1') o = nodes.shift();
  for (i=0;i&lt;nodes.length;i++) {
    e = nodes[i];
    var ul = document.getElementById(e);
    if (icons) var img = document.getElementById(e+'i');
    if (ul) {
      if (((ul == 'none') AND (ul.style.display == 'none')) OR (ul.style.display == '')) {
        ul.style.display = 'block';
      } else if (!o) {
        ul.style.display = 'none';
      }
    }
  }
</code></pre>

<p>javascript is giving me an error of missing parenthesis:</p>

<p><code>if (((ul == 'none') AND (ul.style.display == 'none')) OR (ul.style.display == '')) {</code></p>

<p>what this the correct way of doing this.</p>
