function open_cal(name)
  {
  w = 550;
  h = 480;
  // initialize winX and winY to default values
  // for cases where Screen object isn't supported 
  var winX = 50;
  var winY = 50;
  var resize = "";
  var scroll = "";
  // only set new values if 4.0 browser
  if (parseInt(navigator.appVersion) >= 4)
    {
    winX = (screen.availWidth - w)*.5;
    winY = (screen.availHeight - h)*.5;
    }
  resize = "resizable=yes,";
  scroll = "scrollbars=yes,";
  path = "./view_cal.php?cal_id=" + name;
  newWindow = window.open("","calendar","titlebar=yes,location=no,"+resize+scroll+"width="+w+",height="+h+",left="+winX+",top="+winY);
  newWindow.focus();
  newWindow = window.open(path,"calendar","titlebar=yes,location=no,"+resize+scroll+"width="+w+",height="+h+",left="+winX+",top="+winY);
  }
