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('../Cuban_boxes_files/1847 8382.jpg', '264', '499', 'FIGARO was a popular cigar and cigarette in both Europe and the U.S. by 1848 when this box was made. The top brand is of a jester sitting on the floor with legs spread wide. The sticker on the left is an 1847 award.   [8382]');
slides[1] = new Slide('../Cuban_boxes_files/bv 8385.jpg', '562', '708', 'Interior label. The sloppy cut is indicative of the\nlittle significance given interior labels. The brand\nwas well known internationally, and as a result widely copied and counterfeited. \nSee Early Cuban Labels for an example. [8385]');
slides[2] = new Slide('../Cuban_boxes_files/1850 9844.jpg', '247', '262', 'Early Cuban boxes of 100 frequently had top labels, the marca branded on one end. Black ink on blue paper was popular despite being hard to read. WASHINGTON cigars displayed his portrait. 1850  \n[9844]');
slides[3] = new Slide('../Cuban_boxes_files/bg 7424.jpg', '644', '570', 'The front, back, and one end are paper covered. The inside label has nothing to do with Washington, depicting a rural farm scene. The inner label is decoratively framed and captioned like an art print. \n[7424]');
slides[4] = new Slide('../Cuban_boxes_files/cdb24.jpg', '572', '500', 'Remarkably rare example of Cuban use of cardboard in the mid 1850’s. Top and bottom are sewn with waxed thread. The poet Byron was\nan early literary apologist for cigars.\n[2824]');
slides[5] = new Slide('../Cuban_boxes_files/cdb25.jpg', '500', '533', 'Spanish & French includes guarantee of Cuban origin by the Governor, rationale for using cardboard to protect contents and instructions on how to \nopen the can. Earliest known upright cigar box.\n[2825]');
slides[6] = new Slide('../Cuban_boxes_files/DSCN0846.jpg', '548', '800', 'LA CORONA DE ESPANA NW box of 100 imported from Cuba, 1865. Top brand heat branded rather than steam press printed. US Customs oval stamp on right is unlisted. Box was nailed, tied and sealed with a tag.  [N9 - 20]');
slides[7] = new Slide('../Cuban_boxes_files/DSCN0847.jpg', '600', '800', 'LA CORONA DE ESPANA four sided flap (left side missing) with the same tag used outside the box here used to hold the flaps shut. Cuba, 1865\n[N9 - 21]');
slides[8] = new Slide('../Cuban_boxes_files/bp 7416.jpg', '623', '570', 'FLOR DE REGIO COSTALES uses an oval inner and no outer. Ties are almost universal until the mid 1870’s.  Cigars from Santiago, Cuba. Plain flaps are typically attached front, back and both sides.  1850’s \n[7416]');
slides[9] = new Slide('../Cuban_boxes_files/1865 9843.jpg', '264', '275', 'LA QUINTA ESENCIA brand by Jose Velez is the earliest use of gold ink (1865) I’ve found on a cigar box label. Gold was widely used by Belgian printers  1840-1860 but ruled deleterious to health, banned\nand replaced by buffed bronze powder.   [9843]');
slides[10] = new Slide('../Cuban_boxes_files/9829.jpg', '533', '500', 'One of the most popular Cuban brands in England and France for decades was JOCKEY CLUB featuring the 1850’s champion horse Monarque,  This example of a 100/13 box is from 1875. \n[9829]');
slides[11] = new Slide('../Cuban_boxes_files/1876 9066.jpg', '264', '316', 'Made in the San Francisco factory of major maker Francisco Perez del Rio in 1876 using the same label as the Cuban mother factory in Havana (label is printed in Cuba). Flaps glued from all four sides covering the cigars, protecting the label.  [9066]');
slides[12] = new Slide('../Cuban_boxes_files/8802B3AF09AF11DD.jpg', '600', '797', 'PARA VD. Y SUS AMIGOS (For You and Your Friends), a well known Cuban brand made in the 1870’s in the California factory owned or \nlicensed by Francisco Perez del Rio.\n[K11 - 2]');
slides[13] = new Slide('../Cuban_boxes_files/91C94F1109AF11DD.jpg', '533', '799', 'Inner label of PARA USTED (as it was popularly\ncalled by smokers), a very early example of\ngold colored Cuban printing.\n[K11 - 3]');
slides[14] = new Slide('../Cuban_boxes_files/1877 6773.jpg', '264', '432', 'ROMEO Y JULIETA was created in 1875. This box \nlid is from 1877, so probably their first label. \n[6773]');
slides[15] = new Slide('../Cuban_boxes_files/1885 6709.jpg', '264', '337', 'LA ROSA AROMATICA was a popular brand in the 1880’s. This box was imported in 1885. Women are an early and popular label theme in Cuba, the U.S. and Europe. A guy is a guy.\n[6709]');
slides[16] = new Slide('../Cuban_boxes_files/1887 9088.jpg', '264', '365', 'Cuban boxes of the 1880’s tend to look a lot like U.S. boxes from the same decade as this LA MIEL from 1887 attests.  \n[9088]');
slides[17] = new Slide('../Cuban_boxes_files/1887 9848.jpg', '299', '264', 'White edging, colorful inner label, decorated personalized flap attached at the front...all typical \nof the decade. LA MIEL means honey, hence \nthe beehive. Made by Tomas Diaz.\n[9848]');
slides[18] = new Slide('../Cuban_boxes_files/1887 9084.jpg', '264', '326', 'LA SUPERIOR was a minor brand whose maker is unknown. This box was sold in a small mining town in California in 1887. \n[9084]');
slides[19] = new Slide('../Cuban_boxes_files/1888 6721.jpg', '264', '353', 'Luis Corujo owned the 1840 PUNCH company from 1874 to 1884, though this box dates a few years later while owned by Manuel Lopez Fernandez \nwho also ran Juan Valle y Cia.  \n[6721]');
slides[20] = new Slide('../Cuban_boxes_files/1889 6706.jpg', '264', '440', 'LA FLOR DE TRESPALACIOS  1889 \n[6706]');
slides[21] = new Slide('../Cuban_boxes_files/1889 6708.jpg', '264', '294', 'LA FLOR DE TRESPALACIOS was another popular 1880’s and 90’s brand exported to the U.S.  1889 \n[6708]');
slides[22] = new Slide('../Cuban_boxes_files/1889 6702.jpg', '264', '435', 'LA CAROLINA 1889 first version of their label. Compare this to the box used 25 years later. \n[6702]');
slides[23] = new Slide('../Cuban_boxes_files/1890 6726.jpg', '264', '331', 'First version of BELINDA, founded in 1882. \nBox from mid to late 1880’s One of Cuba’s biggest sellers, the brand was discontinued in the 1960’s. \n[6726]');
slides[24] = new Slide('../Cuban_boxes_files/1890 6747 t.jpg', '264', '440', '1891 version of H DE CABANAS Y CARVAJAL. \nNote the tax stamp is crosswise so as not to interfere with labeling or the union stamp.\n[6747]');
slides[25] = new Slide('../Cuban_boxes_files/1890 6748.jpg', '264', '281', 'Interior of H DE CABANAS Y CARVAJAL from 1891. Note small plain side flaps. Cabañas seems to be\ndedicated to out-medaling everyone on the label. \n[6748]');
slides[26] = new Slide('../Cuban_boxes_files/12713.jpg', '406', '580', 'Two decades later, the brand still uses its “end label” on the front and its vitola (frontmark) on the end, a practice which many of the Cubans would adopt.  Imported into Canada between 1912-1915.\n[12713]');
slides[27] = new Slide('../Cuban_boxes_files/12707.jpg', '480', '600', 'The label changed around the Spanish-American War. The medals are now in a sharper arc and the two loners are now inside the arc. \n[12707]');
slides[28] = new Slide('../Cuban_boxes_files/1890 9071.jpg', '264', '374', 'Brand honoring naturalist ALEXANDER HUMBOLT (for whom Humboldt county and college are named) was created for the lucrative California market. 1890 \nMade by Joaquin Arguelles.  [9071]');
slides[29] = new Slide('../Cuban_boxes_files/1890 9070.jpg', '264', '301', 'Brand honoring naturalist ALEXANDER HUMBOLT was created for the lucrative California market. This box sold in gold-country town of Colusa in 1890. \nProduction of the brand was moved from Cuba \nto Florida by 1901.  [9070]');
slides[30] = new Slide('../Cuban_boxes_files/1891 6760.jpg', '264', '439', 'Nothing can be written about Cuban cigars without including feisty, and some claim traitorous, Gustave Bock whose sell-out to American Tobacco was vilified by the independents. Box from 1891. \n[6760]');
slides[31] = new Slide('../Cuban_boxes_files/1891 6761.jpg', '300', '264', 'One of Cuba’s best known brands EL AGUILA DEL ORO was usually called “Bock” by the folks who smoked them (including me). 1891. Brand was bought by the Tobacco Trust and ultimately moved to New Jersey in the 1930’s.  [6761]');
slides[32] = new Slide('../Cuban_boxes_files/1893 9075.jpg', '264', '299', 'H. Upmann imported right after the law changed, requiring place of origin to be marked on imported goods. Note hasty hand stamping on the front bottom of the box edging.  Their new factory opened only two years before this 1893 box.   [9075]');
slides[33] = new Slide('../Cuban_boxes_files/1895 6830.jpg', '388', '264', 'Made in Havana Cuba was added under their brand logo, but I don’t know when. Their label changed\nvery little over the years. \n[6830]');
slides[34] = new Slide('../Cuban_boxes_files/1901 9081.jpg', '264', '410', 'This 1901 box is included to illustrate the continued “1880’s look” to much Cuban packaging. A box exterior in  this condition does not qualify as very good. It’s good at best. Sadly, the inside is worse.\n[9081]');
slides[35] = new Slide('../Cuban_boxes_files/1901 9082.jpg', '264', '411', 'Despite its rarity (this may be the only surviving example) this is severe damage, lowering the box to “poor” grading and marks it of minimal value. I got it in a lot of 60 that I purchased. I don’t buy boxes \nin this  condition after 1860.  [9082]');
slides[36] = new Slide('../Cuban_boxes_files/1898 6742.jpg', '264', '349', 'The READY AND ROUGH brand name doesn’t seem in keeping with the luxurious image on this 1898 box. This brand appears on sales lists for\na few decades then disappears. \n[6742]');
slides[37] = new Slide('../Cuban_boxes_files/1904 6814.jpg', '389', '264', 'Wow! Partagas used a knockout\nof a package in 1904. \n[6814]');
slides[38] = new Slide('../Cuban_boxes_files/novelty3495.jpg', '386', '479', 'Another knockout. Exported to England for\nthe Christmas trade around 1900. Lace had\nbeen used for decoration on cigar boxes\nsince the 1870’s, perhaps before.\nMaker unknown to me.  To you?  [3495]');
slides[39] = new Slide('../Cuban_boxes_files/novelty3496.jpg', '408', '386', 'Exterior of box at left. This type package is called a “re-usable,” the meaning obvious. To see many\nother reusables, be sure to visit the exhibit\nof novelty packaging. \n[3496]');
slides[40] = new Slide('../Cuban_boxes_files/1909 9847.jpg', '264', '367', 'Exterior of one of many boxes used by \nF.E. Fonseca for his cigars made in both Cuba \nand New York. This 1909 box came from Havana. \n[9847]');
slides[41] = new Slide('../Cuban_boxes_files/1909 9846.jpg', '264', '351', 'One of the  island’s most inventive packagers, F.E. Fonseca cut an interesting figure in both Havana and New York where he owned his first factory at age 19. This box from 1909. Unusual Fonseca \nboxes are featured in other NCM exhibits. [9846]');
slides[42] = new Slide('../Cuban_boxes_files/1910 6703.jpg', '321', '264', 'This 1910 version of LA CAROLINA has added a decorative flap and a bunch of medals.\nCompare with the 1889 version. \n[6703]');
slides[43] = new Slide('../Cuban_boxes_files/1889 6702_2.jpg', '264', '435', '1889 version of the LA CAROLINA  label. Printing quality is more delicate as is the foliage. Note the absence of brand name on the inner label.\n[6702]');
slides[44] = new Slide('../Cuban_boxes_files/1905 6711.jpg', '264', '331', 'In 1905 LA MERIDIANA by Pedro Murias had just been bought up by the Tobacco trust.  \n[6711]');
slides[45] = new Slide('../Cuban_boxes_files/Photo 47 of 50.jpg', '400', '600', 'American senator and statesman Henry Clay visited Cuba in the late 1840’s and had a cigar named for him. This is the 1880’s version of HENRY CLAY.');
slides[46] = new Slide('../Cuban_boxes_files/Photo 48 of 50.jpg', '400', '600', 'Turn-of-the century version of HENRY CLAY.');
slides[47] = new Slide('../Cuban_boxes_files/Photo 49 of 50.jpg', '400', '600', 'Turn-of-the-century flap from HENRY CLAY \nfeaturing picture of Julian Alvarez.');
slides[48] = new Slide('../Cuban_boxes_files/1910 8743.jpg', '264', '427', 'HENRY CLAY was another important brand that was owned by the Tobacco Trust in 1910 when this box was made.  Only a few Cuban brands used tin because of the shipping cost and high humidity.\n[8743]');
slides[49] = new Slide('../Cuban_boxes_files/9831.jpg', '476', '500', 'American version of HENRY CLAY made\nin Factory 135, 3rd Massachusetts in 1932.\n[9831]');
slides[50] = new Slide('../Cuban_boxes_files/1910 6886.jpg', '364', '264', '50 tiny 2” long Cuban cigarettes were packed \n25 in each side in this 1910 box. \n[6886]');
slides[51] = new Slide('../Cuban_boxes_files/1910 6736.jpg', '287', '264', 'SIERRA brand was exported to Europe\nbut I don’t know when. Guessing 1910±, \n[6736]');
slides[52] = new Slide('../Cuban_boxes_files/1915 6866.jpg', '268', '264', 'LA BELLA ORTERO was exported to Canada in 1914. Note the green Cuban guarantee stamp which is found on Cuban export boxes from 1912 \nto the present.  See Dating Cuban boxes exhibit\nif you want to know more about them.  [6866]');
slides[53] = new Slide('../Cuban_boxes_files/1915 6875.jpg', '264', '426', 'LA FLOR DE CUBA was an important brand of \nM. Valle in 1915 when this 7-compartment assortment box was created. Assortments were usually created for the Christmas market. \n[6875]');
slides[54] = new Slide('../Cuban_boxes_files/68cuba2box5.jpg', '367', '570', 'A long popular brand worldwide, LA CORONA boxes looked like this in 1914, For some of their many frontmarks (vitolas) this “look” was continued \nalmost unchanged into the 1960’s.\n[6805]');
slides[55] = new Slide('../Cuban_boxes_files/1926 6804.jpg', '352', '264', ' In 1926 when this box was sold, American Tobacco was already making plans to move this and other prestigious Cuban brands to New Jersey. \n[6804]');
slides[56] = new Slide('../Cuban_boxes_files/68cuba2box8.jpg', '431', '698', 'After WWII, some frontmarks were packed in the same edging, nail tag and end label but white paper  attractively covered up cardboard and lesser quality box wood. White stamp shows they were domestic cigars made entirely of Cuban leaf,  [6808]');
slides[57] = new Slide('../Cuban_boxes_files/1938 6857.jpg', '345', '264', 'ALMIRANTE appears to be a late 1930’s brand with a very specific market in mind. The inner features a German Navy officer, the flap a submarine. A reminder that Germany and England often bought more Cuban cigars than the U.S.  [6857]');
slides[58] = new Slide('../Cuban_boxes_files/1942 6852.jpg', '264', '378', 'Segundo Alvarez is given credit as the brand’s creator, but I know little about this 1942 box. \nPlacing the U.S. tax stamp on top of the Cuban\nGuarantee could be viewed as a deliberate insult.\nAll stamps tended to be placed with courtesy. [6852]');
slides[59] = new Slide('../Cuban_boxes_files/1942 6854.jpg', '314', '264', 'Attractive inner and flap from 1942. Very few Cuban boxes are found from the 1930’s. Military personnel passed through Cuba by the score between 1942 and 1948 and had to take home a souvenir.\nWhat better than a box of Cuban cigars?  [6854]');
slides[60] = new Slide('../Cuban_boxes_files/1944 6847.jpg', '264', '301', 'PERLA DEL OCEANO sold retail during the war (1944) for 13¢, two for 25¢. Lesser known Cuban cigars appeared on the market because U.S. made cigars were rationed and more famous Cubans\nwere in short supply. [6847]');
slides[61] = new Slide('../Cuban_boxes_files/1944 6850.jpg', '264', '293', 'LA FLOR DE LIS is another example of a minor brand appearing in retail counters due to war shortages of both domestic and name brand Cubans.  1944 \n[6850]');
slides[62] = new Slide('../Cuban_boxes_files/1945 6704.jpg', '264', '286', 'Rare 1945 box from Rocha period (1921-1954). The brand didn’t become widely exported until the late 1950’s under Cifuentes, tho it had a strong presence in Southern California before then. Another war\nimport, but one that eventually caught on. [6704]');
slides[63] = new Slide('../Cuban_boxes_files/1945 6732.jpg', '309', '264', 'A rare full nude doesn’t need more than two colors to stand out in a cigar counter, especially named after the goddess of love.  Pricing was that of a medium priced Cuban, a popular price in 1945. \nLA CORONA Coronas sold for 35¢. [6732]');
slides[64] = new Slide('../Cuban_boxes_files/cuba1box90.jpg', '264', '402', 'HOYO DE MONTERREY believed to be from the late 1940’s, but date officially unknown. Red exterior and wrap around end label, which changes function over the years.  [6790]');
slides[65] = new Slide('../Cuban_boxes_files/1945 6797.jpg', '264', '362', 'HOYO DE MONTERREY in a distinctive box 1945.\nThe former end label is now used as a nail-tag guarantee stamp. \n[6797]');
slides[66] = new Slide('../Cuban_boxes_files/1951 6791.jpg', '264', '338', 'HOYO with a different end label, 1951. \nIf memory serves, this style was the most popular in\nthe 1950’s. The nail-tag guarantee tag is also gone.\nThis style end-label becomes popular with \nmany big Cuban export companies.  [6791]');
slides[67] = new Slide('../Cuban_boxes_files/1952 9856.jpg', '330', '264', 'There was no over-looking or mistaking this glorious 1952 presentation in any cigar counter, \nno matter how crowded. \n[9856]');
slides[68] = new Slide('../Cuban_boxes_files/68cuba2box13.jpg', '800', '575', 'A distinctive clear end label became increasingly\nimportant as expense forced Cuban cigars to be  most often packed in thin boxes of 25.\nEach company adopted a color.\n[6813]');
slides[69] = new Slide('../Cuban_boxes_files/9861.jpg', '649', '600', 'More end labels. JOSE PIEDRA, BELINDA, \nROMEO Y JULIETA, QUINTERO\n[9861]');
slides[70] = new Slide('../Cuban_boxes_files/1948 6755.jpg', '264', '348', 'This tiny logo on a large box was a different (how effective?) strategy. Personally, I think it looks lost and like the larger early version more than this 1948. The company may have used a larger label on smaller boxes. [6755]');
slides[71] = new Slide('../Cuban_boxes_files/1945 9089.jpg', '264', '275', 'Founded and very popular since 1880, this is the 1945 version of JOSE PIEDRA, a time when \nit was very strong in the U.S. market.\n[9089]');
slides[72] = new Slide('../Cuban_boxes_files/1946 9091.jpg', '264', '388', 'The very distinctive orangey-looking fake printed wood and bright red top oval made the PIEDRA box stand out in 1946 cigar counters.  \n[9091]');
slides[73] = new Slide('../Cuban_boxes_files/1945 9850.jpg', '317', '264', 'Five years before its 75th anniversary in 1950\nthis was ROMEO Y JULIETA, a popular cigar. \n[9850]');
slides[74] = new Slide('../Cuban_boxes_files/1945 9852.jpg', '264', '389', 'A ROMEO Y JULIETA imported into Canada in 1945. Note placement of white Canadian\ntax stamp on top of Cuban Guarantee. \n[9852]');
slides[75] = new Slide('../Cuban_boxes_files/1960 6776.jpg', '351', '264', 'The design changed little at the dawn of the Castro era, but the printing quality not quite as good.  1960 \n[6776]');
slides[76] = new Slide('../Cuban_boxes_files/1970 6780.jpg', '332', '264', 'Castro era version, 1970±, is basically the same \ntho side by side, subtle differences in \nprinting quality are evident. \n[6780]');
slides[77] = new Slide('../Cuban_boxes_files/1950 6843.jpg', '304', '264', 'FLOR DE JUAN LOPEZ was a best seller in the international market, outselling such favorites as JOSE PIEDRA and QUINTERO. Rarely seen in California in the early 50’s when this was sold. \n[6843]');
slides[78] = new Slide('../Cuban_boxes_files/1954 9857.jpg', '359', '264', 'Another top selling brand on the world market \nthat was seldom seen in the California of my collecting youth, QUINTERO is from 1954. \n[9857]');
slides[79] = new Slide('../Cuban_boxes_files/1952 6727.jpg', '362', '264', 'Between 1952 and 1954, changes took place \nin the quality of printing of the labels, tho the \nsame image was used.  \n[6727]');
slides[80] = new Slide('../Cuban_boxes_files/1954 9853.jpg', '264', '453', 'Like most Cuban brands, box design changed little over the years. This 1954 BELINDA box would have fit into a counter 30 years in either direction. \n[9853]');
slides[81] = new Slide('../Cuban_boxes_files/1954 9854.jpg', '355', '264', 'BELINDA two years later, 1954. \n[9854]');
slides[82] = new Slide('../Cuban_boxes_files/1952 6743.jpg', '272', '264', 'A popular brand in 1952, with a grey-green \nmarbled paper exterior. \n[6743]');
slides[83] = new Slide('../Cuban_boxes_files/1952 6785.jpg', '264', '322', 'Established in 1845, the brand was absorbed by Partagas in 1927 and made by them still. This\npre-Revolution box is from 1952±. You’ll pay\n20x as much for one of their cigars today. \n[6785]');
slides[84] = new Slide('../Cuban_boxes_files/1971 6786.jpg', '283', '264', 'Castro-era, 1971, version of the brand.\nColors are less subtle. The cigars\nare still as good.  \n[6786]');
slides[85] = new Slide('../Cuban_boxes_files/1953 6833.jpg', '328', '264', 'Both colored and black and white labels\nwere used by Upmann in 1953 when \nthis box of cigars was sold. \n[6833]');
slides[86] = new Slide('../Cuban_boxes_files/1953 6730.jpg', '264', '324', 'EL REY DEL MUNDO was once the most expensive cigar in the world, highly prized in European markets especially, but also sold in the U.S.  1953± \n[6730]');
slides[87] = new Slide('../Cuban_boxes_files/1960 6820.jpg', '326', '264', 'PARTAGAS in 1960. Not as pretty as\nthe turn of the century version, but\nstill distinctive thanks to the heavy\nuse of goldenrod color. \n[6820]');
slides[88] = new Slide('../Cuban_boxes_files/1970 6823.jpg', '377', '264', 'Made in Jamaica and you can hardly tell\nthe difference in the box.  1970± \n[6823]');
slides[89] = new Slide('../Cuban_boxes_files/CAKHU3EN.jpg', '414', '475', 'PARTAGAS ceramic jar. Date unknown. \nA number of other Cuban brands, including Ramon Allones, were packed in ceramic and/or Bakelite jars, all of which are prized by collectors. [w0001]\nNot in the NCM collection.');
slides[90] = new Slide('../Cuban_boxes_files/6865.jpg', '264', '342', 'Cuban brand about which I know little, other than it was around for decades. A fabulous carved chest of this brand can be seen in the Cuban Chests exhibit.\n[6865]');
slides[91] = new Slide('../Cuban_boxes_files/6876.jpg', '264', '317', 'Another Cuban brand about which I know little.\n[6876]');
slides[92] = new Slide('../Cuban_boxes_files/6877.jpg', '264', '274', 'Yet another brand I’d like visitors with\ninformation to fill in the history or date.\n[6877]');
slides[93] = new Slide('../Cuban_boxes_files/colusa9033.jpg', '299', '511', 'Poor condition VALLE Y SUAREZ box from 1881.\n[9033]');
slides[94] = new Slide('../Cuban_boxes_files/25A2F1E609A911DD.jpg', '404', '224', 'Cardboard five-pack from the 1940’s \nby J. Montero y Ca.\n[K18-24]');
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", "Cuban_boxes_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;
    }
}

