var verb = new Array("noisome","grumpy","disturbed", "dripping", "crusty", "cantankerous", "rancid", "swollen", "leaking", "slimy", "parasitic", "mouldy", "crazy", "festering", "insane", "raving", "pathetic", "geriatric", "howling", "seething", "bubble", "smelly", "evil", "fetid", "rotten", "disgusting", "vile", "big", "small", "donkey", "rhino", "pig", "putrid", "foul", "stinking", "stale", "diseased", "reeking", "ghastly", "hideous", "feeble", "filthy", "frumpy", "dowdy", "shameful", "wanton", "brazen", "grovelling", "infected", "wretched", "oozing", "screaming", "irritating", "writhing", "pedantic", "contemptuous", "slobbering", "flatulant", "drooling", "pustulating", "revolting", "impotent", "grotesque","knobby","repugnant","repulsive","mutinous","gibbering");
var noun = new Array("fuzzbubble", "wad", "yokel", "amoeba", "ferret", "wench", "git", "pustule", "maggot", "loony", "flea", "Barbra Streisand", "toadstool", "bean", "abcess", "troll", "bottom burp", "plop", "nose", "fart", "poo", "face", "worm", "snot", "pus", "scab", "fiend", "hussy", "meat bag", "human", "wart", "toe jam", "dung", "burp", "secretion", "haggis", "ear wax", "sewage", "breath", "lips", "ears", "fool", "clod", "oaf", "vermin", "goblin", "trollop", "tart", "strumpet", "harlot", "rump", "slime", "dingleberry", "fluid", "turd", "muscle", "snatchpastry", "schmuck", "booger", "prolapse", "wretch", "smeg", "slug","mess", "pusbucket", "toejam", "nympho","haemorrhoid","hairball","furburger");
var noVerbs = verb.length;
var noNouns = noun.length;

function rndInsult() {
	verbNo = Math.round(Math.random() * (noVerbs - 1));
	nounNo = Math.round(Math.random() * (noNouns - 1));
	var alertstring = "You are a";
	var aeiou = "aeiou";
	if (aeiou.indexOf(verb[verbNo].charAt(0))>=0) { 
		alertstring=alertstring+"n";
	}
	alertstring=alertstring+" "+ verb[verbNo] + ' ' + noun[nounNo] + '.';
	alert(alertstring);
}

function dispWds() {
	var i;
	var win = window.open("","newWin","location=0,resizable=0,status=0,toolbar=0,menubar=0,scrollbars=1,width=400,height=480");
	win.document.write('<HTML><HEAD><TITLE>Word List</TITLE><style type="text/css"><!--td {  font-family: Arial, Helvetica, sans-serif}--');
	win.document.write('></style></HEAD><BODY><P ALIGN="center"><input type="button" value="Close" onclick="window.close()"></p><TABLE border="3" align="center" cellpadding="3" width="90%"><TR><TD align="center" width="50%"><b>Verbs</b></td><td align="center" width="50%"><b>Nouns</b></td></tr>');
	var maxNo = (noVerbs > noNouns?noVerbs:noNouns);

	for (i=0; i < maxNo; i++) {
		win.document.write('<tr><td align="center">');
		if (i < noVerbs) {
			win.document.write(verb[i]);
		}
		win.document.write('</td><td align="center">');
		if (i < noNouns) {
			win.document.write(noun[i]);
		}
		win.document.write('</td></tr>');
	}
	win.document.write('</table><P ALIGN="center"><input type="button" value="Close" onclick="window.close()"></p></body></html>');
	win.document.close();
	win.focus();
}

function matchFound(werd) {
	var i;
	var match = false;
	var maxNo = (noVerbs > noNouns?noVerbs:noNouns);
	for (i=0; i < maxNo; i++) {
		if (i < noVerbs) {
			if (verb[i] == werd) match = 1;
		}
		if (i < noNouns) {
			if (noun[i] == werd) match = true;
		}
	}
	return match;
}

