function getNote() {
var note = new Array();
note[0] = "acacia";
note[1] = "alfalfa";
note[2] = "allspice";
note[3] = "almond";
note[4] = "aloe vera";
note[5] = "anise";
note[6] = "apple";
note[7] = "apricot";
note[8] = "arrowroot";
note[9] = "arugula";
note[10] = "asparagus";
note[11] = "avocado";
note[12] = "bacon";
note[13] = "baker's yeast";
note[14] = "bamboo";
note[15] = "banana";
note[16] = "band-aid";
note[17] = "barnyard";
note[18] = "basil";
note[19] = "bay leaves";
note[20] = "beef jerky";
note[21] = "belladonna";
note[22] = "bilberry";
note[23] = "birch";
note[24] = "black currant";
note[25] = "black pepper";
note[26] = "blackberry";
note[27] = "blackcurrant";
note[28] = "black-eyed pea";
note[29] = "blueberry";
note[30] = "bok choy";
note[31] = "brazil nut";
note[32] = "breadfruit";
note[33] = "broccoli";
note[34] = "brussels sprout";
note[35] = "burnt match";
note[36] = "butter";
note[37] = "buttered popcorn";
note[38] = "butternut squash";
note[39] = "butterscotch";
note[40] = "cabbage";
note[41] = "cannabis";
note[42] = "caper";
note[43] = "capsicum";
note[44] = "caramel";
note[45] = "caraway";
note[46] = "cardamom";
note[47] = "carob pod";
note[48] = "cassava";
note[49] = "catnip";
note[50] = "cauliflower";
note[51] = "cayenne pepper";
note[52] = "cedar";
note[53] = "celery seed";
note[54] = "chalk";
note[55] = "cheese puffs";
note[56] = "cherry";
note[57] = "chex mix";
note[58] = "chickweed";
note[59] = "chicory";
note[60] = "chives";
note[61] = "chocolate";
note[62] = "chokeberry";
note[63] = "chokecherry";
note[64] = "chrysanthemum";
note[65] = "cinnamon";
note[66] = "clove";
note[67] = "clover";
note[68] = "cocoa";
note[69] = "coconut";
note[70] = "coffee";
note[71] = "coltsfoot";
note[72] = "comfrey";
note[73] = "coriander";
note[74] = "corn chip";
note[75] = "corn nuts";
note[76] = "cranberry";
note[77] = "creme brulee";
note[78] = "cucumber";
note[79] = "cumin";
note[80] = "currant";
note[81] = "curry";
note[82] = "cut grass";
note[83] = "cut hay";
note[84] = "daikon";
note[85] = "dandelion";
note[86] = "demulcent";
note[87] = "diesel";
note[88] = "dill";
note[89] = "dust";
note[90] = "eggplant";
note[91] = "elderberry";
note[92] = "endive";
note[93] = "eucalyptus";
note[94] = "fava bean";
note[95] = "fennel";
note[96] = "feverfew";
note[97] = "fig";
note[98] = "figwort";
note[99] = "garlic";
note[100] = "geranium";
note[101] = "ginger";
note[102] = "ginkgo biloba";
note[103] = "ginseng";
note[104] = "goat's rue";
note[105] = "golden rod";
note[106] = "gooseberry";
note[107] = "granola";
note[108] = "grapefruit";
note[109] = "green beans";
note[110] = "green onion";
note[111] = "green pepper";
note[112] = "green tea";
note[113] = "guava";
note[114] = "gypsywort";
note[115] = "hawthorn";
note[116] = "hay";
note[117] = "hemp";
note[118] = "hibiscus";
note[119] = "holly";
note[120] = "honey";
note[121] = "honeydew melon";
note[122] = "honeysuckle";
note[123] = "hops";
note[124] = "horse";
note[125] = "horseradish";
note[126] = "huckleberry";
note[127] = "hummus";
note[128] = "iceberg lettuce";
note[129] = "jasmine";
note[130] = "juniper";
note[131] = "kale";
note[132] = "kerosene";
note[133] = "ketchup";
note[134] = "kiwifruit";
note[135] = "kohlrabi";
note[136] = "kumquat";
note[137] = "leafy";
note[138] = "leather";
note[139] = "leek";
note[140] = "lemon";
note[141] = "lemongrass";
note[142] = "lentil";
note[143] = "lima bean";
note[144] = "lime";
note[145] = "linden";
note[146] = "lingonberry";
note[147] = "linseed";
note[148] = "liquorice";
note[149] = "loganberry";
note[150] = "lychee";
note[151] = "mango";
note[152] = "marjoram";
note[153] = "marshmallow";
note[154] = "melon";
note[155] = "menthol";
note[156] = "mercaptain";
note[157] = "milkshake";
note[158] = "molasses";
note[159] = "moldy cork";
note[160] = "mouse";
note[161] = "mulberry";
note[162] = "muscat";
note[163] = "mushroom";
note[164] = "musk";
note[165] = "mustard seed";
note[166] = "nacho";
note[167] = "nutmeg";
note[168] = "okra";
note[169] = "onion ring";
note[170] = "orange";
note[171] = "orange blossom";
note[172] = "orange gummi bear";
note[173] = "paprika";
note[174] = "parsley";
note[175] = "parsnip";
note[176] = "passion fruit";
note[177] = "patchouli";
note[178] = "pawpaw";
note[179] = "peach";
note[180] = "pear";
note[181] = "pepper";
note[182] = "persimmon";
note[183] = "pickle relish";
note[184] = "pine";
note[185] = "pine nut";
note[186] = "pineapple";
note[187] = "pistachio";
note[188] = "plantain";
note[189] = "plastic";
note[190] = "plum";
note[191] = "pomegranate";
note[192] = "poppy seed";
note[193] = "pork rind";
note[194] = "pot roast";
note[195] = "potato chip";
note[196] = "pretzel";
note[197] = "prickly pear";
note[198] = "prune";
note[199] = "psyllium";
note[200] = "pumpkin";
note[201] = "pumpkin seeds";
note[202] = "quince";
note[203] = "radish";
note[204] = "raisin";
note[205] = "raspberry";
note[206] = "redcurrant";
note[207] = "rhubarb";
note[208] = "rice krispie treats";
note[209] = "road apple";
note[210] = "road tar";
note[211] = "roasted almond";
note[212] = "roasted hazelnut";
note[213] = "rose";
note[214] = "rosehips";
note[215] = "rosemary";
note[216] = "rubber";
note[217] = "rutabaga";
note[218] = "safflower";
note[219] = "saffron";
note[220] = "sage";
note[221] = "salvia";
note[222] = "sassafras";
note[223] = "sauerkraut";
note[224] = "sesame seed";
note[225] = "shallot";
note[226] = "siberian chaga";
note[227] = "skunk";
note[228] = "sloe berries";
note[229] = "smoke";
note[230] = "s'mores";
note[231] = "soy sauce";
note[232] = "soybean";
note[233] = "spearmint snuff";
note[234] = "spicy oak";
note[235] = "spinach";
note[236] = "st john's wort";
note[237] = "steel";
note[238] = "strawberry";
note[239] = "strawberry jam";
note[240] = "string cheese";
note[241] = "sumac";
note[242] = "sunflower seeds";
note[243] = "sweat";
note[244] = "swedish fish";
note[245] = "sweetcorn";
note[246] = "swiss chard";
note[247] = "tamarind";
note[248] = "tangerine";
note[249] = "thimbleberry";
note[250] = "thyme";
note[251] = "toasted oak";
note[252] = "toaster pastries";
note[253] = "tobacco leaves";
note[254] = "tootsie roll";
note[255] = "truffle";
note[256] = "tuna salad";
note[257] = "turnip";
note[258] = "vanilla";
note[259] = "venison";
note[260] = "violet";
note[261] = "walnut";
note[262] = "wasabi";
note[263] = "water chestnut";
note[264] = "watercress";
note[265] = "watermelon";
note[266] = "wet dog";
note[267] = "white melon";
note[268] = "white pepper";
note[269] = "whole wheat toast";
note[270] = "wild mushrooms";
note[271] = "wintergreen tic tacs";
note[272] = "witch hazel";
note[273] = "wormwood";
note[274] = "yam";
note[275] = "yeast";
note[276] = "yogurt";
note[277] = "yohimbe";
note[278] = "zucchini";
note[279] = "cassis";
note[280] = "dried flowers";
var ran = Math.round(Math.random()*(note.length-1));
var notegen = note[ran];
return notegen
}

