Javascript if/or comparison seems to spill into function call?
<p>I'm absolutely stymied by this. On the line where I call "setCookie", if the second function parameter is the same (i.e. "art") as the current_cat OR comparison above it, that whole if statement breaks (and the function isn't called inside it). If I change the parameter so it doesn't match (i.e. "art_z"), then the code works. Problem happens with multiple "if" blocks; but the code works with just one "if" block. No amount of hacks could solve this - any ideas? Thanks so much in advance.</p>

<pre><code>    var current_cat = getCookie("FOF_CURRENT_CATEGORY");

    if (menuitem == "menu_art" || current_cat == "art")  
    { 
    document.getElementById("menu_arc").className = "amble12graylight";
    document.getElementById("menu_art").className = "amble14blackregular";
    document.getElementById("menu_des").className = "amble12graylight";  
    document.getElementById("menu_fas").className = "amble12graylight";  
    document.getElementById("menu_sch").className = "amble12graylight";
    document.getElementById("menu_man").className = "amble12graylight";  
    setCookie("FOF_CURRENT_CATEGORY","art",365);
    }

    if (menuitem == "menu_arc" || current_cat == "arc")  
    { 
    document.getElementById("menu_arc").className = "amble14blackregular";
    document.getElementById("menu_art").className = "amble12graylight";
    document.getElementById("menu_des").className = "amble12graylight";  
    document.getElementById("menu_fas").className = "amble12graylight";  
    document.getElementById("menu_sch").className = "amble12graylight";
    document.getElementById("menu_man").className = "amble12graylight";  
    setCookie("FOF_CURRENT_CATEGORY","arc",365);
    }
</code></pre>
