slideShowURL = 'SlideShow_assets/SlideShow.html';       // parameter from openSlideShowWindow.js
slideShowNS4URL = 'SlideShow_assets/SlideShowNS4.html'; // parameter from openSlideShowWindow.js

slides = new Array();
slides[0] = new Slide('../Sexy_1880s_ladies_files/earlyboxBj15.jpg', '585', '800', 'Exquisite example of box design style of the 1870’s, a languishing allegorical semi-nude with brand name knock off from Cuba, complete with Island address. Cigars by R.K. Schnader, whose 50 rollers made Fact. 803 the 3rd largest of 124 operating in  Lancaster, PA, in 1883.   [7615 La Importancia]');
slides[1] = new Slide('../Sexy_1880s_ladies_files/earlyboxjA93.jpg', '800', '753', 'Liberated women, soliciting votes. 1870’s style, but an 1880’s theme. Cigars by John Rauch, whose 20 rollers working in Fact. 97, 6th Dist., of Indiana made him Indianapolis’s 3rd largest of 91 factories.\nBox used 1880.  [7593 Women\u0027s Rights], \nA curator’s favorite.');
slides[2] = new Slide('../Sexy_1880s_ladies_files/earlyboxBj71.jpg', '670', '800', 'Unusual 1870s transitional design treatment of an attractive allegorical label. Pastels, white edging. Note overprinted brand name “customizing.” Cigars by Giant Sutro & Newmark, NYC Fact. 412.\n[7671 Par Value, 1883]');
slides[3] = new Slide('../Sexy_1880s_ladies_files/earlyboxBj74.jpg', '610', '800', 'Theatrical characters Blanche and Rose appear on this transitional, full rectangle inner, in pastel colors and white edging. Only brand name is on top. Theater was a very popular cigar label theme. \n[7674 Blanch & Rose 1884]');
slides[4] = new Slide('../Sexy_1880s_ladies_files/earlyboxBj57.jpg', '670', '800', 'Soft pastel colors, white edging, flanked central design element, all typical of early 80’s boxes.\nCigars by H.M. Mason, whose 75 rollers made Fact. 825, 3rd Mass, the 2nd largest factory in Boston.\n[7657 Incognito, 1880]');
slides[5] = new Slide('../Sexy_1880s_ladies_files/earlyboxjA86.jpg', '630', '800', 'Lovely late 70’s “transitional” style label featuring a zaftig corseted beauty flanked by warring cherubs.\nCigars by J.A. Prist, Lititz, PA, Fact. 288 9th PA.\n[7586 Reeds Select, 1882]');
slides[6] = new Slide('../Sexy_1880s_ladies_files/earlyboxBj67.jpg', '661', '800', 'Romantic love found its way onto labels in the 1830’s and continued. Flanking vignettes, soft colors and white edging...typical 1880s.  Cigars by NYC giant Sutro & Newmark, Fact. 412, 3rd NYC.\n[7667 My Partner, 1886]');
slides[7] = new Slide('../Sexy_1880s_ladies_files/77women57.jpg', '656', '800', 'A classic example of 1870s - early 80s design, flanking vignettes and soft colors BUT not actually used until 1908. Cigars by Hettermann Bros, whose 75 rollers made Fact 23 the 2nd largest in Kentucky.\n[7757 Kentucky’s Pride, 1908]');
slides[8] = new Slide('../Sexy_1880s_ladies_files/earlyboxBj96.jpg', '662', '800', 'Octagonal end label with flanking vignettes in typical transitional design. Nice double entente as both the woman and the cigar are “Without Equal.” Name a rip-off of well-known Cuban brand. Fact. 63, 9th PA. \nNWH boxes were usually POB, but when labeled, only with inners.  [7696 Sin Par, 1880’s]');
slides[9] = new Slide('../Sexy_1880s_ladies_files/9524.jpg', '526', '570', 'Central square with similar, not identical, flanking vignettes identify it as a transitional 1870s-80s design. Color and book shape began in the 1870s but are more typical of 1880s. Cigars by J. Holzman, NYC, a major user of innovative packaging. Romantic asexual theme.  [9524 Attraction, 1879]');
slides[10] = new Slide('../Sexy_1880s_ladies_files/women7768.jpg', '517', '600', 'Demure young sisters on unusual monochrome image with two color border and title. Cigars by Frank Hoch, Fact. 1003, 18th Ohio in Massilon.\n[7768 Twin sister, 1880s]');
slides[11] = new Slide('../Sexy_1880s_ladies_files/77women47.jpg', '696', '800', 'Spanish woman cigar smoker in traditional costume,\nbut with a coquettish air. 1880s color, white edging, and oval-shaped design with rounded corners.\nCigars made in Fact. 167, 3rd New York City.\n[7747 La Divina, 1880s]');
slides[12] = new Slide('../Sexy_1880s_ladies_files/77women2.jpg', '636', '800', 'Saucy lady welcoming whom? Cigars by giant\nNYC cigar maker Kerbs & Spiess whose \n750 rollers worked at 2nd Ave. at 54th.\nBosomy female cigar smoker.\nFact. 13, 3rd District NYC.\n[7702 Welcome, 1880-82]');
slides[13] = new Slide('../Sexy_1880s_ladies_files/12702.jpg', '491', '600', 'Typical 80s box, with Heffron & Phelps blue and tan label, plain red edging. Cigars by John P. Hies, Syracuse, Fact. 412, 21st Dist. NY. The February 14th cancellation suggests it might have \nbeen given as a Valentine.\n[12702 Little Flirt, 1885]');
slides[14] = new Slide('../Sexy_1880s_ladies_files/earlyboxBj26.jpg', '618', '800', 'Double entendre. Sloe-eyed sexy cigar smoker\nimplies she likes more than the cigar. \nThe new freedom of advertising.\nCigars by David Marx whose 30 rollers worked\nin Fact. 107, 3rd Dist (382 South St) in NYC.\n[7626 I Like It, 1885]');
slides[15] = new Slide('../Sexy_1880s_ladies_files/10027.jpg', '436', '600', 'The definition of a chippy, a woman of loose morals, hasn’t changed. Cigars made by Kahner & Merkel, whose 500 roller Fact. 65 was located at 202 E. 100th in NYC. Women languishing in hammocks, on beds, and elsewhere are seen frequently in the 80s.\n[10027 Chippy, 1884]');
slides[16] = new Slide('../Sexy_1880s_ladies_files/77women85.jpg', '638', '800', 'Beautiful color printing highlights this very early 80’s woman decorating this nickel cigar made in \nFactory 227, 26th Dist of Western NY.\n[7785 Paragon, 1881]');
slides[17] = new Slide('../Sexy_1880s_ladies_files/77women6.jpg', '636', '800', 'A long-time brand in Cuba, Magnolia was adopted as a brand name by more than one U.S. maker. This languishing flower-waver was used by \nFred Reinhardt whose 15 rollers worked In \nUtica, NY, Factory 121, 21st tax District.\n[7706 Magnolia, 1889]');
slides[18] = new Slide('../Sexy_1880s_ladies_files/9111.jpg', '523', '562', 'Another well known Cuban brand, this one copies the original and includes the name of Vidal, the\nCuban distributor. Cigars made (with permission?)\nin Fact. 401, 1st Dist. Calif. by Liebes Bros., \nSan Francisco’s largest (300 rollers) factory.\n[9111 La Criolla, c1886]');
slides[19] = new Slide('../Sexy_1880s_ladies_files/colusa905.jpg', '523', '561', 'Nicely printed allegorical languishing lady used by Hoenes & Kirschner, Factory 211 in Colusa, \n4th District of California.\n[9005 Princess, 1890]');
slides[20] = new Slide('../Sexy_1880s_ladies_files/77women22.jpg', '673', '800', 'Very high quality printing characterizes this fine art knock-off from the early 1880’s. Trays kept\ncigars from getting damaged. Cigars made in \nFact. 484, 1st Dist. Ohio. A curator’s favorite.\n[7722 The Siren, c1888]');
slides[21] = new Slide('../Sexy_1880s_ladies_files/77women15.jpg', '482', '800', 'This NWH 50 with its long configuration is not\ntypical of the period, but the label’s printing \nand languishing lady certainly are. Cigars\nby A. Davis Sons, Fact. 199 in Cincinnati,\nhome to 45 rollers.\n[7715 La Rosa Sublime, 1881]');
slides[22] = new Slide('../Sexy_1880s_ladies_files/women7717.jpg', '412', '600', 'Lots of unburnished “gold” decorates this languishing lady having her cigar lit from \n a flaming arrow held by a cherub. \n[7717 La Rosa Sublime, 1881]');
slides[23] = new Slide('../Sexy_1880s_ladies_files/9162.jpg', '530', '523', 'Nameless inner and oval cut are typical of an earlier era, but the colors and the post are of the 1880s.\nCigars by I.D. Gabel, Bordertown, NJ, \nFact. 187, 1st Dist who had 45 rollers.\n[9162 Murillo, c1885]');
slides[24] = new Slide('../Sexy_1880s_ladies_files/9161.jpg', '516', '486', 'Note big emphasis on “Key West Factory No. 187” on the backsplash, eliminating the New Jersey location of the factory to make it appear they\nwere the more expensive and prestigious\ncigars from Key West, Florida.\n[9161 Murillo c1885]');
slides[25] = new Slide('../Sexy_1880s_ladies_files/women7759.jpg', '581', '430', 'Lovely soft bare breasted woman surrounded by cherubs. Dictionary definitions of the brand name include: Very delicate, pretty, small and dainty.\nCigars made in Fact. 225, 3rd NYC.\n[7759 Mignon, 1880s]');
slides[26] = new Slide('../Sexy_1880s_ladies_files/women7756.jpg', '600', '417', 'Bare breasted hammock lounging, diaphanously dressed lady of the time. Cigars by one of\nRichmond & Co’s 75 rollers working in \nFact. 1745, 9th Dist, Terre Hill, PA.\n[7756 Serena, 1880s]');
slides[27] = new Slide('../Sexy_1880s_ladies_files/allsorts8733.jpg', '681', '800', 'Languishing lady with unusually dressed Cupid\nshooting her in the breast. Cigars by F. Krell\nand Brother, whose factory 182, 1st Dist, \nwas in Tamaqua, PA. Very typical 80’s box.\n[8733 A Hit, c1885]');
slides[28] = new Slide('../Sexy_1880s_ladies_files/earlyboxBj19.jpg', '800', '773', 'Despite the brand name, it’s a tail-free woman languishing in the sea-shell. Cigars by giant\nNYC cigar maker Kerbs & Spiess whose \n750 rollers worked at 2nd Ave. at 54th.\nFact. 13, 3rd District NYC.\n[7619 Mermaid, 1882]');
slides[29] = new Slide('../Sexy_1880s_ladies_files/11662.jpg', '523', '558', 'Diaphanously dressed semi-nude laying on a bed of flowers. Stock label ordered blank and locally overprinted with brand name for use by\nR. Albrecht’s one man Fact. 38 in San Francisco.\n[11662 Star of Key West, 1880s]');
slides[30] = new Slide('../Sexy_1880s_ladies_files/earlyboxBj40.jpg', '657', '800', 'Outstanding early languishing semi-nude female smoker used by the Empire Cigar Co.\nFact. 1440, 3rd Dist, NYC. on this box\nmade for distributors Stiefel & Lederman.\nFrench frontmark: “Correct, as it should be”\n[7640 Perfection, 1881]');
slides[31] = new Slide('../Sexy_1880s_ladies_files/77women5.jpg', '653', '800', 'Exotic Middle-Eastern semi-nude languishing in a hammock with a bird on this stock label ordered blank and overprinted locally. Cigars made in the\n 5 man Millersville, PA, factory 493, 9th District \nbelonging to George F. Kahler.\n[7705 Your Pick, 1885]');
slides[32] = new Slide('../Sexy_1880s_ladies_files/77women21.jpg', '663', '800', 'Rare full nude, Paradise brand, White Labor sticker, small 5 man gold country (Grass Valley) factory 10, 4th District California, and early date combine to make this sensational box a curator’s favorite.\n[7721 Paradise, 1880]');
slides[33] = new Slide('../Sexy_1880s_ladies_files/77women64.jpg', '482', '800', 'Outstanding use of gold ink and varnish. Cigars made by R. Stenecke, Fact. 120, NYC, for Distributor E.C. Hazard & Co.\n[7764 La Belle de Reims, 1892]');
slides[34] = new Slide('../Sexy_1880s_ladies_files/77women65.jpg', '692', '800', 'Beautiful inside and out, this lady lounges and smokes in her drawing room. \nUnusual dark teal liner. \nA curator’s favorite.\n[7765 La Belle de Reims, 1892]');
slides[35] = new Slide('../Sexy_1880s_ladies_files/biglittle4477.jpg', '593', '523', 'A cut-down outer was used on this rare trimmed\nNWHC25/5 box featuring a languishing bathing beauty in the day’s swimming attire.\nCigars made in Fact. 2216, 9th Dist. PA.\nCatalog card missing.\n[4477, c1886]');
slides[36] = new Slide('../Sexy_1880s_ladies_files/earlyboxBj82.jpg', '559', '800', 'Park benches can be comfortable spots to lay down if you have a pillow, blanket and a good cigar made\nby John Stauffer, Lititz, PA, whose Factory 1615\nemployed 25 rollers.\n[7682 solid comforts, 1880s]');
slides[37] = new Slide('../Sexy_1880s_ladies_files/77women40.jpg', '612', '800', 'Taking it easy, floating down the river half-naked smoking a cigar. Very elaborate modification of 70’s style design. Cigars made in the 5 man factory of B.B. Barrett in Auburn, NY, #93, 21st Dist.\nA curator’s favorite. [7740 Little Chief, 1891]');
slides[38] = new Slide('../Sexy_1880s_ladies_files/77women25.jpg', '679', '800', 'Can you get much less politically correct than showing a naked female slave in a gossamer gown?\nTimes change! Cigars by George Oaks,  Oshkosh, Factory 273, 1st District Wisconsin.\n[7725 White Slave, 1893]');
slides[39] = new Slide('../Sexy_1880s_ladies_files/10038.jpg', '523', '589', 'Languishing allegorical semi-nude in the woods\nused by NYC giant Carl Upmann, Fact 253, 3rd NYC whose 300 rollers worked in the \n400 block of E. 59th Street.\n[10038 Vista, c1890]');
slides[40] = new Slide('../Sexy_1880s_ladies_files/77women57_2.jpg', '656', '800', '1870s - early 80s design, flanking vignettes and soft colors. A classic BUT not actually used until 1908. Cigars by Hettermann Bros, whose 75 rollers made Fact 23 the 2nd largest in Kentucky.\n[7757 Kentucky’s Pride]');
slides[41] = new Slide('../Sexy_1880s_ladies_files/women7786.jpg', '515', '600', 'Why it’s not accurate to use the type of label or its registration date as the date of a cigar box. This leggy lady first appeared in the early 1880s but W.E. Oilweller of Long Level, PA, was still attracting buyers with her in 1916.  Fact. 920, 9th PA. \n[7786 Blue Stocking, 1916]');
slides[42] = new Slide('../Sexy_1880s_ladies_files/9518.jpg', '454', '570', 'Sexy lady smoking as she shows a lot of leg coming down the garden stairs. Cigars by an unknown short-lived southern Illinois factory.\n[9518 Black Satin, c1888]');
slides[43] = new Slide('../Sexy_1880s_ladies_files/women7710.jpg', '422', '600', 'Lots of decollete characterizes this early 1880s charmer. Label purchased blank, “customized” by a local printer who mysteriously added a period after the brand name. Cigars by Hull, Grummond’s 250 rollers in Binghamton, NY Fact. 227, 21st.\n[7710 Alamo,, 1884]');
slides[44] = new Slide('../Sexy_1880s_ladies_files/12729.jpg', '499', '600', 'Sexily posed lady with a then-current slang expression, origin unknown, though music or theater are likely.  Cigars by H.S. Meiskey, Lititz, PA, \nFact 2353, 9th Dist. c1890.\n[12729]');
slides[45] = new Slide('../Sexy_1880s_ladies_files/earlyboxBj77.jpg', '507', '801', 'Saucy smoker in tight pants and cleavage used by Lichtenstein Bros. whose huge Factory 50 in NYC employed 1,000 rollers.  Sex sells. \n[7677 Spicy, 1881]');
slides[46] = new Slide('../Sexy_1880s_ladies_files/women7781.jpg', '514', '600', 'A grass widow is a divorcee or someone who fools around when her husband is out of town. Cigars by Fred Haak, Davenport, whose 40 rollers made his Fact. 67, 4th Dist Iowa, that state’s 2nd largest cigar factory. The largest, also in Davenport, had 200.\n[7781 Grass Widow, c1893]');
slides[47] = new Slide('../Sexy_1880s_ladies_files/women7778.jpg', '523', '532', 'Stock label of three cigar-smoking ladies with baskets filled with cigars for sale. Stock label sold blank and “customized” by a local printer.\nCigars by Harris Traub, Factory 350, 3rd NYC, \nwho employed five rollers.\n[7778 Merry Maidens, 1880s]');
slides[48] = new Slide('../Sexy_1880s_ladies_files/12709.jpg', '478', '600', 'Casual interaction between men and women, meetings without formal introduction, were part\nof the new morality seen on cigar boxes of the 80s.\nCigars made in one of the 175 rollers in Sam Josephs & Co.’s  Fact. 1000, 3rd NYC.\n[12709 Introduction, mid 1880s]');
slides[49] = new Slide('../Sexy_1880s_ladies_files/78womenBj75.jpg', '391', '477', 'Public flirting became fodder for ads.\nCigars by Towne, Fuller & Co., Springfield, Fact. 27, 10th Dist. the 2nd largest cigar factory in Mass.\n[7875 Gentle Puff, c1885]');
slides[50] = new Slide('../Sexy_1880s_ladies_files/12705.jpg', '488', '600', 'Terrific play on words. “Gimmie a made to order cigar” which depicts a woman Maid to Order around.\nCigars by Benj. Wissler, Lincoln, Fact. 695, 9th PA, made for James McClurg & Co., Pittsburgh.\nA curator’s favorite.\n[12705 Maid to Order, c1883]');
slides[51] = new Slide('../Sexy_1880s_ladies_files/9550.jpg', '453', '570', 'Pudor, bashfulness, was still considered \na feminine virtue. The brand name was added to a stock label with a pose and setting that raise questions about her demeanor. \n[9550 Pudor, c1883]');
slides[52] = new Slide('../Sexy_1880s_ladies_files/9578.jpg', '493', '570', 'Modesty wasn’t out of fashion either.\nCigars by Sutro & Newmark, NYC giant with \n1,000 rollers at Fact. 412 on 73rd St.\n[9578 Modesty, 1891]');
slides[53] = new Slide('../Sexy_1880s_ladies_files/60words45.jpg', '660', '801', 'Nor was Virginity, but it’s an odd brand name. \nNWH box with die cut. Cigars by Loeb & Weiss, Fact. 113, 11th Dist, Columbus, Ohio. 25 rollers.\n[6045 Virginity, 1880s]');
slides[54] = new Slide('../Sexy_1880s_ladies_files/women7741.jpg', '452', '600', 'Fine pretty girl with cleavage. Plain red edging. Cigars by Lehr & Clark, (100 rollers in Reading), Fact. 201, 1st Dist for Jos. Williams, Agent, Syracuse, NY.\n[7741 Rare, 1888]');
slides[55] = new Slide('../Sexy_1880s_ladies_files/9420.jpg', '558', '800', 'Portraits of women with a first name for a brand are quite common on cigar boxes of the 1860-1910 period. Thousands exist. This NWC has a typical delicate portrait in a late 70’s central oval with flanking vignettes and minimal use of color. \n[9420 Edith, 1881]');
slides[56] = new Slide('../Sexy_1880s_ladies_files/77women11.jpg', '689', '800', 'Pin-up in the garden. Cigars by William Lewis, whose 300 rollers tied his San Francisco factory 27 for California’s biggest in the 80’s.  \n[7711 Legacy, early 1880s]');
slides[57] = new Slide('../Sexy_1880s_ladies_files/10271.jpg', '523', '591', 'Portraits of women extend beyond sex.\nCigars by M. Cohn, Fact. 540, Hillsdale\nMichigan. Label purchased blank and “customized” by local printer. Almost any label could be ordered\nblank and customized in this manner.\n[10271 Story Tellers, c1890]');
slides[58] = new Slide('../Sexy_1880s_ladies_files/77women49.jpg', '693', '800', 'Great printing, but a much different subject matter. Who exactly was this designed to appeal to? Cigars by Lichtenstein’s 1,000 roller NYC Factory 50, made for Norris & Crockett in Concord, NH.\n[7749 Gossips, c1892]');
slides[59] = new Slide('../Sexy_1880s_ladies_files/earlyboxBj97.jpg', '585', '800', 'Interesting transitional label with central square flanked by vignettes that match in color and design and together form the oval design which typifies the 1880s. Cigars by Towne, Fuller & Co. of Springfield, 2nd largest factory in Mass. with 150 rollers.\n[7697 Our Club, 1880]');
slides[60] = new Slide('../Sexy_1880s_ladies_files/earlyboxBj89.jpg', '728', '800', 'Riding was an acceptable sport-activity for women of the day. Cigars packed in square 100/10 box, seen most often in the 1880’s. Cigars by Sutro & Newmark whose 1000 rollers worked in Fact. 412 at the corner of 73rd & 2nd Ave. in NYC.  \n[7689 Hailstone, c1887]');
slides[61] = new Slide('../Sexy_1880s_ladies_files/women7752.jpg', '523', '594', 'Women posed with dogs and cats were on labels for 100 years, but donkeys are among the more unusual critters they called friend. Cigars by Standard Cigar Co., Fact. 17, in Providence whose 50 rollers made it RI’s biggest, for W.C. Cook, in Providence, RI.  [7752 Fast Friends, c1887]');
slides[62] = new Slide('../Sexy_1880s_ladies_files/77women37.jpg', '665', '800', 'Based on “An Affair of Honor” by Emile Bayard, this view of women was revolutionary. The image was also appropriated by a brand of chewing tobacco. Cigars by S. Lowenthal, Cincinnati Fact. 18.\nA curator’s favorite.\n[7737 & 0827 For Honor, 1887]');
slides[63] = new Slide('../Sexy_1880s_ladies_files/women7744.jpg', '523', '597', 'Maud Powell, (b1868) who made her US debut in 1885 Philadelphia to great acclaim “second to no American violinist.” She established the first female classical quartet in America. Cigars by \nA. Davis Sons, Fact 199, Cincinnati.\n[7744 La Virtuosa, c1886]');
slides[64] = new Slide('../Sexy_1880s_ladies_files/women778.jpg', '403', '600', 'Accomplished women became commonplace on cigar labels during this decade. Cigars made in\nFact. 1908, 9th Dist. PA.\n[7708 Belle of Rink, c1890]');
slides[65] = new Slide('../Sexy_1880s_ladies_files/events3.jpg', '668', '800', 'Frances Folsom, young bride of President Grover Cleveland, married in the White House in 1886.\nRemnants of 1870’s style design. Cigars by\nPowell & Goldstein, Fact. 370, 21st Dist, NY.\n[2203 Wedding Bells, 1886]');
isPureISOLatin1 = true;
contentEncodingConstant = 4;
feedbackURL = "TODO";
showFeedbackButton = false;
feedbackEnabled = true;

