Javascript ternary operator
<p>I am creating two different icons for a google map. 
however only one icon appears.
a drop down select called facility will allow one icon based on a value of '8', all other values create the other icon.</p>

<pre><code>var marker = createMarker(latlng, name, address, city, state, zipcode, telephone, images, url, facility);


function createMarker(latlng, name, address, city, state, zipcode, telephone, images, url, facility) { 
  var html = "&lt;div id='infodiv'&gt;" + name + "&lt;br/&gt;&lt;h4&gt;" + address + "&lt;br/&gt;" + city + ", " + state + " " + zipcode + "&lt;br/&gt;" + (formatPhone(telephone)) + "&lt;/h4&gt;&lt;div class='infoimage'&gt;&lt;img src='" + images + "'&gt;&lt;/div&gt;&lt;div class='footer'&gt;&lt;a href='http://" + url + "'&gt;" + url + "&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;";
  var marker = new google.maps.Marker({
    icon: icon2,
    icon: (facility == 8) ? icon : icon, 
    map: map, 
    position: latlng 
  });
</code></pre>

<p>here are the icons:</p>

<pre><code>var icon = new google.maps.MarkerImage("./images/plum_flag.png", 
new google.maps.Size(35, 52), new google.maps.Point(0, 0), 
new google.maps.Point(0, 52));
//callup the orange icon
var icon2 = new google.maps.MarkerImage("./images/orange_flag.png", 
new google.maps.Size(26, 39), new google.maps.Point(0, 0), 
new google.maps.Point(0, 39));
</code></pre>

<p>The only icon showing up is the 'var icon = new google.maps.MarkerImage("./images/plum_flag.png",' no matter what the select option is....</p>
