function popup(url, winname, width, height)
{
  var Win = window.open(url,
                        winname,
                        'width=' + width +
                        ',height=' + height +
                        ',location=no,menubar=no,status=no,toolbar=no,scrollbars=1,resizable=1,left=50,top=50');
}

function open_window(url, winname, width, height, left, top)
{
  var Win = window.open(url,
                        winname,
                        'width=' + width +
                        ',height=' + height +
                        ',location=no,menubar=yes,status=no,toolbar=no,scrollbars=1,resizable=1,' +
                        'left=' + left +
                        ',top=' + top);
}

function full_window(url, winname, width, height, left, top)
{
  var Win = window.open(url,
                        winname,
                        'width=' + width +
                        ',height=' + height +
                        ',location=yes,menubar=yes,status=yes,toolbar=yes,scrollbars=1,resizable=1,' +
                        'left=' + left +
                        ',top=' + top);
}

function tool_window(url, winname, width, height, left, top)
{
  var Win = window.open(url,
                        winname,
                        'width=' + width +
                        ',height=' + height +
                        ',location=no,menubar=yes,status=no,toolbar=yes,scrollbars=1,resizable=1,' +
                        'left=' + left +
                        ',top=' + top);
}

function show(nav) {
   activeNav = document.getElementById(nav);
   clearTimeout(activeNav.interval);
   display(nav, 'block');
}

function hide(nav) {
   activeNav = document.getElementById(nav);
   func = "display('" + nav + "', 'none')";
   activeNav.interval = setTimeout(func, 100);
}

function display(nav, status) {
   activeNav = document.getElementById(nav);
   clearTimeout(activeNav.interval);
   activeNav.style.display = status;
}

function checkNonBlank(bAlert, oField)
{
  var bOk = true;

  if (oField.value.length == 0) {
    bOk = false;
    if (bAlert) {
      alert("This field is a required field");
      oField.focus();
    }
  }

  return bOk;
}

function checkInt(bAlert, oField)
{
  var bOk = true;
  var nOldValue = parseInt(oField.value);

  if (isNaN(nOldValue)) {
    bOk = false;
    if (bAlert) {
      alert("This field must contain a numeric value." + oField.value);
      oField.focus();
    }
    else
     oField.value = "0";
  }

  return bOk;
}


