How do I incorporate the "or" operator into my javascript array code?
<p>I am using the <strong>javascript</strong> code below to hide/how section based on project type selected.  The value in the array below is the value selected from a dropbox.  The id below is the section/fieldset id [i know they are numeric, but that's the way we got the app, so stuck with it right now]. I want to have multiple values like this:</p>

<p>value: "Ad", value: "brochure", value: "Bus wrap"</p>

<p>so basically I want to say: if <strong>value</strong> equals Ad <strong>or</strong> Brochure <strong>or</strong> Bus Wrap, display id 838.  I can't get this to work.  How do I incorporate the "or" operator into this code?</p>

<pre><code>//Project Types
var projectTypes = new Array (
    {id : '838', value: 'Ad'},
    {id : '838', value: 'Cars'},
    {id : '839', value: 'Brochure'},
    {id : '839', value: 'Planes'},
    {id : '840', value: 'Bus Wrap'},
    {id : '840', value: 'Boats'}
);

refreshSections(project_type);  

function refreshSections(selectedType) 
{   
    for (var i = 0; i &lt; projectTypes.length; i++) 
    {
        if (projectTypes[i].value == selectedType) 
        {
            document.getElementById("section-"+ projectTypes[i].id).style.display = '';
        } 
        else 
        {
            document.getElementById("section-"+ projectTypes[i].id).style.display = 'none';
        }
    }
}
</code></pre>

<p>Here is an html sample of what I want to accomplish:</p>

<pre><code>&lt;head&gt;
    &lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type" /&gt;
    &lt;title&gt;Project Overview&lt;/title&gt;
    &lt;script type="text/javascript"&gt;
    var projectType_Field_Id = '1169';

    //Project Types
    var projectTypes = new Array (
        {id : '11', value:'Cars'},
        {id : '12', value:'Boats'},
        {id : '13', value:'Planes'}

        );

    //occurs onLoad
    function formOnLoad()
    {
        var project_type = document.getElementById(projectType_Field_Id).value;
        refreshSections(project_type);
        }
    /*
     *  Onchange - Project Type
     */
    function projectTypeChange()
    { 
        var project_type = document.getElementById(projectType_Field_Id).value;
        refreshSections(project_type);
    }

    function refreshSections(selectedType) 
    {    
        for (var i = 0; i &lt; projectTypes.length; i++) 
        {
            if (projectTypes[i].value == selectedType) 
            {
                document.getElementById("section-"+ projectTypes[i].id).style.display = '';
            } else {
                document.getElementById("section-"+ projectTypes[i].id).style.display = 'none';
            }
        }

    }


    &lt;/script&gt;
    &lt;/head&gt;

    &lt;body onload="formOnLoad();"&gt;
    &lt;form method="post" action=""&gt;
    &lt;fieldset name="mainSection"&gt;
                    &lt;legend style="color:blue; font-weight:bold"&gt;Project Overview Section&lt;/legend&gt;

                    &lt;table style="width: 100%"&gt;
                        &lt;tr&gt;
                            &lt;td style="height: 33px; width: 178px; color:maroon"&gt;Name&lt;/td&gt;
                            &lt;td style="height: 33px"&gt;&lt;input  id="1125" name="1125" type="text" /&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td style="height: 33px; width: 178px; color:maroon"&gt;Email&lt;/td&gt;
                            &lt;td style="height: 33px"&gt;&lt;input  id="1026" name="1026" type="text" /&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td style="width: 178px"&gt;Product Title&lt;/td&gt;
                            &lt;td&gt;&lt;input  id="1089" name="1089" type="text" /&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td style="width: 178px"&gt;Product Type&lt;/td&gt;
                            &lt;td&gt;&lt;select id="1169" name="1169"  onChange="projectTypeChange();"&gt;
                            &lt;option value=""&gt;Select&lt;/option&gt;
                            &lt;option value="Cars"&gt;Cars&lt;/option&gt;
                            &lt;option value="Boats"&gt;Boats&lt;/option&gt;
                            &lt;option value="Planes"&gt;Planes&lt;/option&gt;
                            &lt;option value="Trains"&gt;Trains&lt;/option&gt;
                            &lt;option value="Skateboard"&gt;Skateboard&lt;/option&gt;
                            &lt;option value="Helicopter"&gt;Helicopter&lt;/option&gt;

                            &lt;/select&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                                        &lt;/table&gt;
                &lt;/fieldset&gt;&lt;br /&gt;&lt;br /&gt;

                &lt;fieldset id="section-11" name="section-11"&gt;
                    &lt;legend style="color:fuchsia; font-weight:bold"&gt;Car Details Section&lt;/legend&gt;

                    &lt;table cellpadding="2" style="width: 100%"&gt;
                        &lt;tr&gt;
                            &lt;td style="width: 334px; height: 35px"&gt;&lt;label style="color:maroon"&gt;Size:&lt;/label&gt;&lt;/td&gt;
                            &lt;td style="height: 35px"&gt;&lt;input id="1245" name="1245" type="text" /&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td style="height: 35px; width: 334px"&gt;Color:&lt;/td&gt;
                            &lt;td style="height: 35px"&gt;
                            &lt;select id="1433" name="1433"&gt;
                    &lt;option value="Orange"&gt;Orange&lt;/option&gt;
                            &lt;option value="Blank"&gt;Blank&lt;/option&gt;
                            &lt;option value="Green"&gt;Green&lt;/option&gt;
                &lt;/select&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td style="width: 334px"&gt;Description:&lt;/td&gt;
                            &lt;td&gt;
                            &lt;textarea id="1290" name="1290" rows="2" style="width: 433px"&gt;&lt;/textarea&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
                                &lt;/fieldset&gt;
                                &lt;br /&gt;
                &lt;fieldset id="section-12" name="section-12"&gt;
                    &lt;legend style="color:fuchsia; font-weight:bold"&gt;Plane Details Section&lt;/legend&gt;

                    &lt;table cellpadding="2" style="width: 100%"&gt;
                        &lt;tr&gt;
                            &lt;td style="width: 334px; height: 35px"&gt;&lt;label  style="color:maroon"&gt;Size:&lt;/label&gt;&lt;/td&gt;
                            &lt;td style="height: 35px"&gt;&lt;input id="1245" name="1245" type="text" /&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td style="height: 35px; width: 334px"&gt;Color:&lt;/td&gt;
                            &lt;td style="height: 35px"&gt;
                            &lt;select id="1433" name="1433"&gt;
                    &lt;option value="Orange"&gt;Orange&lt;/option&gt;
                            &lt;option value="Blank"&gt;Blank&lt;/option&gt;
                            &lt;option value="Green"&gt;Green&lt;/option&gt;
                &lt;/select&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td style="width: 334px"&gt;Description:&lt;/td&gt;
                            &lt;td&gt;
                            &lt;textarea id="1290" name="1290" rows="2" style="width: 433px"&gt;&lt;/textarea&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
                                &lt;/fieldset&gt;&lt;br /&gt;
                &lt;fieldset id="section-13" name="section-13"&gt;
                    &lt;legend style="color:fuchsia; font-weight:bold"&gt;Boat Details Section&lt;/legend&gt;

                    &lt;table cellpadding="2" style="width: 100%"&gt;
                        &lt;tr&gt;
                            &lt;td style="width: 334px; height: 35px"&gt;&lt;label  style="color:maroon"&gt;Size:&lt;/label&gt;&lt;/td&gt;
                            &lt;td style="height: 35px"&gt;&lt;input id="1245" name="1245" type="text" /&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td style="height: 35px; width: 334px"&gt;Color:&lt;/td&gt;
                            &lt;td style="height: 35px"&gt;
                            &lt;select id="1433" name="1433"&gt;
                    &lt;option value="Orange"&gt;Orange&lt;/option&gt;
                            &lt;option value="Blank"&gt;Blank&lt;/option&gt;
                            &lt;option value="Green"&gt;Green&lt;/option&gt;
                &lt;/select&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td style="width: 334px"&gt;Description:&lt;/td&gt;
                            &lt;td&gt;
                            &lt;textarea id="1290" name="1290" rows="2" style="width: 433px"&gt;&lt;/textarea&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
                                &lt;/fieldset&gt;
    &lt;fieldset id="section-1011" name="section-1011"&gt;
                    &lt;legend style="color:green; font-weight:bold"&gt;Misc Info Section&lt;/legend&gt;

                    &lt;table cellpadding="2" style="width: 100%"&gt;
                        &lt;tr&gt;
                            &lt;td style="width: 334px; height: 35px"&gt;&lt;label&gt;Size:&lt;/label&gt;&lt;/td&gt;
                            &lt;td style="height: 35px"&gt;&lt;input id="1301" name="1301" type="text" /&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td style="height: 35px; width: 334px"&gt;Color:&lt;/td&gt;
                            &lt;td style="height: 35px"&gt;
                            &lt;select id="1302" name="1302"&gt;
                    &lt;option value="Orange"&gt;Orange&lt;/option&gt;
                            &lt;option value="Blank"&gt;Blank&lt;/option&gt;
                            &lt;option value="Green"&gt;Green&lt;/option&gt;
                &lt;/select&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td style="width: 334px"&gt;Description:&lt;/td&gt;
                            &lt;td&gt;
                            &lt;textarea id="1303" name="1303" rows="2" style="width: 433px"&gt;&lt;/textarea&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
                                &lt;/fieldset&gt;
                                &lt;input name="Send Job" type="submit" value="Send Job" /&gt;

    &lt;/form&gt;
</code></pre>
