﻿function FixPrintFonts(tagname)
{
    var tags = document.getElementsByTagName(tagname);
    for (var i = 0; i < tags.length; i++)
    {
        tags[i].style.color = 'black';
        tags[i].style.fontFamily = 'arial';
        tags[i].style.fontSize = '9pt';
    }
}

$(function()
{
    // fix some borders
    var $t = $('table[align=center]');
    $t.attr({ 'cellspacing': '0', 'cellpadding': '0' });
    $t.find('td').css({ 'padding': '5px' }).append("&nbsp;");
});

$(function()
{
    $('a[id$=lnkLanguage]')
    .css({ 'color': 'black', 'text-decoration': 'none', 'cursor': 'default', 'font-size': 'smaller' })
    .text('[No disponible en español]')
    .attr('href', '#')
    .unbind('click');

    $('#printLink').click(function()
    {
        if ($(this).text() == "Print Version")
        {
            $(this).text("Graphic Version");
            $('#divBanner').remove();
            $('#divNav').remove();
            $('#divSearch').remove();
            $('div[id$=_pnlLinks]').remove();
            $('a[id$=hlRCWs]').remove();
            $('#divChapterDispoLinks').remove();
            $('div[id$=pnlPrevNext]').remove();
            $('#divBreadCrumb').remove();
            $('a[id$=hlRegisterFilings]').remove();

            $('#divContent').css("marginLeft", "0");

            $('a').css({ 'text-decoration': 'none' });
            $('h1').css({ 'color': '#000000', 'font-family': 'arial', 'font-size': '9pt' });
            $('h2').css({ 'color': '#000000', 'font-family': 'arial', 'font-size': '9pt' });
            $('h3').css({ 'color': '#000000', 'font-family': 'arial', 'font-size': '9pt', 'font-weight': 'bold' });
        }
        else
        {
            document.location.href = document.location.href.replace('#', '');
        }
    });
});
