
function addTarget(){
  // If there is a DIV called mypopups on the page
  // (and by extension, if your browser understands the DOM)
  if (document.getElementById('newsbox'))
  {
    // Get all objects in the ‘mypopups’ div
    var popup = document.getElementById('newsbox');
    // Get all the links from ‘mypopups’
    var links = popup.getElementsByTagName('a');
    // Loop through all the links
    for (var i=0; i<links.length; i++)
    {
		links[i].setAttribute('target', '_blank')
    }
  } // end of if
}// end of function

// Run the “makePopup()” function when the window has loaded
window.onload = function()
{
  addTarget();
}