/*
   ITFJS.JS  Copyright 2006 Icetips - Arnor Baldvinsson
   
*/

function findLinkByHref(href) {

  for (var i=0; i<document.links.length; i++) {
    if (document.links[i].href == href){
      alert('reference ' + i);
      return i;
    }
  }
  return -1;
}

function changeLinkHref(id,newHref,oldHref) {
  if (document.links.length > 0) {
    if (document.getElementById) {
      document.getElementById(id).href = newHref;
    }
    else if (document.all) {
      document.all[id].href = newHref;
    }
    else {
      var index = findLinkByHref(oldHref);
      if (index > -1)
        document.links[index].href = newHref;
    }
  }
}


function jsshowphoto(photourl,caption ,undertext ,photoid){
//  alert(photourl);

 document.thumbnail.src = photourl;
 changeLinkHref('thumbnailLink','showfullimage.php?image=' + photoid,'dummylink.php');
 document.all.thumbnailCaption.innerHTML = caption;
 document.all.thumbnailUnderText.innerHTML = undertext;
}


