function imgChange(imgTargetID,imgSource,imgSourceParentID){
  var sections;
  var length;
  
  var divImgParent = this.document.getElementById(imgSourceParentID);
  if (divImgParent){    
    sections = divImgParent.getElementsByTagName('a');
    if (sections){
      length = sections.length;
      if (length > 0){
        for (i=0;i<length;++i){
          sections[i].rel = "lightbox[]";
        }
      }
    }
  }
  
  var divImg = this.document.getElementById(imgTargetID);
  if (divImg && imgSource){
    sections = divImg.getElementsByTagName('img');
    if (sections){
      length = sections.length;
      if (length > 0){
        sections[0].src = imgSource.src.replace('45_','220_');
		sections[0].src = imgSource.src.replace('45-','220-');
        sections[0].alt = imgSource.alt;
        if (imgSource.parentNode){
          //imgSource.parentNode.rel = "lightbox";
        }       
      }
    }
    sections = divImg.getElementsByTagName('a');
    if (sections){
      var length = sections.length;
      if (length > 0){
        pos1 = sections[0].href.lastIndexOf("/");
        pos2 = imgSource.src.lastIndexOf("/");
        sections[0].href = sections[0].href.substr(0,pos1) + imgSource.src.substr(pos2).replace('45_','');
        sections[0].title = imgSource.alt;
      }
    }
  }
}
