var pop = null;

function popup(obj,w,h) {
  var url = (obj.getAttribute) ? obj.getAttribute('href') : obj.href;
  if (!url) return true;
  w = (w) ? w += 20 : 150;  // 150px*150px is the default size
  h = (h) ? h += 25 : 150;
    
  var l = (screen.availWidth - w) / 2;
  var t = (screen.availHeight - h) / 2;
  
  var args = 'toolbar=no ,location=no ,directories=no , status=no ,menubar=no ,width='+w+',height='+h+',resizable'+',scrollbars=1'+',left='+l+',top='+t+ ';';
  pop = window.open(url,'popup',args);
  pop.focus();
  return (pop) ? false : true;
}


