}}else if (proj=2){//have the same happen here for other project's images }

}); });

There will also be a back button which will go back to the previous image or, if on the first image, back to the portfolio. But I think the if else if else isn't working somehow, because it only opens the next image on the first click (ws2_tstimage2.gif), but won' work the second time (ws2_tstimage3.gif). I'd like to try your alternative, but I'm unsure where the values go (or if it will still work today?) That is to say, where the name of the variable goes, where the value goes, and where the code I want executed goes.

As you might guess I'm pretty new to this, so every bit of help is appreciated.