/* main.js -- Main JavaScript starting point for the web page.  */

/*
 * Copyright (C) 2003-2005 Tudor Hulubei <tudor@hulubei.net>.
 * Distributed under the GNU General Public License.
 */


/* Global variables.  */
var g_hostName = 'hulubei.net';
var g_topDirectory = '/dan';
var g_webSite = g_hostName + g_topDirectory;
var g_cookiePrefix = 'DanHulubei';
var g_fontCookie = g_cookiePrefix + ':Font';
var g_schemeCookie = g_cookiePrefix + ':Scheme';
var g_mapCookie = g_cookiePrefix + ':Map';
var g_defaultFont = "Small Font";
var g_defaultScheme = "Black Scheme";
var g_originalLanguage = 'en';
var g_expirationDate = null;
var g_pagePath = PagePath();
var g_imageNames = new Array();
var g_imageDirectories = new Array();
var g_imageStems = new Array();
var g_imageExtensions = new Array();
var g_navigationButtons = 0;
/* Activating menu floating makes scrolling very slow for large pages.  */
var g_menuFloating = false;/*MenuFloatingSupported();*/

/* StatCounter configuration.  */
var sc_project=728054;
var sc_partition=6;
var sc_security="4b3d4f02";
var sc_invisible=1;


function PagePath()
{
    var url = location.href;

    /* We get called with `location.href' as either one of:

       http://hulubei.net/tudor/photography/Black&WhiteIndex.html
       http://www.hulubei.net/tudor/photography/Black&WhiteIndex.html

       or, in case of Google translations, with something like:

       http://216.239.39.120/translate_c?\
           hl=en&ie=UTF-8&oe=UTF-8&langpair=en%7Cfr&\
           u=http://hulubei.net/tudor/photography/Black%26WhiteIndex.html&\
           prev=/language_tools

       In the first case, we want the part after /tudor, while in the second we want
       the part after /tudor but before the first &.  */

    var i = url.indexOf('?');

    if (i != -1)
    {
        var urlArguments = url.slice(i, url.length);
        var arguments = urlArguments.split('&');

        for (a = 0; a < arguments.length; a++)
        {
            /* FIXME: This is specific to Google.  */
            if (arguments[a].slice(0, 2) == 'u=')
            {
                url = arguments[a].split('=')[1];
                break;
            }
        }

        if (a == arguments.length)
            return '/';
    }

    i = url.indexOf(g_topDirectory) + g_topDirectory.length;
    return url.slice(i, url.length);
}


/* Menu floating is not supported on all platforms.  */
function MenuFloatingSupported()
{
    /* We only allow floating for the browsers we actually tested and
       found to work ok.  */
    if (is_nav7up ||
        is_moz ||
        is_fx ||
        is_opera ||
        (is_konq && (is_minor >= 3.3)))
        return true;

    return false;
}


/* Substitute character string c2 for every c1 in aString.  */
function StringReplace(aString, c1, c2)
{
    if (aString == '')
        return aString;
    if (c1 == '')
        return aString;

    /* Avoid infinite recursion when substituting aa for a by
       providing an offset into the string.  */
    var argc = StringReplace.arguments.length;
    if (argc < 4) { n = 0; } else { n = StringReplace.arguments[3]; }

    /* Find the first occurrence of c1 after the threshold.  */
    var i = aString.indexOf(c1, n);

    /* Stop recursion and return the current string when c1 not found.  */
    if (i < 0)
        return aString;

    /* Extract substrings s1 and s2 around the c1.  */
    var s1 = aString.substring(0, i);
    var s2 = aString.substring(i + c1.length, aString.length);

    /* Recurse with this new string.  */
    return StringReplace(s1 + c2 + s2, c1, c2, (i + c2.length));
}


function GenerateNavigationHeading()
{
    /* We don't want this visible if JavaScript is disabled.  */
    document.write('<div class="MenuSection">Navigation</div>');

}


function GenerateTopButton(link)
{
    document.write('<a href=\'' + link + '\'\n');
    document.write('   title=\'Top of the Page\'\n');
    document.write('   onmouseover="javascript:window.status=\'Top of the Page\'; return true;"\n');
    document.write('   onmouseout="javascript:window.status=\'\'; return true;">Top</a>'); /* No NL.  */
}