function getOpening() {
var opening = new Array();
opening[0] = "The acidity is refreshing but not overly tart, and the balance of structure to fruit is excellent.";
opening[1] = "This is a simple but very, very tasty wine that delivers lots of pure fruit flavor without a lot of extraneous bells and whistles.";
opening[2] = "Any influence from oak is virtually indiscernible, making this a very promising partner for a wide array of fish or chicken dishes.";
opening[3] = "Bright and fresh as befits a crisp wine but still generously ripe, it hits just the right balance point between structure and softness to permit stand-alone sipping or pleasing paring with a wide range of moderately robust foods.";
opening[4] = "It's fairly full-bodied, very round and very smooth in texture, with a medium amount of tannin that is far outweighed by the rich texture.";
opening[5] = "Aromas and flavors are typically Mediterranean, suggesting ripe, almost baked dark fruits, earthiness and herbal nuances.";
opening[6] = "Soft and rounded in texture, with very ripe, tender tannins in the classic mold, this is a lovely wine made with impressive skill and taste.";
opening[7] = "This is a seriously delicious wine that succeeds by packing a lot of flavor and complexity onto a medium-bodied platform.";
opening[8] = "The fruit is free from the excessively overt sweetness that unmasks many wines of this type.";
opening[9] = "The texture is so pleasing that the wine is hard not to like.";
opening[10] = "In the glass, this wine opens up beautifully to offer rich, dense and intensely flavored qualities.";
opening[11] = "This full bodied wine fills the mouth with an abundance of fruit and spice flavors and displays soft, silky tannins.";
opening[12] = "A diversity several soil types, sun exposures and vine age creates a sinfully complex vintage.";
opening[13] = "In the glass, this wine opens up beautifully to offer rich, dense and intensely flavored qualities.";
opening[14] = "This is a solid, even gutsy vintage with a dense, chewy core, excellent structure, depth and persistence.";
opening[15] = "A rich purple-violet hue, the wine shows a rich, deep fruit concentration and jamminess.";
opening[16] = "Plush tannins and dense flavors are balanced with amazing richness and toasty oak.";
opening[17] = "On the palate, bright flavors and aromas are carried by a powerful structure and well-balanced acidity.";
var ran = Math.round(Math.random()*(opening.length-1));
var openinggen = opening[ran];
return openinggen
}

