I have a webpage that has one clothing item with three color swatches. When I click on the diferent color swatch the image changes. This works fine.

When I click to enlarge the image, it pops a new window of the clothing item larger - static image. This works fine, however, I want the pop-up window to show the color swatch that was selected. I know this can be done, but am lost on how to do this. Maybe an array but how?

Here's my script for the window pop:


function changeOption()
{
var openwin=window.open('','2010', config='resizable=1,width=410,height=440,top=0,left=75,scrollbars=0')
openwin.document.write("<html>")
openwin.document.write("<title>Ladies Model 2010</title>")
openwin.document.write("<body marginheight='0' marginwidth='0' leftmargin='0' topmargin='0'>")
openwin.document.write("<center>")
openwin.document.write("<img src='../images/ladies/2010_sl.jpg' border='0'>")
openwin.document.write("<br>")
openwin.document.write("<p>")
openwin.document.write("<a href='javascript:window.close();'>")
openwin.document.write("<img src='../images/close.gif' border='0' width='53' height='19'>")
openwin.document.write("</center>")
openwin.document.write("</body>")
openwin.document.write("</html>")

}
</Script>

Here is my script for one of the color swatches:

<a href="#" onClick="document.img1.src='../images/ladies/2010_sm.jpg'">