var MINIMUM_FONT = "10";
var UNITS = "";

function elementFontSize(element)
{
    var fontSize = MINIMUM_FONT; 

    if (document.defaultView)
    {
        var computedStyle = document.defaultView.getComputedStyle(element, null);
        if (computedStyle)
        {
            fontSize = computedStyle.getPropertyValue("font-size");
        }
    }
    else if (element.currentStyle)
    {
        fontSize = element.currentStyle.fontSize;
    }

    if ((UNITS.length == 0) && (fontSize != MINIMUM_FONT))
    {
        UNITS = fontSize.substring(fontSize.length - 2, fontSize.length)
    }

    return parseFloat(fontSize);
}

function adjustFontSizeIfTooBig(idOfElement)
{
    var oTextBoxOuterDiv;
    var oTextBoxMiddleDiv;
    var oTextBoxInnerDiv;
    var oTextBoxOuterDiv = document.getElementById(idOfElement);
    
    if (oTextBoxOuterDiv)
    {
        oTextBoxMiddleDiv = getChildOfType(oTextBoxOuterDiv, "DIV", 0);
        if (oTextBoxMiddleDiv)
        {
            oTextBoxInnerDiv = getChildOfType(oTextBoxMiddleDiv, "DIV", 0);
            if (oTextBoxInnerDiv)
            {
                var offsetHeight = oTextBoxInnerDiv.offsetHeight;
                var specifiedHeight = offsetHeight;
                if (oTextBoxMiddleDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxMiddleDiv.style.height);
                }
                else if (oTextBoxOuterDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxOuterDiv.style.height);
                }
                if (offsetHeight > specifiedHeight)
                {
                    var smallestFontSize = 200;
                    
                    var aParaChildren = getParaDescendants(oTextBoxInnerDiv);
                    var oneLine = false;
                    for (i = 0; i < aParaChildren.length; i++)
                    {
                        var oParagraphDiv = aParaChildren[i];
                        var lineHeight = elementLineHeight(oParagraphDiv);
                        oneLine = oneLine || (lineHeight * 1.5 >= specifiedHeight);
                        if (oParagraphDiv.nodeName == "DIV")
                        {
                            var fontSize = elementFontSize(oParagraphDiv);
                            smallestFontSize = Math.min( smallestFontSize, fontSize );
                            for (j = 0; j < oParagraphDiv.childNodes.length; j++)
                            {
                                var oSpan = oParagraphDiv.childNodes[j];
                                if ((oSpan.nodeName == "SPAN") || (oSpan.nodeName == "A"))
                                {
                                    fontSize = elementFontSize(oSpan);
                                    smallestFontSize = Math.min( smallestFontSize, fontSize );
                                }
                            }
                        }
                    }
                    var minimum = parseFloat(MINIMUM_FONT);
                    
                    var count = 0
                    while ((smallestFontSize > minimum) && (offsetHeight > specifiedHeight) && (count < 10))
                    {
                        ++ count;
                        if (oneLine)
                        {
                            var oldWidth = parseInt(oTextBoxOuterDiv.style.width);
                            oTextBoxInnerDiv.style.width =
                                "" + oldWidth * Math.pow(1.05, count) + "px";
                        }
                        else
                        {
                            var scale = Math.max(0.95, minimum / smallestFontSize);
                            
                            for (i = 0; i < aParaChildren.length; i++)
                            {
                                var oParagraphDiv = aParaChildren[i];
                                if (oParagraphDiv.nodeName == "DIV")
                                {
                                    var paraFontSize = elementFontSize(oParagraphDiv) * scale;
                                    var paraLineHeight = elementLineHeight(oParagraphDiv) * scale;
                                    for (j = 0; j < oParagraphDiv.childNodes.length; j++)
                                    {
                                        var oSpan = oParagraphDiv.childNodes[j];
                                        if ((oSpan.nodeName == "SPAN") || (oSpan.nodeName == "A"))
                                        {
                                            var spanFontSize = elementFontSize(oSpan) * scale;
                                            var spanLineHeight = elementLineHeight(oSpan) * scale;
                                            oSpan.style.fontSize = spanFontSize + UNITS;
                                            oSpan.style.lineHeight = spanLineHeight + UNITS;
                                            smallestFontSize = Math.min( smallestFontSize, spanFontSize );
                                        }
                                    }
                                    oParagraphDiv.style.fontSize = paraFontSize + UNITS;
                                    oParagraphDiv.style.lineHeight = paraLineHeight + UNITS;
                                    smallestFontSize = Math.min( smallestFontSize, paraFontSize );
                                }
                            }
                        }
                        
                        offsetHeight = oTextBoxInnerDiv.offsetHeight;
                    }
                }
            }
        }
    }
}


