var skipFade = false;
var goURL    = '';
var timer    = null;
var al = true;

function openWin(u, w, h, s, n) {
 if (w == null) w = 600;
 if (h == null) h = 500;
 if (s == null) s = 0;
 if (n == null) n = 'BS_POP_WIN' + Math.round(Math.random() * 10000);
 x = Math.round((screen.width - w) / 2);
 y = Math.round((screen.height - h) / 2);
 if (x == window.left) x+= 25;
 if (y == window.top) y+= 25;
 window.open(u, n, 'status=0,menubar=0,scrollbars='+s+',resizable='+s+',location=0,toolbar=0,directories=0,width='+w+',height='+h+',left='+x+',top='+y);
}

function visApplet(id,nm) {openWin('Java.asp?job=vis&id='+id+'&nm='+nm,500,500);}

function fadeWait(u) {
 if (u != null) goURL = u;
 if (timer != null) clearTimeout(timer);
 timer = null;
 if (oBody.filters[0].Status == 0) {
  window.parent.idContent.style.display = 'none';
  if (goURL == '::') window.parent.sForm.submit();
  else if (goURL != null) location.href = goURL;
 } else timer = setTimeout('fadeWait()', 50);
}

function doFade(show, u) {
 if (skipFade) return;
 if (show) window.parent.idContent.style.display = 'inline';
 oBody = idFader;
 oBody.filters[0].Apply();
 oBody.style.visibility = show ? 'visible' : 'hidden';
 oBody.filters[0].Play();
 if (u != null) fadeWait(u);
}