function getMiddle() {
var middle = new Array();
middle[0] = "This wine is crisp and refreshing but also deeply flavorful, featuring fruit notes recalling ~ and ~, with a shot of ~ enlivening the bright finish.";
middle[1] = "Very fresh and clean but still with notable depth of flavor and palate weight, this wine shows notes of ~ and ~, with nice accents of ~ and ~.";
middle[2] = "The lead fruit notes are ~ and ~ with a healthy dose of ~ lending complexity and backbone, but still leaving space on the stage for nice little nuances of ~, ~, and ~.";
middle[3] = "This wine shows very nice character, with notes of ~ and ripe ~, backed by accents of ~, ~ and ~.";
middle[4] = "Notes of ~ and ~ are vivid and fresh, with crisp citric edge that freshens and lifts the rich, ripe fruit.";
middle[5] = "Very nicely balanced and very broadly useful, this wine shows interesting notes suggesting both ~ and ~.";
middle[6] = "There is a juiciness to the wine as well as a hint of ~ and ~.";
middle[7] = "Notes of ~ lead the way on both the nose and palate, with just a little ~ as a sidelight.";
middle[8] = "This wine is light and admirably delicate, with real character from fresh, bright notes of ~ and with nice little sidelights of ~ and ~.";
middle[9] = "A dense color leads to forward ripe ~ aromas, with traces of ~.";
middle[10] = "The deep, tactile fruity flavors have hints of ~ and ~.";
middle[11] = "The merits of this wine are quite clear: expressive but nuanced aromas and flavors of ~ and ~ with lovely, subtle accents of ~ and ~.";
middle[12] = "This wine is soft and succulent in feel and flavor, with notes of ~ and ~ remaining in the forefront thanks to mercifully subtle use of oak.";
middle[13] = "Aromas of ~ contrasted with ~, ~ and a hint of ~ reveal that this is a wine to capture the imagination.";
middle[14] = "There are complex aromas of ~, ~, ~ and ~.";
middle[15] = "On the mid-palate, the ~ and ~ flavors from the new oak and the rich, dense ~ characters of fully mature fruit make this wine shine.";
middle[16] = "Rich ~, ~ and ~ flavors persist through the finish, highlighting the dense and complex character of this vintage.";
middle[17] = "In the nose, there are nuances of ~ and nicely-integrated ~ with a background of ~ and ~.";
middle[18] = "Enticing ~ and ~ character with ~ and ~ nuances with supple tannins, silky texture and a smooth lingering finish.";
middle[19] = "A lovely ruby red in color, this wine offers deep, fragrant aromas of ~, ~, ~ and ~.";
middle[20] = "This wine is soft yet lively on the palate, with rich flavors of ~ and ~ enhanced by a touch of ~.";
middle[21] = "Aromas of ~ and ~ pervade, with a hint of ~ incorporated in the nose.";
middle[22] = "Tight and focused on the palate with layers of ~, ~ and ~ balanced by fresh acidity.";
middle[23] = "There are complex aromas of ~, ~, ~ and ~.";
middle[24] = "On the mid-palate, the ~ and ~ flavors from the new oak make this wine shine.";
middle[25] = "Notes of ~, ~ and ~ flavors persist through the finish, highlighting the dense and complex character of this vintage.";
var ran = Math.round(Math.random()*(middle.length-1));
var middlegen = middle[ran];
return middlegen
}

