function replaceImage(imageURL, imageWidth, imageHeight, imageAlt) { document.getElementById('main_thmb').innerHTML = '
Loading...
'; pars = 'imageURL='+imageURL+'&imageWidth='+imageWidth+'&imageHeight='+imageHeight+'&imageAlt='+imageAlt; new ajax('ajax_get_det_image.php', {postBody: pars, update: $('main_thmb')}); } function replace_image_src(img_id,new_src,img_width) { document.getElementById(img_id).src=new_src; document.getElementById(img_id).width=img_width; }