function putmail(dom, usr, prompt)
{
  document.write('<a href="mailto:' + usr + '@' + dom + '">');
  document.write(prompt);
  document.write('<\/a>\n');
}

function change(object, url) {

alert('in function change');
alert('twindow = '+twindow);
popup(url);
}

function popup(url) {
  winparams = 'scrollbars=yes, width=450, height=300, resizable=yes, status=yes';
  if (!twindow){
    twindow = window.open('','textwin', winparams);
  }

  if (twindow.closed) {
    twindow=window.open(url,'textwin', winparams);
    twindow.focus();
  }
  else {
    twindow.location = url;
    twindow.focus();
  }
}

function exit() {
  if (twindow && twindow.closed == 0) { twindow.close(); }
}

function goback() {
  if (self.window.name == 'textwin') {
    window.opener.focus();
  }
  else {
    history.back(1);
  }
}

twindow='';