function elementLineHeight(element)
{
    var lineHeight = MINIMUM_FONT; 
    
    if (document.defaultView)
    {
        var computedStyle = document.defaultView.getComputedStyle(element, null);
        if (computedStyle)
        {
            lineHeight = computedStyle.getPropertyValue("line-height");
        }
    }
    else if (element.currentStyle)
    {
        lineHeight = element.currentStyle.lineHeight;
    }
    
    if ((UNITS.length == 0) && (lineHeight != MINIMUM_FONT))
    {
        UNITS = lineHeight.substring(lineHeight.length - 2, lineHeight.length)
    }
    
    return parseFloat(lineHeight);
}

function adjustLineHeightIfTooBig(idOfElement)
{
    var oTextBoxOuterDiv;
    var oTextBoxMiddleDiv;
    var oTextBoxInnerDiv;
    var oTextBoxOuterDiv = document.getElementById(idOfElement);
    
    if (oTextBoxOuterDiv)
    {
        oTextBoxMiddleDiv = getChildOfType(oTextBoxOuterDiv, "DIV", 0);
        if (oTextBoxMiddleDiv)
        {
            oTextBoxInnerDiv = getChildOfType(oTextBoxMiddleDiv, "DIV", 0);
            if (oTextBoxInnerDiv)
            {
                var offsetHeight = oTextBoxInnerDiv.offsetHeight;
                var specifiedHeight = offsetHeight;
                if (oTextBoxMiddleDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxMiddleDiv.style.height);
                }
                else if (oTextBoxOuterDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxOuterDiv.style.height);
                }
                if (offsetHeight > specifiedHeight)
                {
                    var adjusted = true;
                    var count = 0;
                    while ((adjusted) && (offsetHeight > specifiedHeight) && (count < 10))
                    {
                        adjusted = false;
                        ++ count;
                        
                        var aParaChildren = getParaDescendants(oTextBoxInnerDiv);
                        for (i = 0; i < aParaChildren.length; i++)
                        {
                            var oParagraphDiv = aParaChildren[i];
                            if (oParagraphDiv.nodeName == "DIV")
                            {
                                var fontSize = elementFontSize(oParagraphDiv);
                                var lineHeight = elementLineHeight(oParagraphDiv) * 0.95;
                                if (lineHeight >= (fontSize * 1.1))
                                {
                                    oParagraphDiv.style.lineHeight = lineHeight + UNITS;
                                    adjusted = true;
                                }
                                
                                
                                
                                for (j = 0; j < oParagraphDiv.childNodes.length; j++)
                                {
                                    var oSpan = oParagraphDiv.childNodes[j];
                                    if ((oSpan.nodeName == "SPAN") || (oSpan.nodeName == "A"))
                                    {
                                        var fontSize = elementFontSize(oSpan);
                                        var lineHeight = elementLineHeight(oSpan) * 0.95;
                                        if (lineHeight >= (fontSize * 1.1))
                                        {
                                            oSpan.style.lineHeight = lineHeight + UNITS;
                                            var adjusted = true;
                                        }
                                    }
                                }
                            }
                        }
                        
                        offsetHeight = oTextBoxInnerDiv.offsetHeight;
                    }
                }
            }
        }
    }
}

