¿Todas todas?
puedes poner esto entre head y /head
Código:
<script type="text/javascript">
function imagenes(){
for(m=0; m<document.images.length-1; m++){
document.imagens[m].onclick=function(){
visualizar(this.src)
}
}
}
onload = imagenes
</script>
si no se me ha ido el dedo, debería funcionar ok