function hideHint() {
  if (document.getElementById) {
    document.getElementById('showhint').style.display = 'none';
  } else if (document.all) {
    document.all.tags('div')['showhint'].style.display = 'none';
  }
}

function showHint(url, where, whatgenV, whataccundefV, whataccV, whatpluralV) {

  if (document.getElementById) {
    document.getElementById('whatgen').innerHTML = whatgenV;
    document.getElementById('whataccundef').innerHTML = whataccundefV;
    document.getElementById('whatacc').innerHTML = whataccV;
    document.getElementById('whatplural').innerHTML = whatpluralV;
    document.getElementById('thelink').href = url;
    document.getElementById('thelink').target = where;
    document.getElementById('showhint').style.display = 'block';
    scrollTo(0,0);
    top.focus();
    return 'ko';
  } else if (document.all) {
    document.all.tags('span')['whatgen'].innerHTML = whatgenV;
    document.all.tags('span')['whataccundef'].innerHTML = whataccundefV;
    document.all.tags('span')['whatacc'].innerHTML = whataccV;
    document.all.tags('span')['whatplural'].innerHTML = whatpluralV;
    document.all.tags('a')['thelink'].href = url;
    document.all.tags('a')['thelink'].target = where;
    document.all.tags('div')['showhint'].style.display = 'block';
    scrollTo(0,0);
    top.focus();
    return 'ko';
  }
}

function openPageFromChat (url, where, what) {

  if (what) {
    if (what == 'Foto') {
      whatgenV = 'des Fotos';
      whataccundefV = 'ein Foto';
      whataccV = 'Foto';
      whatpluralV = 'Fotos';
    } else if (what == 'HP') {
      whatgenV = 'der HP';
      whataccundefV = 'eine Homepage';
      whataccV = 'die Homepage';
      whatpluralV = 'Homepages';
    } else if (what == 'GB') {
      whatgenV = 'des GB';
      whataccundefV = 'ein Gästebuch';
      whataccV = 'Gästebuch';
      whatpluralV = 'Gästebücher';
    } else {
      whatgenV = 'der Seite';
      whataccundefV = 'eine Seite';
      whataccV = 'Seite';
      whatpluralV = 'Seiten';
    }
  } else {
    whatgenV = 'der Seite';
    whataccundefV = 'eine Seite';
    whataccV = 'Seite';
    whatpluralV = 'Seiten';
  }

  if (!where) where = '_blank';

  chatPopup = open(url,where,'')
  if (!chatPopup) { // hat nicht geklappt
    return(showHint(url, where, whatgenV, whataccundefV, whataccV, whatpluralV));
  } else {
    return 'ok';
  }

}
