var newwin=null;
var timer=null;

function setoptions(left, top, width, height) {
  var option;
  if (parseInt(navigator.appVersion) >= 4 && navigator.appName == "Netscape")
    option = 'ScreenX=' + left + ',ScreenY=' + top + ',width=' + width + ',height=' + height;
  else
    option = 'left=' + left + ',top=' + top + ',width=' + width + ',height=' + height;
  return option;
}

function closepop() {
    newwin.close();
}

function openWindow(url, name) {
  var option = setoptions(64, 96, 750, 576)
             + ',status=1,menubar=1,toolbar=1,directories=2,location=1,resizable=yes,scrollbars=yes';
  newwin = window.open(url, name, option);
  newwin.focus()
}

function popUp2(url, name) {
  var option = setoptions(64, 96, 567, 400)
             + ',status=0,menubar=0,toolbar=0,directories=0,location=0,resizable=yes,scrollbars=yes';
  newwin = window.open(url, name, option);
  newwin.focus()
}

function popUp(url, name) {
  var option = setoptions(64, 96, 384, 576)
             + ',status=0,menubar=0,toolbar=0,directories=0,location=0,resizable=yes,scrollbars=yes';
  newwin = window.open(url, name, option);
  newwin.focus()
}

function gonpopup(new_url, url, name) {
  location = new_url;
  popUp(url, name);
}

function ckopener() {
  if (opener.closed)  {
    newwin.close()
    window.close()
  }
  else
    setTimeout('ckopener()', 2000)
}

function playreal(localURL) {
  fileURL="/tc/wnp/"+localURL
  document.embeds[0].SetSource(fileURL);
  document.embeds[0].DoPlayPause();
}

function go2warn(selectobj) {
  var selvalue = selectobj[selectobj.selectedIndex].value
  if (selvalue == "null")
    selectobj.selectedIndex = 0;
  else if (selvalue == "map")
    window.location="/tc/wnp/index.html";
  else {
    if (selvalue == "all_")
      selvalue="all";
    window.location="/tc/wnp/warn/nmhs/" + selvalue + ".html";
  }
}

function select2(selection) {
  var path = selection[selection.selectedIndex].value
  if (path == "null")
    selection.selectedIndex = 0;
  else
    window.location=path;
}