var smallTransparentGif = "";
function fixupIEPNG(strImageID, transparentGif) 
{
    smallTransparentGif = transparentGif;
    if (windowsInternetExplorer && (browserVersion < 7))
    {
        var img = document.getElementById(strImageID);
        if (img)
        {
            var src = img.src;
            img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
            img.src = transparentGif;
            img.attachEvent("onpropertychange", imgPropertyChanged);
        }
    }
}

function fixupIEPNGBG(oBlock) 
{
    if (oBlock)
    {
        var currentBGImage = oBlock.currentStyle.backgroundImage;
        var currentBGRepeat = oBlock.currentStyle.backgroundRepeat;
        var urlStart = currentBGImage.indexOf('url(');
        var urlEnd = currentBGImage.indexOf(')', urlStart);
        var imageURL = currentBGImage.substring(urlStart + 4, urlEnd);

        if (imageURL.charAt(0) == '"')
        {
            imageURL = imageURL.substring(1);
        }
        
        if (imageURL.charAt(imageURL.length - 1) == '"')
        {
            imageURL = imageURL.substring(0, imageURL.length - 1);
        }

        var overrideRepeat = false;

        var filterStyle =
            "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
            imageURL +
            "', sizingMethod='crop');";

        if (RegExp("/C[0-9A-F]{8}.png$").exec(imageURL) != null)
        {
            filterStyle =
                "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
                imageURL +
                "', sizingMethod='scale');";

            overrideRepeat = true;
        }

        var backgroundImage = new Image();
        backgroundImage.src = imageURL;
        var tileWidth = backgroundImage.width;
        var tileHeight = backgroundImage.height; 
        
        var blockWidth = 0;
        var blockHeight = 0;
        if (oBlock.style.width)
        {
            blockWidth = parseInt(oBlock.style.width);
        }
        else
        {
            blockWidth = oBlock.offsetWidth;
        }
        if (oBlock.style.height)
        {
            blockHeight = parseInt(oBlock.style.height);
        }
        else
        {
            blockHeight = oBlock.offsetHeight;
        }

        if ((blockWidth == 0) || (blockHeight == 0))
        {
            return;
        }
        
        var wholeRows = 1;
        var wholeCols = 1;
        var extraHeight = 0;
        var extraWidth = 0;
        
        if ((currentBGRepeat.indexOf("no-repeat") != -1) ||
              ((tileWidth == 0) && (tileHeight == 0)) ||
              overrideRepeat)
        {
            tileWidth = blockWidth;
            tileHeight = blockHeight;

        }
        else if ((currentBGRepeat.indexOf("repeat-x") != -1) ||
              (tileHeight == 0))
        {
            wholeCols = Math.floor(blockWidth / tileWidth);
            extraWidth = blockWidth - (tileWidth * wholeCols);
            tileHeight = blockHeight;

        }
        else if (currentBGRepeat.indexOf("repeat-y") != -1)
        {
            wholeRows = Math.floor(blockHeight / tileHeight);
            extraHeight = blockHeight - (tileHeight * wholeRows);
            tileWidth = blockWidth;

        }
        else
        {
            wholeCols = Math.floor(blockWidth / tileWidth);
            wholeRows = Math.floor(blockHeight / tileHeight);
            extraWidth = blockWidth - (tileWidth * wholeCols);
            extraHeight = blockHeight - (tileHeight * wholeRows);
        }
        
        var wrappedContent = document.createElement("div");
        wrappedContent.style.position = "relative";
        wrappedContent.style.zIndex = "1";
        wrappedContent.style.left = "0px";
        wrappedContent.style.top = "0px";
        if (!isNaN(parseInt(oBlock.style.width)))
        {
            wrappedContent.style.width = "" + blockWidth + "px";
        }
        if (!isNaN(parseInt(oBlock.style.height)))
        {
            wrappedContent.style.height = "" + blockHeight + "px";
        }
        var pngBGFixIsWrappedContentEmpty = true;
        while (oBlock.hasChildNodes())
        {
            if (oBlock.firstChild.nodeType == 3)
            {
                if (RegExp("^ *$").exec(oBlock.firstChild.data) == null)
                {
                    pngBGFixIsWrappedContentEmpty = false;
                }
            }
            else
            {
                pngBGFixIsWrappedContentEmpty = false;
            }
            wrappedContent.appendChild(oBlock.firstChild);
        }
        if (pngBGFixIsWrappedContentEmpty)
        {
            wrappedContent.style.lineHeight = "0px";
        }
        
        var newMarkup = "";
        for (var currentRow = 0; 
             currentRow < wholeRows; 
             currentRow++)
        {
            for (currentCol = 0; 
                 currentCol < wholeCols; 
                 currentCol++)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + tileWidth + "px; " +
                        "height: " + tileHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
            
            if (extraWidth != 0)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + extraWidth + "px; " +
                        "height: " + tileHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
        }
        
        if (extraHeight != 0)
        {
            for (currentCol = 0; 
                 currentCol < wholeCols; 
                 currentCol++)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + tileWidth + "px; " +
                        "height: " + extraHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
            
            if (extraWidth != 0)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + extraWidth + "px; " +
                        "height: " + extraHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
        }
        oBlock.innerHTML = newMarkup;

        oBlock.appendChild(wrappedContent);
        oBlock.style.background= "";
    }
}

