i have a problem.<BR>i am resizing an image using a javascript function<BR><BR><BR>&#060;SCRIPT language=javascript&#062;<BR> <BR>function thumbsOn(target)<BR>{<BR> parent.theMain.PreviewImg.src="pics\" + target + ".jpg"<BR> var pWdth,pHght<BR> pWdth = parent.theMain.PreviewImg.width<BR> pHght = parent.theMain.PreviewImg.height<BR> <BR> if (parent.theMain.PreviewImg.width &#062; 500)<BR> {<BR> parent.theMain.PreviewImg.width=500<BR> //sets the height to fit a width of 500 pixels<BR> parent.theMain.PreviewImg.height=parent.theMain.Pr eviewImg.width/pWdth) * parent.theMain.PreviewImg.height<BR> }<BR>}<BR>&#060;/script&#062;<BR><BR>&#060;img src="x.jpg" name=previewImg&#062;<BR><BR><BR><BR>--------------------------------------<BR>the problem is that the image will be resized correctly only the first time.<BR>while what i have to do is enable the user to change the images by cliking some link.<BR><BR>the code will use the size of the first image for all the other image.<BR>is there a way to return the size to null/zerro/undefined, something like that?<BR><BR>hope i was clear, Thanx.<BR><BR>