The problem is due to the fact that the thumbnail script is contained inside the external page, and that page is fetched via Ajax. In such a setup, many browsers will not properly run any JavaScript that's on the external page when the page is loaded.
If all you're trying to do is create thumbnail images on the external page that when clicked on loads a larger image, on your main page (not the external page), first add something like the following script in the HEAD section:
Code:
<script type="text/javascript">
function enlargeimage(linkobj, targetdiv){
var targetimage=linkobj.getAttribute('href')
document.getElementById(targetdiv).innerHTML='<img src="' + targetimage+ '" />'
}
</script>
Then on your external page, modify the HTML for the thumbnail links to something like:
Code:
<a href="Photos/natjecaji/krapina_trg_3D_presjek_01.jpg" width="467" height="330" onClick="enlargeimage(this, 'loadarea2'); return false"><img src="Photos/natjecaji/thmb_krapina_trg_3D_presjek_01.jpg"></a>
Do this for the other thumbnail links on your page as well obviously.
Bookmarks