function newwindow(url)
{
  window.open(url,'','scrollbars=yes, location=no, status=no, width=630, height=500, resizable');
}


function newhint(url)
{
  window.open(url,'','scrollbars=yes, location=no, status=no, width=450, height=300, resizable,menubar=no');
}


function radios_enable(formname, name, enable, uncheck)
{
  if(typeof(uncheck)=='undefined')
    uncheck=true;
  radios=window.document.getElementById(formname).elements[name];
  if(radios)
  {
    if(radios.length)
    {
      for(i=0; i<radios.length; i++)
      {
        radios[i].disabled = !enable;
        if(!enable && uncheck)
          radios[i].checked = false;
      };
    }else
    {
      radios.disabled = !enable;
      if(!enable && uncheck)
        radios.checked = false;
    };
  };
}

function xround(v)
{
  ZVAL=0.005001;

  if(v>=0)
    return Math.floor(100.0*(v+ZVAL))/100;
  else
    return Math.ceil(100.0*(v-ZVAL))/100;
}

