function s_img(id) { id = id.replace('img', ''); var el = document.getElementById('id-1-oval-2'); el.value = id; if(typeof(optChangePrice)!='undefined') optChangePrice(el); }