function changepic(id)
{
  document.getElementById('im' + id).className = 'running';
  setTimeout("realchangepic(" + id + ", 0)",650);
}
function realchangepic(id, num) {
  if(document.getElementById('im' + id).className != 'stopped') {
    document.getElementById('im' + id).src = 'http://th.gazm.us/' + id + '/' + num + '.jpg.th160-120.jpg';
    if(num != 9) {
      num++;
      setTimeout("realchangepic(" + id + ", " + num + ")",650);
    }
  }
}

function changeout(id, def) {
  document.getElementById('im' + id).className = 'stopped';
  document.getElementById('im' + id).src = 'http://th.gazm.us/' + id + '/' + def + '.th160-120.jpg';
}


function schangepic(id)
{
  document.getElementById('ims' + id).className = 'running';
  setTimeout("srealchangepic(" + id + ", 0)",650);
}
function srealchangepic(id, num) {
  if(document.getElementById('ims' + id).className != 'stopped') {
    document.getElementById('ims' + id).src = 'http://th.gazm.us/' + id + '/' + num + '.jpg.th160-120.jpg';
    if(num != 9) {
      num++;
      setTimeout("srealchangepic(" + id + ", " + num + ")",650);
    }
  }
}

function schangeout(id, def) {
  document.getElementById('ims' + id).className = 'stopped';
  document.getElementById('ims' + id).src = 'http://th.gazm.us/' + id + '/' + def + '.th160-120.jpg';
}