function getEnding() {
var ending = new Array();
ending[0] = "It finishes with excellent acidity that is very well integrated with the fruit.";
ending[1] = "This is a delicious wine that will work beautifully with a range of foods, from white meat turkey to ham to meaty or mushroomy party hors d'oeuvres.";
ending[2] = "It's a dry, nearly full-bodied wine with pronounced fruity flavor, and soft texture cut through by a medium amount of fine-grained tannin.";
ending[3] = "Sipped without much thought, it's fruity and flavorful enough to please guests who don't drink wine often.";
ending[4] = "This wine is slightly less fine only because it is short across the palate - it's very up-front, you might say, and lacks the length that a better wine would have.";
ending[5] = "This wine shows impressively deep color and flavor for a bottle priced at this level, and the ripe flavors are true to the place but also sufficiently reserved and serious to display a fidelity to this noble grape.";
ending[6] = "Tasty and stylish, this is a winner at a great price.";
ending[7] = "This wine is very well made, and a real contender at this price, with none of the chunky, candied obviousness that separates winners from the losers in this range.";
ending[8] = "There's really no question that this is a sophisticated wine, but it is a very welcome experience to have sophistication whispered rather than screamed.";
ending[9] = "This wine has a liqueur-like aspect to its flavor intensity, sweet tannin, and a long, velvety-textured, juicy finish.";
ending[10] = "Very fruitful entry, crisp, with a long finish, this wine promises a long life of enjoyment.";
ending[11] = "This is a rich, complex wine balanced with good acidity, making it a fine accompaniment for a wide variety of dishes.";
ending[12] = "This would be exquisite paired with richer pastas, wild mushroom risotto, grilled salmon and herb-crusted pork tenderloin.";
ending[13] = "A well-balanced acidity accentuates the fine tannins which carry through to the long finish.";
ending[14] = "The wine is bright and clear with a long full textured finish.";
ending[15] = "The lingering finish goes on and on.";
ending[16] = "With its dark, saturated purple color, the this wine roars with powerful aromas and flavors.";
var ran = Math.round(Math.random()*(ending.length-1));
var endinggen = ending[ran];
return endinggen
}

function generate()
{
    var divcontent = (getOpening());
    var myStr = getMiddle();
    var i=0
    for (i=myStr.indexOf('~',i);i<=myStr.lastIndexOf('~');i++)
    {
        if(i=myStr.lastIndexOf('~'))
        {
            myStr = myStr.replace("~",getNote());
        }
    }
    divcontent = divcontent + (" " + myStr);
    divcontent = divcontent + (" " + getEnding());
    divcontent = divcontent + ("<br>&nbsp");
    divcontent = "<em>" + divcontent + "</em>";
    document.getElementById("wr").innerHTML = divcontent;
}