var img1_src = "http://img.diytrade.com/cdimg/325472/1331640/0/1144214162.jpg"; var img2_src = ""; var img3_src = ""; var img4_src = ""; var img5_src = ""; var img1_normal_code = ""; var img2_normal_code = ""; var img3_normal_code = ""; var img4_normal_code = ""; var img5_normal_code = ""; function changeimage(imgid){ var oimgpos = document.geementbyid("image_normal_id"); oimgpos.href = eval(imgid + "_src"); oimgpos.innerhtml = eval(imgid + "_normal_code"); return false; }