function sure()
{
    return confirm('Are you sure ?');
}


function openWin(url, name, width, height)
{
  if (! width) {
           width = screen.width*0.9;
  }
  if (! height) {
           height = screen.height*0.75;
  }
  var newWindow = window.open(url, name, 'left=' + Math.ceil((screen.width - width)/2) + ',top=' + Math.ceil((0+screen.height - height)/2) + ',width=' + width + ',height=' + height + ',location=0,toolbar=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,channelmode=0,fullscreen=0');
  newWindow.focus();
  return false;
}

function selectAll(name, val)
{
    a = document.getElementsByName(name);
    for(i=0;i<a.length;++i) a[i].checked =   val;
}

function viewBlock(block, value) {
  document.getElementById(block).style.display = (value == 0) ? 'none' : '';
}
