var preloadimg="no";
var imgborderwidth=0;
var filterstring="progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)"

if (preloadimg=="yes")
{
  for (x=0; x<dynimages.length; x++)
  {
    var myimage=new Image();
    myimage.src=dynimages[x][0];
  }
}

function returnimgcode(theimg,nLarg,nHaut)
{
  var imghtml=""
  if (theimg[1]!="") 
  {
  	imghtml = '<a href="'+theimg[1]+'"';
  	if (theimg[2]!="") imghtml += ' target="'+theimg[2]+'"';
  	imghtml += '>';
  }
  imghtml += '<img src="'+theimg[0]+'" border="'+imgborderwidth+'" width='+nLarg+' height='+nHaut+'>';
  if (theimg[1]!="") imghtml += '</a>';
  if (theimg[3]!="") imghtml += '<br><br>'+theimg[3];
  return imghtml;
}

function modifyimage(loadarea,imgindex,nLarg,nHaut)
{
  if (document.getElementById)
  {
    var imgobj=document.getElementById(loadarea);
    if (imgobj.filters && window.createPopup)
    {
      imgobj.style.filter=filterstring;
      imgobj.filters[0].Apply();
    }
    imgobj.innerHTML = returnimgcode(dynimages[imgindex],nLarg,nHaut);
    if (imgobj.filters && window.createPopup) imgobj.filters[0].Play();
    return false;
  }
}