function GenerateFontButtons()
{
    if (is_nav4)
        return;

    if (is_cookie == "false")
        return;

    document.write('<div class="FontSelector">');
    document.write('  <a href="index.html"');
    document.write('     class="TinyFont"');
    document.write('     title="Tiny Font"');
    document.write('     onmouseover="javascript:window.status=\'Tiny Font\'; return true;"');
    document.write('     onmouseout="javascript:window.status=DefaultWindowStatus(); return true;"');
    document.write('     onclick="javascript:SetActiveStyleSheet(\'Tiny Font\', \'default\', true); return false;">T</a>');
    document.write('  <a href="index.html"');
    document.write('     class="SmallFont"');
    document.write('     title="Small Font"');
    document.write('     onmouseover="javascript:window.status=\'Small Font\'; return true;"');
    document.write('     onmouseout="javascript:window.status=DefaultWindowStatus(); return true;"');
    document.write('     onclick="javascript:SetActiveStyleSheet(\'Small Font\', \'default\', true); return false;">T</a>');
    document.write('  <a href="index.html"');
    document.write('     title="Medium Font"');
    document.write('     class="MediumFont"');
    document.write('     onmouseover="javascript:window.status=\'Medium Font\'; return true;"');
    document.write('     onmouseout="javascript:window.status=DefaultWindowStatus(); return true;"');
    document.write('     onclick="javascript:SetActiveStyleSheet(\'Medium Font\', \'default\', true); return false;">T</a>');
    document.write('  <a href="index.html"');
    document.write('     title="Large Font"');
    document.write('     class="LargeFont"');
    document.write('     onmouseover="javascript:window.status=\'Large Font\'; return true;"');
    document.write('     onmouseout="javascript:window.status=DefaultWindowStatus(); return true;"');
    document.write('     onclick="javascript:SetActiveStyleSheet(\'Large Font\', \'default\', true); return false;">T</a>');
    document.write('</div>');
}


function GenerateSchemeButtons(root)
{
    if (is_nav4)
        return;

    if (is_cookie == "false")
        return;

    document.write('<div class="SchemeSelector">');
    document.write('  <a href="index.html"');
    document.write('     class="BlackScheme"');
    document.write('     title="Black Color Scheme"');
    document.write('     onmouseover="javascript:window.status=\'Black Color Scheme\'; return true;"');
    document.write('     onmouseout="javascript:window.status=DefaultWindowStatus(); return true;"');
    document.write('     onclick="javascript:SetActiveStyleSheet(\'default\', \'Black Scheme\', true); return false;"><img');
    document.write('     src="' + root + '/graphics/10x10-transparent.gif"/></a>');
    document.write('  <a href="index.html"');
    document.write('     class="GrayScheme"');
    document.write('     title="Gray Color Scheme"');
    document.write('     onmouseover="javascript:window.status=\'Gray Color Scheme\'; return true;"');
    document.write('     onmouseout="javascript:window.status=DefaultWindowStatus(); return true;"');
    document.write('     onclick="javascript:SetActiveStyleSheet(\'default\', \'Gray Scheme\', true); return false;"><img');
    document.write('     src="' + root + '/graphics/10x10-transparent.gif"/></a>');
    document.write('  <a href="index.html"');
    document.write('     class="WhiteScheme"');
    document.write('     title="White Color Scheme"');
    document.write('     onmouseover="javascript:window.status=\'White Color Scheme\'; return true;"');
    document.write('     onmouseout="javascript:window.status=DefaultWindowStatus(); return true;"');
    document.write('     onclick="javascript:SetActiveStyleSheet(\'default\', \'White Scheme\', true); return false;"><img');
    document.write('     src="' + root + '/graphics/10x10-transparent.gif"/></a>');
    document.write('</div>');
}


function OpenImageWindow(url, name, width, height)
{
    /* Make sure the `name' argument contains no spaces,
       dashes, dots or slashes, otherwise IE will complain.
       Use underscores instead.  Mozilla & Opera seem to
       work just fine without this, but...  */
    name = StringReplace(name, ' ', '_');
    name = StringReplace(name, '-', '_');
    name = StringReplace(name, '.', '_');
    name = StringReplace(name, '/', '_');

    height += 50;
    width += 20;

    /* No spaces in the property list either.  */
    var newWindow = window.open(
        url, name,
        "directories=no,location=no,toolbar=no," +
        "scrollbars=no,status=no,menubar=no,resizable=yes");
    newWindow.resizeTo(width, height);
}


