/**
 * Views an article in current window if a Human Events article, or in a new
 * window if external.
 *
 * @param  windowName \c string Required window name.
 * @param  windowName \c string Required article URL.
 * @return void
 * @todo   The default external article window name should be a site config option.
 */
function viewArticle(windowName, url)
{
    // Arguments.
    if (!windowName) {
        windowName = '_self';
    }
    if (!url) {
        throw new Error('viewArticle failed: url expected');
        return;
    }

    // View the article.
    if (windowName == '_self') {
        document.location.href = url;
    } else {
        window.open(url, 'ext_link');
    }

    return;
}
