function init()
{
  var W3CDOM = (document.createElement && document.getElementsByTagName);
  if (!W3CDOM) return;
  var test = new Image();
  var tmp = new Date();
  var suffix = tmp.getTime();
  test.src = '/img/edit.gif?'+suffix;
  test.onload = imageReplacement;
}

function imageReplacement()
{
  replaceThem(document.getElementsByTagName('h2'));
}

function replaceThem(x)
{
  var replace = document.createElement('img');
  for (var i=0;i<x.length;i++)
  {
    if ((x[i].id) && (x[i].id == 'replaceIt'))
    {
      var y = replace.cloneNode(true);
      y.src = '/ttf/maketxt.php?text=' + x[i].firstChild.nodeValue;//'pix/' + x[i].id + '.gif';
      y.alt = x[i].firstChild.nodeValue;
      y.title = y.alt;
      x[i].replaceChild(y,x[i].firstChild);
    }
  }
}

document.onload = init();