function LoadImage(url, name, width, height)
{
    document.write('<a onmouseover="javascript:window.status=\'' + name + '\'; return true;"\n');
    document.write('   onmouseout="javascript:window.status=\'\'; return true;"\n');
    document.write('   onclick="javascript:OpenImageWindow(\'' + url + '\', \'' + name);
    document.write('\', ' + width + ', ' + height + ');">' + name + '</a>'); /* No NL.  */
}


function SetExpirationDate()
{
    if (g_expirationDate)
        return;

    /* Create an instance of the Date object and set it so that
       cookies using it will expire in 10 years (10 * 365 days).  */
    g_expirationDate = new Date();
    FixDate(g_expirationDate);
    g_expirationDate.setTime(
        g_expirationDate.getTime() + 10 * 365 * 24 * 60 * 60 * 1000);
}


function DefaultWindowStatus()
{
    var floatingInfo = g_menuFloating ? '[floating: on]' : '[floating: off]';
    return document.title + ' ' + floatingInfo;
}


function GenerateSearchBox(path, title)
{
    if (is_nav && !is_nav5up)
    {
        /* Netscape 4.7x displays the ugliest box...
           We dumbly sacrifice functionality for aesthetics.  */
        return;
    }

    if (!title)
        title = "<strong>S</strong>earch:";

    var textColor = "white";
    var linkColor = "white";
    var visitedLinkColor = "white";
    var activeLinkColor = "white";
    var backgroundColor = "black";

    var scheme = GetCookie(g_schemeCookie);

    if (!scheme)
        scheme = g_defaultScheme;

    if (scheme == "Black Scheme")
    {
        textColor = "white";
        linkColor = "#ff6600";
        visitedLinkColor = "#ceaf9f";
        activeLinkColor = "#ff6666";
        backgroundColor = "black";
    }
    else if (scheme == "Gray Scheme")
    {
        textColor = "white";
        linkColor = "#80c8ff";
        visitedLinkColor = "#6096c0";
        activeLinkColor = "#ff4400";
        backgroundColor = "#606067";
    }
    else if (scheme == "White Scheme")
    {
        textColor = "black";
        linkColor = "#a02000";
        visitedLinkColor = "#c04000";
        activeLinkColor = "#4444ff";
        backgroundColor = "white";
    }

    document.write('      <div class=\'MenuItem\'\n');
    document.write('           title=\'Search ' + g_hostName + '\'\n');
    document.write('           onmouseover="javascript:window.status=\'Search ' + g_hostName + '\'; return true;"\n');
    document.write('           onmouseout="javascript:window.status=DefaultWindowStatus(); return true;">\n');
    document.write('        ' + title + '<form method="get" action="http://www.google.com/custom">\n');
    document.write('            <input type=\'hidden\' name=\'domains\' value=\'' + g_hostName + '\'/>\n');
    document.write('            <input type=\'hidden\' name=\'sitesearch\' value=\'' + g_hostName + '\'/>\n');
    document.write('            <input type=\'hidden\' name=\'cof\' value=\'\n');
    document.write('L:http://' + g_webSite + '/graphics/heading.jpg;');
    document.write('LH:75;LW:450;GL:2;');
    document.write('BIMG:http://' + g_webSite + '/graphics/background-' + backgroundColor + '.jpg;');
    document.write('BGC:' + backgroundColor + ';T:' + textColor + ';LC:' + linkColor + ';VLC:' + visitedLinkColor + ';ALC:' + activeLinkColor + ';');
    document.write('GALT:#bbbbbb;GFNT:gray;GIMP:red;AH:center;S:http://' + g_hostName + '/;\'/>\n');
    document.write('            <input class=\'Search\' type=\'text\' name=\'q\'\n');
    document.write('                   maxlength=\'255\' value=\'\' accesskey=\'S\'/>\n');
    document.write('        </form>\n');
    document.write('      </div>\n');
}


function ConfigureGoogleAds(channel)
{
    google_ad_client = "pub-4036224197250044";
    google_ad_channel = channel;
}


