  var NS = (navigator.appName == "Netscape") ? true : false;
  function showLang(sel) {
    var obj;
    hideAll();
    obj = document.getElementById(sel);
    if (! obj) {
      sel = document.getElementsByName('language').item(0).value;
      obj = document.getElementById(sel);
    }
    if (! obj) return;
    obj.style.visibility = 'visible';
    obj.style.display    = 'block';
    iWidth  = (NS) ? window.innerWidth  : document.body.clientWidth;
    iHeight = (NS) ? window.innerHeight : document.body.clientHeight;
    if (NS) {
      obj_html = document.getElementsByTagName('HTML');
      if (obj_html[0].scrollHeight > iHeight) {
	window.resizeBy(0, obj_html[0].scrollHeight + 5 - iHeight);
      }
    }
    fixSelection(sel);
  }
  function fixSelection(lang_code) {
    var obj = document.getElementsByName('language').item(0);
    if (obj.value != lang_code) {
      var cycle;
      var idx = 0;
      for (cycle = 0; cycle < obj.childNodes.length; cycle ++) {
	if (obj.childNodes.item(cycle).value == lang_code) {
	  idx = cycle;
	}
      }
      obj.selectedIndex = idx;
    }
  }
  function hideAll() {
    var i;
    var obj;
    for (i=0; i<langs.length; i++) {
      obj = document.getElementById(langs[i]);
      if (obj) {
	obj.style.visibility = 'hidden';
	obj.style.display    = 'none';
      }
    }
  }
  function resizeWin() {
    iWidth  = (NS) ? window.innerWidth  : document.body.clientWidth;
    iHeight = (NS) ? window.innerHeight : document.body.clientHeight;
    iWidth  = 400 - iWidth;
    iHeight = 200 - iHeight;
    window.resizeBy(iWidth, iHeight);
    self.focus();
  }