// All this function does is pick a random string from the list and return it to the caller.function pithSource() {		// Here's a new array filled with strings that are separated by commas	var pithArray = new Array(		"Emily, the deaf-and-blind shih tzu of our dear friend Victoria, is walking the hardwood floors of this W. 12th Street apartment at four A.M., her nails tapping out a message TO: DEAF AND BLIND DOGS OF THE WORLD (dit-dit-dot-dot-dit-dit-dit-dit)",		"FROM: EMILY (dit-dot-dot-dit-dot-dit-dot-dot-dit-dit-dot) ACTION: PEE ON THE FLOOR--NOW! A famous painter's nephew lives across the way, and his sons have these beer parties when the folks are away and throw up off the roof,",		"so on a given summer evening, you might go to sleep to the sound of the famous painter's grandnephews throwing up off the roof and you will definitely wake to Emily's senescent jazz-tap routines, like those of a doggie Judy Garland in Babes on Broadway",		"doing an endless series of spastic ball changes and waiting for her Mickey Rooney to appear in the form of a schnauzer or airedale, an unlikely event, since-- well, I was going to say that no dog will love her now, but then there's that whole syndrome",		"scientists call Davian behavior, the relentless sex drive noticed, for example, in the Bufo marinus frog, those three-pounders you see hopping down Miami sidewalks like little suitcases and the males of which species have been observed having intercourse",		"in the middles of busy highways with females who are not only dead but have been flattened by the tires of vehicles tearing past while old Warty has his grim, lusty way with what was once surely the fair Esmeralda,",		"an enchanting voluptuary then but now a crusty fly-magnet on the asphalt, a transformation overlooked by the amphibian gallant whose behavior was described in scientific literature, first jocularly, then permanently, as Davian, so \u00e0 propos is this term",		"for boundless lust that takes its name from the limerick about the hermit named Dave / who kept a dead whore in his cave / and had to admit / I'm a bit of a shit / but think of the money, etc. It gets better--or worse, depending on whether you're looking at it",		"from the linguistic or the moral viewpoint--for Davian behavior among birds is called Avian Davian behavior.... Hmmm. To paraphrase what Mar\u00e9chal Bosquet said about the charge of the Light Brigade, C'est magnifique, mais ce n'est pas l'amour. Oh, love, love, what the hell is it anyway?",		"Victoria loves John, her new husband, but she doesn't love Emily, this old crazy dog who wanders the apartment at night like Lady Macbeth, not incarnadining the multitudinous seas with Duncan's blood but jaundicing Victoria's carpets and our socks.",		"Love's got a Paolo-and-Francesca part, a can't-keep-my-hands-off- my-baby, an if-loving-you-is-wrong- I-don't-want-to-be-right side, but also a rational aspect, an emotion-recollected-in-tranquility component, both of which I recall from the rhythm and blues of my youth",		"with it's spraddle-legged shouters, yeah, but the calm guys, too, their voices smooth as cane syrup as they sing, All you fellows, gather 'round me, I'm going to give you some good advice! Sleepless, I am in Chinatown early next morning, gazing at the signs",		"and realizing I can't tell if I'm about to enter a Christian Science Reading Room or a brothel, so I press my face against storefront windows and finally see people buying pills and powders across a counter and go in, and the guy scowls at me",		"and I say I'm tired, I want something for energy, and he reaches behind himself and picks up this box and bangs it down on the counter and says, You take For Men Only, and I say, What's in it? and he says, You take For Men Only now!",		"So I start down the street with my bottle of For Men Only and open it and shake out a capsule in my hand, and it's long and orange and has green spots like spinach and it smells the way the yard does after you mow it, so I take one, and turn into,",		"I don't know, Garth Brooks....I'm running all over the place, not feeling amorous so much as wanting to, say, re-roof the house. I mean, I'm an older guy who's got it under control, but pass this stuff out to the male population in general,",		"and every New York street corner would look like Bat Day at Yankee Stadium. Farewell to chastity! If such a thing exists. And farewell to peace of mind, for sure. The chastest bachelor I know is my son Will's hermit crab, who lives by himself in a terrarium",		"and eats nothing but candy, those marshmallow Easter chicks, specifically-- oh, he'll take a little spinach dip, if there's nothing else, but he'd rather have the candy, which he eats with a single spindly feeler. He's as dainty as a maid, this crab, and might even be a maid,",		"but whatever he is, he brooks no nonsense from the succession of crab roommates Will has presented him with, at least one of which must be of the opposite gender, but with all of whom he has made war, not love. He'd rather have that candy, and who's to say he's wrong,",		"for if you can't have everything the way you want, at least you should be able to have a snack. Quite frankly, I don't think he's really trying, but then that's his business, not mine. The people I know who are lucky at love are pretty good at slinging it themselves,",		"and this includes both virtuous people and sleazeball lounge-lizard types, cut-rate Romeos who come on with the Barry White tapes and that junk about loving somebody and then setting them free-- I mean, why would you want to be free of someone who loves you to pieces?",		"I hate to keep paraphrasing the French, but why not, almost everything sounds better in French, because it's another language, and though we'll never be able to reproduce the precise sense of the original, that's okay, because we're talking about poetry here, not science,",		"and far from being harmed by lacunae and uncertainties, poetry is actually helped by them, so here goes: La beaut\u00e9 sera convulsive ou ne sera pas, said Andre Breton, and let love too be convulsive or let it not be at all. Chaps, let us rise above the hermit crabs",		"and hermits and old blind dogs, for when we invent our truest selves, the lovers we deserve will appear. Therefore let us learn another language. Let us set our hair on fire and charge into battle against a numberless foe. Let us sail upriver. Les us eat shit, drink blood, choke on pleasure.",		"I hear America singing; it sounds like Little Richard. He says, When she winks an eye, the bread slice turn to toast, and I dream of Jayne Mansfield. He says, When she smiles, the beefsteak become well-done, and I dream of Mamie Van Doren, Cyd Charisse.",		"Across the way, the famous painter's grandnephews vomit off the roof as Emily dances through the night, hearing nothing, seeing nothing, though she too dreams of her lover: Cerberus, guardian of hell, a dog's dog, three-headed and immortal."		);	/*	Here we multiply a random number between 1 and 0 to the length of the array		Then we take that result and round down to the smaller integer		And finally we return the string from the array that is at the chosen position.	*/	return pithArray[Math.floor(Math.random()*pithArray.length)];}


