function popup(url) 
{
  var windowObject;
  var name = "popup";
  var width = 300;
  var height = 450;

  if (arguments.length == 3)
  {
    height = arguments[1];
    width = arguments[2];
  }
  else if (arguments.length == 4)
  {
    height = arguments[1];
    width = arguments[2];
    name = arguments[3];
  }
 if (width < 300)
  {
    width = 300;
  }
  else if (width > 600)
  {
    width = 600;
  }
  if (height < 300)
  {
    height = 300;
  }
  else if (height > 600)
  {
    height = 600;
  }
  //o = "width="+width+",height="+height+",resizable=1,status=0,left=0,top=0,menubar=0,scrollbars=1,toolbar=0,location=0,directories=0";
  if ((name == "chat") || (name == "callMe") || (name == "auto") || (name == "autoError"))
  {
    windowObject = window.open(url, name, "height=" + height + ",innerHeight=" + height + ",width=" + width + ",innerWidth=" + width + ",screenX=0,screenY=0,scrollbars=no,resizable=no");
  }
  else
  {
    windowObject = window.open(url, name, "height=" + height + ",innerHeight=" + height + ",width=" + width + ",innerWidth=" + width + ",screenX=0,screenY=0,scrollbars=yes,resizable=yes");
  }
  windowObject.focus();
}