function ConfigureGoogleColors()
{
    var urlColor = "999999"
    var lineColor = "FF0000";
    var linkColor = "FAC092";
    var textColor = "CCCCCC";
    var borderColor = "000000";
    var backgroundColor = "000000";

    var scheme = GetCookie(g_schemeCookie);

    if (!scheme)
        scheme = g_defaultScheme;

    if (scheme == "Black Scheme")
    {
        urlColor = "888888";
        lineColor = "888888";
        linkColor = "FAC092";
        textColor = "888888";
        borderColor = "000000";
        backgroundColor = "000000";
    }
    else if (scheme == "Gray Scheme")
    {
        urlColor = "D6D6D6";
        lineColor = "0000FF";
        linkColor = "EE5500";
        textColor = "D6D6D6";
        borderColor = "333333";
        backgroundColor = "333333";
    }
    else if (scheme == "White Scheme")
    {
        urlColor = "A02000";
        lineColor = "FF0000";
        linkColor = "A02000";
        textColor = "000000";
        borderColor = "E0E0E0";
        backgroundColor = "E0E0E0";
    }

    google_alternate_color = backgroundColor;
    google_color_border = borderColor;
    google_color_bg = backgroundColor;
    google_color_line = lineColor;
    google_color_link = linkColor;
    google_color_url = urlColor
    google_color_text = textColor;
}


function ConfigureGoogleLinkUnit()
{
    ConfigureGoogleColors();

    google_ad_width = 120;
    google_ad_height = 90;
    google_ad_format = "120x90_0ads_al_s";
}


function ConfigureGoogleAdUnit()
{
    ConfigureGoogleColors();

    google_ad_width = 120;
    google_ad_height = 600;
    google_ad_format = "120x600_as";
    google_ad_type = "text";
}


function WriteLanguageOptionToLayer(languageName, language)
{
    if (language == g_originalLanguage)
    {
        /* FIXME: If the selection represents the original language,
           jump back to the original site.  The problem is that I
           don't know the exact URL to jump to.  Maybe I can extract
           it from the translated URL.  */
        document.write(
            '<a href=\'http://' + g_webSite + g_pagePath + '\'\n' +
            '   title=\'' + languageName + '\'\n' +
            '   onmouseover="javascript:window.status=\'' + languageName + '\'; return true;"\n' +
            '   onmouseout="javascript:window.status=DefaultWindowStatus(); return true;"><div class=\'LanguageItem\'>' +
            language + '</div></a>'); /* No NL.  */
    }
    else
    {
        document.write(
            '<a href=\'http://translate.google.com/translate?' +
            'u=http://' + g_webSite + g_pagePath + '&' +
            'langpair=en|' + language + '&' +
            'hl=en&' +
            'ie=UTF-8&' +
            'oe=UTF-8&' +
            'prev=/language_tools&' +
            'submit=Translate\'\n' +
            '   title=\'' + languageName + '\'\n' +
            '   onmouseover="javascript:window.status=\'' + languageName + '\'; return true;"\n' +
            '   onmouseout="javascript:window.status=DefaultWindowStatus(); return true;"><div class=\'LanguageItem\'>' +
            language + '</div></a>'); /* No NL.  */
    }
}


function GenerateTranslationBox(path, separator, heading)
{
    if (is_nav4)
        return;

    if (!separator)
        separator = "|";

    if (!heading)
        heading = "";

    document.write('    <div class=\'MenuItem\'>');
    document.write(heading);
    WriteLanguageOptionToLayer('English', 'en');
    document.write(separator);
    WriteLanguageOptionToLayer('French', 'fr');
    document.write(separator);
    WriteLanguageOptionToLayer('Spanish', 'es');
    document.write(separator);
    WriteLanguageOptionToLayer('Italian', 'it');
    document.write(separator);
    WriteLanguageOptionToLayer('Portuguese', 'pt');
    document.write(separator);
    WriteLanguageOptionToLayer('German', 'de');
    document.write('    </div>\n');
}


function DiscardAlienFrames()
{
    /* If this document has been loaded inside a frameset, make this
       the only frame.  Useful for getting rid of the ugly frame
       inserted by Google's online translation software.  */
    if (self != top)
    {
        /* FIXME: Konqueror and IE on Mac OS X fail to reload the
           frame.  No clue why.  */
        if (document.images)
            top.location.replace(location.href);
        else
            top.location.href = location.href;
    }
}


