function popup(url) {
  var left = (screen.availWidth/2) - (520/2);
  var top = (screen.availHeight/2) - (410/2);
  window.open(url,'name','height=410,width=520,left=' + left + ',top=' + top);
}