Código:
<img id="imgprincipal" src="<? echo $row[5]; ?>" alt="<? echo $row[2]; ?>" onerror="this.src='images/item-pic300.jpg'" width="300" height="301" /> <script language="javascript"> function showimg(url){ document.getElementById('imgprincipal').src='url'; } </script> <p align="center"> <img onmouseover="javascript:showimg('<? echo $row[5]; ?>')" src="<? echo $row[5]; ?>" onerror="this.src='images/item-pic50.jpg'" width="50" height="50" /> <img onmouseover="javascript:showimg('<? echo $row[5]; ?>')" src="<? echo $row[6]; ?>" onerror="this.src='images/item-pic50.jpg'" width="50" height="50" /> <img onmouseover="javascript:showimg('<? echo $row[5]; ?>')" src="<? echo $row[7]; ?>" onerror="this.src='images/item-pic50.jpg'" width="50" height="50" /> <img onmouseover="javascript:showimg('<? echo $row[5]; ?>')" src="<? echo $row[8]; ?>" onerror="this.src='images/item-pic50.jpg'" width="50" height="50" /> <img onmouseover="javascript:showimg('<? echo $row[5]; ?>')" src="<? echo $row[9]; ?>" onerror="this.src='images/item-pic50.jpg'" width="50" height="50" /> </p>