function switchIMG(img, baseURL){ var obj = document.getElementById('homePhoto'); obj.src = '/design/images/home' + img.toString() + '.jpg'; }