function openPopup(url, name, width, height) {
  var left = (document.body.clientWidth - width) / 2; var top = (document.body.clientHeight - height) / 2;
  var w = window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',location=0,toolbar=0,scrollbars=0,resizable=1,menubar=0');
  return w;
}