function pithyQuote () {
    /*	Before we mess around with the DOM (Document Object Module) we make sure the browser can handle it.        The browser will make all these commands true if it understands them.        If the browser doesn't understand them, we just won't do anything to the webpage.	*/    if (document.createElementNS && document.createTextNode && document.getElementById) {            // Let's make a <p> tag that we can add text to and insert into the webpage somewhere, and let's call it "pithyElement".        var pithyElement = document.createElementNS('http://www.w3.org/1999/xhtml','a');                /*	Here we'll make a text node out of the string and add quotes around it.            The quotes have slashes in front of them to keep Javascript from mistaking them for other things.            Quotes are special characters that Javascript needs to have "escaped", there are others too.                        Don't forget, the string comes from the string selector function, which is called pithSource().            And this function is the first thing you saw at the top of this file.                        Aaaaanyway, we have to make a text node from the string.            This is so the DOM can tell that it's text that needs to be displayed rather than, say, used for an attribute.            We immediately add our new text node to the <p> tag we just made.            Remember that tag? We named it "pithyElement" a second ago.	*/        pithyElement.appendChild(document.createTextNode('\u201C' + pithSource() + '\u201D'));                // Let's set the title attribute of pithyElement to the person who made the strings we are randomizing. He should get some credit right?        pithyElement.setAttribute('title','\u201CFor Men Only\u201D by David Kirby');        pithyElement.setAttribute('href','/words/kirby/formenonly.html');                /*	Lastly, we find the place in the document we want to put the random text.            Then we attach our <p> tag onto the end of it.                        In this case, we found an element by it's "id" attribute.            I purposefully made a div that had this attribute on it.                        The result is a div with pithyElement inside it, but at the end.	*/        var pithyContainer = document.createElementNS('http://www.w3.org/1999/xhtml','p');        pithyContainer.appendChild(pithyElement);        document.getElementById('header').appendChild(pithyContainer);    }
}

//This runs the pithyQuote command when the window loads
window.onload = pithyQuote;