i am trying to create a javascript slideshow gallery, i am having a problem with the effect2() and goTo() functions, which should display the animation of the sliding image, for some reason i am getting a white background when clicking the foTo() button, any suggestion how to fix it so the second image will be displayed there

Effect2(); position an image -100% left
immediately followed by a call to Effect(); which positions all images to 0% left
there is no sliding effect
the script relies on opacity 0 and opactity 1 to rotate the images with no animation