var popUpWinNoScroll=0;

function popUpWindowNoScroll(URLStr, left, top, width, height)
{
  if(popUpWinNoScroll)
  {
    if(!popUpWinNoScroll.closed) popUpWinNoScroll.close();
  }
  popUpWinNoScroll = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

var popUpWinScroll=0;

function popUpWindowScroll(URLStr, left, top, width, height)
{
  if(popUpWinScroll)
  {
    if(!popUpWinScroll.closed) popUpWinScroll.close();
  }
  popUpWinScroll = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

/* This script from http://www.adp-gmbh.ch/web/js/hiding_column.html used to hide columns and also adapted to hide rows */

function showHideColumn(table_name, col_no, do_show)
{
  var stl;
  if (do_show) stl = 'block'
  else         stl = 'none';

  var tbl  = document.getElementById(table_name);
  var rows = tbl.getElementsByTagName('tr');

  for (var row=0; row<rows.length;row++) {
    var cels = rows[row].getElementsByTagName('td')
    cels[col_no].style.display=stl;
  }
}

function showHideRow(table_name, row_no, do_show)
{
  var stl;
  if (do_show) stl = 'block'
  else         stl = 'none';

  var tbl  = document.getElementById(table_name);
  var rows = tbl.getElementsByTagName('tr');
  rows[row_no].style.display=stl;
}

function showHideRowRange(table_name, row_start, row_end, do_show)
{
  var stl;
  if (do_show) stl = 'block'
  else         stl = 'none';

  var tbl  = document.getElementById(table_name);
  var rows = tbl.getElementsByTagName('tr');
  for (var row=row_start; row<=row_end;row++) {
  rows[row].style.display=stl;
  }
}

function showHideTable(table_name, do_show)  
{  
  var stl;
  if (do_show) stl = 'block'
  else         stl = 'none';
  document.getElementById(table_name).style.display = stl;  
}