function ReloadImages()
{
    var suffix = "-black";
    var scheme = GetCookie(g_schemeCookie);

    if (!scheme)
        scheme = g_defaultScheme;

    if (scheme == "Black Scheme")
        suffix = "-black";
    else if (scheme == "Gray Scheme")
        suffix = "-gray";
    else if (scheme == "White Scheme")
        suffix = "-white";

    /* If the browser can do image swapping, install the new over the old.  */
    if (document.images)
    {
        var size = g_imageNames.length;
        for (i = 0; i < size; i++)
        {
            document[g_imageNames[i]].src =
                g_imageDirectories[i] + '/' +
                g_imageStems[i] + suffix + '.' +
                g_imageExtensions[i];
        }
    }
}


function AddSchemeImage(name, directory, stem, extension)
{
    /* Record the image's parameters.  */
    var i = g_imageNames.length;
    g_imageNames[i] = name;
    g_imageDirectories[i] = directory;
    g_imageStems[i] = stem;
    g_imageExtensions[i] = extension;
}


function GetAllStyleSheets()
{
    if (!window.ScriptEngine && navigator.__ice_version)
    {
        return document.styleSheets;
    }

    if (document.getElementsByTagName)
    {
        var Lt = document.getElementsByTagName('link'),
            St = document.getElementsByTagName('style');
    }
    else if (document.styleSheets && document.all)
    {
        var Lt = document.all.tags('LINK'),
            St = document.all.tags('STYLE');
    }
    else
    {
        return [];
    }

    for (var x = 0, os = []; Lt[x]; x++)
    {
        var rel = Lt[x].rel ? Lt[x].rel : Lt[x].getAttribute ? Lt[x].getAttribute('rel') : '';
        if (typeof(rel) == 'string' && rel.toLowerCase().indexOf('style') + 1)
            os[os.length] = Lt[x];
    }

    for( var x = 0; St[x]; x++ )
        os[os.length] = St[x];

    return os;
}


function SetActiveStyleSheet(font, scheme, reload)
{
    if (is_cookie == "false")
        return;

    if (font == "default")
    {
        var fontCookie = GetCookie(g_fontCookie);
        font = fontCookie ? fontCookie : g_defaultFont;
    }

    if (scheme == "default")
    {
        var schemeCookie = GetCookie(g_schemeCookie);
        scheme = schemeCookie ? schemeCookie : g_defaultScheme;
    }

    for (var i = 0, ss = GetAllStyleSheets(); ss[i]; i++)
    {
        if (ss[i].title)
            ss[i].disabled = true;

        /*
         * Konqueror and Safari [KHTML], and Opera 7+ support this
         * technique, but until the disabled property has been set
         * with JavaScript, it will show as false, even if the 'rel'
         * attribute is set to 'alternate stylesheet' and hence the
         * stylesheet is disabled.
         */
        if (ss[i].title == font || ss[i].title == scheme)
            ss[i].disabled = false;
    }

    SetCookie(g_fontCookie, font, g_expirationDate, '/');
    SetCookie(g_schemeCookie, scheme, g_expirationDate, '/');
    ReloadImages();

    /*
     * Reloading the window makes sure the Google Ads are displayed
     * with the proper color, and also makes sure the fonts are
     * rendered properly in FireFox (why are they not when switching
     * stylesheets is a mistery to me, but that's another story).
     */
    if (reload)
    {
        window.location.reload(true);
        ShowObjects();
    }
}


function GenerateSchemeImage(name, directory, stem, extension, title, width, height)
{
    if (is_nav4)
        return;

    var suffix = "-black";
    var scheme = GetCookie(g_schemeCookie);

    if (!scheme)
        scheme = g_defaultScheme;

    if (scheme == "Black Scheme")
        suffix = "-black";
    else if (scheme == "Gray Scheme")
        suffix = "-gray";
    else if (scheme == "White Scheme")
        suffix = "-white";

    var image = directory + '/' + stem + suffix + '.' + extension;

    document.write(
        '<img src=\'' + image +
        '\' name=\'' + stem +
        '\' width=\'' + width +
        '\' height=\'' + height +
        '\' alt=\'' + title +
        '\' title=\'' + title + '\'/>\n');

    AddSchemeImage(name, directory, stem, extension);
}