function fixupAllIEPNGBGs()
{
    if (windowsInternetExplorer && (browserVersion < 7))
    {
        try
        {
            var oDivNodes = document.getElementsByTagName('DIV');
            for (var iIndex=0; iIndex<oDivNodes.length; iIndex++)
            {
                var oNode = oDivNodes.item(iIndex);
                if (oNode.currentStyle &&
                    oNode.currentStyle.backgroundImage &&
                    (oNode.currentStyle.backgroundImage.indexOf('url(') != -1) &&
                    (oNode.currentStyle.backgroundImage.indexOf('.png")') != -1))
                {
                    fixupIEPNGBG(oNode);
                }
            }
        }
        catch (e)
        {
        }
    }
}

function getChildOfType(oParent, sNodeName, requestedIndex)
{
    var childrenOfType = oParent.getElementsByTagName(sNodeName);
    return (requestedIndex < childrenOfType.length) ?
           childrenOfType.item(requestedIndex) : null;
}

function getParaDescendants(oAncestor)
{
    var oParaDescendants = new Array();
    var oPotentialParagraphs = oAncestor.getElementsByTagName('DIV');
    for (var iIndex=0; iIndex<oPotentialParagraphs.length; iIndex++)
    {
        var oNode = oPotentialParagraphs.item(iIndex);
        if (oNode.className.lastIndexOf('paragraph') != -1)
        {
            oParaDescendants.push(oNode);
        }
    }
    return oParaDescendants;
}

