JavaScript Auto Complete search bar modification assistance
<p>I am building a prototype for a website and I am using a JavaScript code to simulate the autocomplete experience like google has on it's search bar.</p>

<p>However I have modified the array in the sample list to include an image. The problem occurs when I make a selection. </p>

<pre><code>var customarray=new Array(
    '1 Apple /img src="images/AutoComplete/Apple.png" width="627" height="40" /&gt;',
    '2 &lt;img src="images/AutoComplete/Apple.png" width="627" height="40" /&gt; Apple iMac ',
    '3 Apple iPad',
    'Apple iPhone',
    'Apple iPod',
    'Apple iPod Touch ',
    'Apple iPod Nano ',
    'Apple iPod Shuffle ',
    'Apple iPod Classic ',
    'Apple MacBook',
    'Apple MacBook Pro',
    'Apple TV');
</code></pre>

<p>array 1 will show correctly in the HTML input field, but if i click it the input field will show: "Apple img src="images/AutoComplete/Apple.png" width="627" height="40"  " I only want it to show "Apple".</p>

<p>The second issue is alignment. If I place the image before the text (as show in array 2) i get a broken image file instead of the image.</p>

<p>Any idea on how to correct these issues? Thank you.</p>
