So… at first glance, it looks like this line is the issue
document.images.slide.src=eval("img"+pic+".src")
If you look, you are creating filenames of ‘img1.src’. However, you actually want ‘img1.jpg’.
Try this to fix the problem…
document.images.slide.src=eval("img"+pic+".jpg")
Also, you may likely need to put the full path there as well… so you may want to use something like
document.images.slide.src=eval("F:\Thema B\website1\img"+pic+".jpg")