var  winList = new Array;

function openWindow(name, href, left, top, width, height, status, scroll) {
  var found = false;
  for (var i = 0; i < winList.length; i++) {
    if (winList[i].closed) {
      winList[i] = winList[winList.length - 1];
      winList.length--;
    } else {
      if (winList[i].name == name) {
        winList[i].focus();
        found = true;
      }
    }
  }
  if (!found) {
    if (!scroll) scroll = '0';
    winList[winList.length] = window.open(href, name, 'status='+status+',scrollbars='+scroll+',left='+left+',top='+top+',width='+width+',height='+height);
  }
}