function onPageLoad()
{
    detectBrowser();
    adjustLineHeightIfTooBig("id1");
    adjustFontSizeIfTooBig("id1");
    adjustLineHeightIfTooBig("id2");
    adjustFontSizeIfTooBig("id2");
    fixupAllIEPNGBGs();
    fixupIEPNG("id3", "Sexy_1880s_ladies_files/transparent.gif");
    return true;
}

function NBmouseover(index)
{
    var normal = document.getElementById("navbar_"+index+"_normal");
    var rollover = document.getElementById("navbar_"+index+"_rollover");
    if (normal && rollover)
    {
        normal.style.visibility = "hidden";
        rollover.style.visibility = "visible";
    }
    return true;
}

function NBmouseout(index)
{
    var normal = document.getElementById("navbar_"+index+"_normal");
    var rollover = document.getElementById("navbar_"+index+"_rollover");
    if (normal && rollover)
    {
        normal.style.visibility = "visible";
        rollover.style.visibility = "hidden";
    }
    return true;
}

var windowsInternetExplorer = false;
var browserVersion = 0;
function detectBrowser()
{
    windowsInternetExplorer = false;
    var appVersion = navigator.appVersion;
    if ((appVersion.indexOf("MSIE") != -1) &&
        (appVersion.indexOf("Macintosh") == -1))
    {
        var temp = appVersion.split("MSIE");
        browserVersion = parseFloat(temp[1]);
        windowsInternetExplorer = true;
    }
}

var inImgPropertyChanged = false;
function imgPropertyChanged()
{
    if ((window.event.propertyName == "src") && (! inImgPropertyChanged))
    {
        inImgPropertyChanged = true;
        var el = window.event.srcElement;
        if (el.src != smallTransparentGif)
        {
            el.filters.item(0).src = el.src;
            el.src = smallTransparentGif;
        }
        inImgPropertyChanged = false;
    }
}