function ActivateDefaultStyleSheet()
{
    if (is_nav4)
        return;

    if (is_cookie == "false")
        return;

    SetExpirationDate();

    var font = GetCookie(g_fontCookie);
    var scheme = GetCookie(g_schemeCookie);

    if (font || scheme)
    {
        var fontText = font ? font : g_defaultFont;
        var schemeText = scheme ? scheme : g_defaultScheme;
        SetActiveStyleSheet(fontText, schemeText, false);
    }
}


function SetTargets()
{
    /* Make sure the browser is up to the task.  */
    if (!document.getElementsByTagName)
        return;

    /* Get all the links in the document.  */
    var anchors = document.getElementsByTagName("a");

    /* XHTML doesn't support the tag attribute.  Instead, we use
       rel="external-*" to denote the fact that we want the tag to be
       loaded in a new window, whose name would be the text after
       "external-".  */
    for (var i = 0; i < anchors.length; i++)
    {
        var anchor = anchors[i];
        if (anchor.getAttribute("href"))
        {
            var rel = anchor.getAttribute("rel");
            if (rel && (rel.substring(0, 9) == "external-"))
                anchor.target = rel.substring(9, rel.length);
        }
    }
}


function FixTextHeadingShadowForIE55()
{
    if (!is_ie5 || is_ie5_5up)
        return;

    /* Make sure the browser is up to the task.  */
    if (!document.getElementsByTagName)
        return;

    /* Get all the links in the document.  */
    var divs = document.getElementsByTagName("div");

    for (var i = 0; i < divs.length; i++)
    {
        var div = divs[i];
        if ((div.getAttribute("class") == "TextHeadingShadow") ||
            (div.getAttribute("className") == "TextHeadingShadow"))
        {
            /* Fix IE5.01's rendering problem.  The width will be
               inconsistent with what it is on other browsers, but
               at least the shadows will look right.  */
            if (div.style.width == "auto")
            {
                /* Ok, the first element has already been changed,
                   meaning that the conditional HTML code we have
                   in the header took effect.  Good.  */
                break;
            }

            div.style.width = "auto";
        }
    }
}


function FixMainImageClearForMozilla()
{
    if (!is_moz)
        return;

    var mainImage = document.getElementById("MainImage");

    /* Mozilla, Netscape & Firefox seem to add unnecessary space after
       the Motto if the MainImage object is cleared in both directions.  */
    if (mainImage)
        mainImage.style.clear = "left";
}


function MainImageContent(path)
{
    /* The background doesn't show up in IE 5.0 unless the '<div>'
       contains something.  We avoid inserting that content for any
       other browser, to save the vertical space.  */
    if (is_ie5up)
        document.write('<img src="' + path + '/graphics/1pixel.gif"/>');
}


function MakeObjectsHidden()
{
    MakeObjectHidden('Menu');
    MakeObjectHidden('MainImage');
    MakeObjectHidden('Title');
}


function ShowObjects()
{
    ShowObject('Menu');
    ShowObject('MainImage');
    ShowObject('Title');
}


function main()
{
    if (is_nav4)
        return null;

    window.onresize = function() { main(); }

    if (!is_ie)
    {
        /* IE behaves different than everything else for this
         * attribute, but the default behavior is much worse for IE
         * than it is for the other browsers (it only shows a few
         * pixels of the Header), so we write the CSS for IE, just in
         * case JavaScript is disabled.  */
        var header = document.getElementById('Header');
        if (header) header.style.overflow = "auto";
    }

    if (g_menuFloating)
    {
        /* IE doesn't support "position: fixed;".  The other browsers
           do, so we change it dynamically to get frame-like behavior.
           This pretty much pins the Menu and the Ads in place.  */
        var menu = document.getElementById('Menu');
        if (menu) menu.style.position = "fixed";
        var ads = document.getElementById('Ads');
        if (ads) ads.style.position = "fixed";
    }

    SetTargets();
    FixTextHeadingShadowForIE55();
    FixMainImageClearForMozilla();
    SetExpirationDate();
    DiscardAlienFrames();

    window.status = DefaultWindowStatus();
    return true;
}


/* Run this first!  */
DiscardAlienFrames();

/* Mark objects as initially hidden.  */
MakeObjectsHidden();

/* We need this for cookies.  */
SetExpirationDate();

/* Do this before loading the body of the HTML document, to avoid
 * activating the default style sheet.  */
ActivateDefaultStyleSheet();


/* Local Variables: */
/* mode: C++ */
/* End: */

