//var _POPUP_FEATURES = 'location=0, statusbar=0, menubar=0, width=400, height=300';


function raw_popup(url, target, features) {
  var _POPUP_FEATURES = 'width=600, height=600';
  if (!features) { features = _POPUP_FEATURES; }
  if (!target) { target = '_blank'; }

  var theWindow =
    window.open(url, target, features);
  theWindow.focus();
  return theWindow;
}

function event_popup(event) {
  event.preventDefault();
  raw_popup( this.getAttribute('href'), this.getAttribute('target') || '_blank' );
}

// Make all the links pop-ups.
function activate_links() {
  $$('.pop-up-links a').each( function(elem){
    elem.observe('click', event_popup);
  });
  $$('a.pop').each( function(elem){
    elem.observe('click', event_popup);
  });
}

Event.observe( window, 'load', activate_links )
