Ok, i have a javascript function which toggles the innerhtml of a div tag when a user changes the option of a select dropdown box..
It all works fine with text, but
It seems to me like you forgot to escape the quotes surrounding your image paths, and its not reading your string correctly, try this
function toggle(opt) { var d = document.getElementById('div_tag'); if (opt == '5') { d.innerHTML = ''; } etc...