// creates an array of word objects
function word(word, definition) {
	this.word = word;
	this.definition = definition;
}

var wotm = new Array(new word("Aplomb", "Self-confident assurance; poise."));
wotm[wotm.length] = new word("Aret&eacute;", "Virtue; excellence; goodness.");
wotm[wotm.length] = new word("Bemuse", "To puzzle, confuse, or bewilder.");
wotm[wotm.length] = new word("Defenestration", "An act of throwing someone or something out of a window.");
wotm[wotm.length] = new word("Efficacious", "Producing or capable of producing a desired effect.");
wotm[wotm.length] = new word("Elegiac", "Having a mournful quality.");
wotm[wotm.length] = new word("Execrate", "Feel or express great loathing for.");
wotm[wotm.length] = new word("Firk", "To beat; to strike; to chastise. A freak; a trick; a quirk.");
wotm[wotm.length] = new word("Frood", "A really, amazingly together guy.");
wotm[wotm.length] = new word("Floccinaucinihilipilification", "The act of estimating as worthless.");
wotm[wotm.length] = new word("Hubris", "Excessive pride or self-confidence");
wotm[wotm.length] = new word("Imbroglio", "A difficult or intricate situation; an entanglement; a confused or complicated disagreement; a confused heap; a tangle.");
wotm[wotm.length] = new word("Loquacious", "Very talkative.");
wotm[wotm.length] = new word("Magnanimous", "Courageously noble in mind and heart; generous in forgiving; eschewing resentment or revenge; unselfish.");
wotm[wotm.length] = new word("Meanish", "Somewhat mean.");
wotm[wotm.length] = new word("Megrim", "A kind of sick nervous headache; a fancy; a whim; a freak; a humor.");
wotm[wotm.length] = new word("Numen (pl. Numina)", "A presiding divinity or spirit of a place; a spirit believed by animist to inhabit certain natural phenomena or objects; creative energy; genius.");
wotm[wotm.length] = new word("Obfuscate", "To darken; to obscure; to becloud; hence, to confuse; to bewilder.");
wotm[wotm.length] = new word("Orography", "The study of the phsical geography of mountatins and mountain ranges.");
wotm[wotm.length] = new word("Obsequious", "Obedient or attentive to an excessive or servile degree.");
wotm[wotm.length] = new word("Pariah", "A social outcast.");
wotm[wotm.length] = new word("Parse", "To analyze or separate into more easily processed parts.");
wotm[wotm.length] = new word("Perspicacious", "Having a ready insight into and understanding of things.");
wotm[wotm.length] = new word("Rhadamanthine", "Strictly and uncompromisingly just.");
wotm[wotm.length] = new word("Satisfice", "handy blended word combining satisfy with suffice; satisficing is optimization where all costs, including the cost of the optimization calculations themselves and the cost of getting information for use in those calculations, are considered.");
wotm[wotm.length] = new word("Scaramouch", "A stock character in Italian farce, a cowardly and foolish boaster of his own prowess, who is constantly being cudgelled by Harlequin; a rascal; a scamp.");
wotm[wotm.length] = new word("Slake", "To satisfy; to quench; to lessen the force or activity of; to moderate; to cool or refresh by wetting or moistening.");
wotm[wotm.length] = new word("Sonorous", "Capable of producing a deep or ringing sound; having a pleasing sound.");
wotm[wotm.length] = new word("Teleology", "The study of design or purpose in natural phenomena.");
wotm[wotm.length] = new word("Unctuous", "Excessively or ingratiatingly flattering; oily.");
wotm[wotm.length] = new word("Wirewater", "This melds the mainstream slang adjective &ldquo;wired&rdquo; with &ldquo;firewater&rdquo;; however, it refers to cafeinacious rather than alcoholic beverages.");
wotm[wotm.length] = new word("Zeitgeist", "The general intellectual, moral, and cultural climate of an era.");

function getWotm(x) {
	if(x < wotm.length)
	{
		var madeWord = wotm[x].word;
		return madeWord;
	}
	else return "No word for you!";
}

function getDefinition(y) {
	if(y < wotm.length)
	{
		var madeDefinition = wotm[y].definition;
		return madeDefinition;
	}
	else return "No word for you!";
}

function makeWotm(i)
{
	var made = " ";
	
	if(i < wotm.length)
	{
		made += "<font size = '+1'>" + getWotm(i) + "</font><br>";
		made += getDefinition(i);
		return made;
	}
	else return "No word for you!";
}

function randomWotm()
{
	var z = Math.floor(Math.random() * wotm.length);
	return makeWotm(z);
}

function listAllWotm()
{
	var allWotm = "<table align = 'center'><tr><td align = 'left' width = '750'><dl>";
	var wordCounter = 0;
	
	for(wordCounter; wordCounter < wotm.length; wordCounter++)
	{
	allWotm += "<dt>" + getWotm(wordCounter) + ":</dt>";
	allWotm += "<dd>" + getDefinition(wordCounter) + "</dd>";	
	}
	
	allWotm += "</dl></td></tr></table>";
	
	return allWotm;
}
