Disjointed rollover, swapping out alt tags and url locations?

I’m using the basic old javascript disjointed rollover for some text links. After rolling over the image remains until a new link is rolled over, is there a way to have the alt tags change with the images, seems like it would be fairly easy. Just not sure how to make ref of the new alt tag text within the <img> tag.

Can alt=var1? But then the other problem is how do i ref the alt tag in the change image function?

this is my first issue, was also curious if it’s possible to swap out links of each of these images.