var ns1 = new Array(50)
var ns2 = new Array(50)
var ns3 = new Array(50)
var ns4 = new Array(50)
var n1 = new Array(50)
var n2 = new Array(50)
var n3 = new Array(50)
var n4 = new Array(50)
var vs1 = new Array(50)
var vs2 = new Array(50)
var vs3 = new Array(50)
var vs4 = new Array(50)
var v1 = new Array(50)
var v2 = new Array(50)
var v3 = new Array(50)
var v4 = new Array(50)
var a1 = new Array(50)
var a2 = new Array(50)
var a3 = new Array(50)
var a4 = new Array(50)
var q2 = new Array(50)
var q3 = new Array(50)
var q4 = new Array(50)
var g2 = new Array(50)
var g3 = new Array(50)
var wordStatus = ""
var exactWord = new Array(17) // holds each word at each position
var exactType = new Array(17) // hold each word type at each position
var singPlur = new Array(17) // if noun or verb, hold whether singular or plural

ns1[0]="hearts",n1[0]="heart"
ns1[1]="planks",n1[1]="plank"
ns1[2]="loves",n1[2]="love"
ns1[3]="planks",n1[3]="race"
ns1[4]="planks",n1[4]="stump"
ns1[5]="polls",n1[5]="Gore"
ns1[6]="crowds",n1[6]="crowd"
ns1[7]="kids",n1[7]="tax"
ns1[8]="walls",n1[8]="might"
ns1[9]="souls",n1[9]="soul"
ns1[10]="prayers",n1[10]="prayer"
ns1[11]="minds",n1[11]="Gore"
ns1[12]="Dicks",n1[12]="George"
ns1[13]="votes",n1[13]="Al"
ns1[14]="poor",n1[14]="church"
ns1[15]="youth",n1[15]="soul"
ns1[16]="hearts",n1[16]="heart"
ns1[17]="hands",n1[17]="hand"
ns1[18]="moms",n1[18]="Dick"
ns1[19]="goals",n1[19]="John"
ns1[20]="dads",n1[20]="life"
ns1[21]="votes",n1[21]="dad"
ns1[22]="works",n1[22]="vote"
ns1[23]="votes",n1[23]="speech"
ns1[24]="tests",n1[24]="tort"
ns1[25]="smiles",n1[25]="smile"
ns1[26]="tests",n1[26]="test"
ns1[27]="vows",n1[27]="Gov."
ns1[28]="goals",n1[28]="goal"
ns1[29]="threats",n1[29]="threat"
ns1[30]="men",n1[30]="man"
ns1[31]="hopes",n1[31]="hope"
ns1[32]="wives",n1[32]="wife"
ns1[33]="wars",n1[33]="war"
ns1[34]='rights',n1[34]='Al'
ns1[35]='walls',n1[35]='wall'
ns1[36]='chiefs',n1[36]='chief'
ns1[37]='laws',n1[37]='gift'
ns1[38]='needs',n1[38]='need'
ns1[39]='stocks',n1[39]='chance'
ns1[40]='rights',n1[40]='stock'
ns1[41]='laws',n1[41]='right'
ns1[42]='tests',n1[42]='pride'
ns1[43]='laws',n1[43]='fix'
ns1[44]='ads',n1[44]='Barb'
ns1[45]='torts',n1[45]='Jeb'
ns1[46]='courts',n1[46]='branch'
ns1[47]='cheers',n1[47]='cheer'
ns1[48]='needs',n1[48]='Bush'
ns1[49]='brutes',n1[49]='Bush'
ns2[0]="Bushes",n2[0]="Cheney"
ns2[1]="Clintons",n2[1]="Clinton"
ns2[2]="fathers",n2[2]="Senate"
ns2[3]="women",n2[3]="Congress"
ns2[4]="children",n2[4]="lobby"
ns2[5]="soldiers",n2[5]="Al Gore"
ns2[6]="battles",n2[6]="caucus"
ns2[7]="conflicts",n2[7]="warfare"
ns2[8]="fingers",n2[8]="conflict"
ns2[9]="towers",n2[9]="tower"
ns2[10]="nations",n2[10]="nation"
ns2[11]="losers",n2[11]="McCain"
ns2[12]="Bushes",n2[12]="platform"
ns2[13]="virtues",n2[13]="virtue"
ns2[14]="frat-boys",n2[14]="virtue"
ns2[15]="friendships",n2[15]="friendship"
ns2[16]="winners",n2[16]="Laura"
ns2[17]="taxes",n2[17]="winner"
ns2[18]="platforms",n2[18]="platform"
ns2[19]="parties",n2[19]="return"
ns2[20]="reforms",n2[20]="reform"
ns2[21]="rebirths",n2[21]="rebirth"
ns2[22]="Yankees",n2[22]="Bob Jones"
ns2[23]="spirits",n2[23]="spirit"
ns2[24]="mothers",n2[24]="mother"
ns2[25]="students",n2[25]="safety"
ns2[26]="evils",n2[26]="Tipper"
ns2[27]="crises",n2[27]="crisis"
ns2[28]="Bushes",n2[28]="George Bush"
ns2[29]="prospects",n2[29]="prospect"
ns2[30]="daughters",n2[30]="daughter"
ns2[31]="duties",n2[31]="duty"
ns2[32]="issues",n2[32]="issue"
ns2[33]="children",n2[33]="challenge"
ns2[34]='nations',n2[34]='success'
ns2[35]='morals',n2[35]='morale'
ns2[36]='duties',n2[36]='duty'
ns2[37]='teachers',n2[37]='Cold War'
ns2[38]='reforms',n2[38]='reform'
ns2[39]='factions',n2[39]='faction'
ns2[40]='programs',n2[40]='Texas'
ns2[41]='arrows',n2[41]='welfare'
ns2[42]='workers',n2[42]='worker'
ns2[43]='honors',n2[43]='honor'
ns2[44]='golf clubs',n2[44]='coattail'
ns2[45]='oilmen',n2[45]='oil man'
ns2[46]='dollars',n2[46]='Centrist'
ns2[47]='incomes',n2[47]='surplus'
ns2[48]='cigars',n2[48]='cigar'
ns2[49]='treaties',n2[49]='tax scheme'
ns3[0]="Senators",n3[0]="Senator"
ns3[1]="Hilarys",n3[1]="Hilary"
ns3[2]="Monicas",n3[2]="Monica"
ns3[3]="Levinsky",n3[3]="Levinsky"
ns3[4]="kingmakers",n3[4]="kingmaker"
ns3[5]="offices",n3[5]="president"
ns3[6]="Congressmen",n3[6]="Congressman"
ns3[7]="purposes",n3[7]="idealist"
ns3[8]="citizens",n3[8]="citizen"
ns3[9]="arms treaties",n3[9]="weaponry"
ns3[10]="defences",n3[10]="missile threat"
ns3[11]="rogue nation",n3[11]="rogue nation"
ns3[12]="free riders",n3[12]="death sentence"
ns3[13]="scare tactics",n3[13]="scare tactic"
ns3[14]="school vouchers",n3[14]="agenda"
ns3[15]="W's",n3[15]="W"
ns3[16]="negatives",n3[16]="Supreme Court"
ns3[17]="positives",n3[17]="olive branch"
ns3[18]="attack ads",n3[18]="deficit"
ns3[19]="polemics",n3[19]="Left-winger"
ns3[20]="platitudes",n3[20]="platitude"
ns3[21]="pork barrels",n3[21]="pork barrel"
ns3[22]="campaigners",n3[22]="campaigner"
ns3[23]="endorsements",n3[23]="endorsement"
ns3[24]="lobbyists",n3[24]="nominee"
ns3[25]="fundraisers",n3[25]="fundraiser"
ns3[26]="businesses",n3[26]="right-winger"
ns3[27]="Nay-sayers",n3[27]="Dick Cheney"
ns3[28]="optimists",n3[28]="optimist"
ns3[29]="presidents",n3[29]="compassion"
ns3[30]='elections',n3[30]='Abe Lincoln'
ns3[31]='citizens',n3[31]='Nay-sayer'
ns3[32]='possessions',n3[32]='character'
ns3[33]='smoke-filled rooms',n3[33]='stewardship'
ns3[34]='revenues',n3[34]='governor'
ns3[35]='rank and file',n3[35]='Stars and Stripes'
ns3[36]='hypocrites',n3[36]='Pentagon'
ns3[37]='running mates',n3[37]='Buchanan'
ns3[38]='immigrants',n3[38]='immigrant'
ns3[39]='wage-earners',n3[39]='veteran'
ns3[40]='tax credit',n3[40]='tax credits'
ns3[41]='governments',n3[41]='government'
ns3[42]='armed forces',n3[42]='policy'
ns3[43]='underdogs',n3[43]='underdog'
ns3[44]='prisoners',n3[44]='prisoner'
ns3[45]='decisions',n3[45]='front-runner'
ns3[46]='challenges',n3[46]='soft money'
ns3[47]='elections',n3[47]='Lieberman'
ns3[48]='legacies',n3[48]='legacy'
ns3[49]='incumbents',n3[49]='third party'
ns4[0]="orifices",n4[0]="Oval Office"
ns4[1]="highest standards",n4[1]="Oral Office"
ns4[2]="generations",n4[2]="generation"
ns4[3]="welfare reforms",n4[3]="prosperity"
ns4[4]="founding fathers",n4[4]="welfare reform"
ns4[5]="Republicans",n4[5]="missile defense"
ns4[6]="Republicans",n4[6]="George W."
ns4[7]="constituents",n4[7]="constituent"
ns4[8]="party bosses",n4[8]="solid judgement"
ns4[9]="interest groups",n4[9]="Pat Buchanan"
ns4[10]="conservatives",n4[10]="interest group"
ns4[11]="Christian Rightists",n4[11]="referendum"
ns4[12]="trickle-downers",n4[12]="conservative"
ns4[13]="survivalists",n4[13]="military"
ns4[14]="expectations",n4[14]="balanced budget"
ns4[15]="declarations",n4[15]="declaration"
ns4[16]="Reaganomics",n4[16]="independence"
ns4[17]="entitlements",n4[17]="President George"
ns4[18]='filibusters',n4[18]='President Bill'
ns4[19]='payroll taxes',n4[19]='President Al'
ns4[20]='sound investments',n4[20]='the elderly'
ns4[21]='lower taxes',n4[21]='segregation'
ns4[22]='negative tones',n4[22]='Midland, Texas'
ns4[23]='gentleladies',n4[23]='Don t Mess With Texas'
ns4[24]='executions',n4[24]='execution'
ns4[25]='technologies',n4[25]='where the buck stops'
ns4[26]='campaign slogans',n4[26]='right-wing loony'
ns4[27]='restored ideals',n4[27]='Supreme Court Judge'
ns4[28]='interest groups',n4[28]='infrastructure'
ns4[29]='party faithful',n4[29]='dedication'
ns4[30]='conspirators',n4[30]='restored honor'
ns4[31]='higher standards',n4[31]='legal system'
ns4[32]='lower standards',n4[32]='partisanship'
ns4[33]='Republicans',n4[33]='coalition'
ns4[34]='accusations',n4[34]='Joe Lieberman'
ns4[35]='hostilities',n4[35]='opposition'
ns4[36]='coalitions',n4[36]='campaign platform'
ns4[37]='United States',n4[37]='independence'
ns4[38]='partisan votes',n4[38]='diplomacy'
ns4[39]='initiatives',n4[39]='campaign finance'
ns4[40]='dictatorships',n4[40]='bureaucracy'
ns4[41]='Americans',n4[41]='firearms control'
ns4[42]='restored ideals',n4[42]='coalition'
ns4[43]='executives',n4[43]='executive'

vs1[0]="votes",v1[0]="vote"
vs1[1]="runs",v1[1]="run"
vs1[2]="cries",v1[2]="rise"
vs1[3]="calls",v1[3]="call"
vs1[4]="weeps",v1[4]="weep"
vs1[5]="thanks",v1[5]="thank"
vs1[6]="fights",v1[6]="fight"
vs1[7]="pays",v1[7]="pay"
vs1[8]="serves",v1[8]="serve"
vs1[9]="leads",v1[9]="lead"
vs1[10]="leaks",v1[10]="leak"
vs1[11]="sees",v1[11]="age"
vs1[12]="names",v1[12]="name"
vs1[13]="quotes",v1[13]="quote"
vs1[14]="gives",v1[14]="give"
vs1[15]="slips",v1[15]="slip"
vs1[16]="fades",v1[16]="fade"
vs1[17]="bows",v1[17]="vote"
vs1[18]="vows",v1[18]="vow"
vs1[19]="holds",v1[19]="hold"
vs1[20]="sets",v1[20]="set"
vs1[21]="runs",v1[21]="run"
vs1[22]="points",v1[22]="fix"
vs1[23]="turns",v1[23]="save"
vs1[24]="stands",v1[24]="tax"
vs1[25]="speaks",v1[25]="speak"
vs1[26]="lies",v1[26]="lie"
vs1[27]="talks",v1[27]="talk"
vs1[28]="starts",v1[28]="change"
vs1[29]="seeks",v1[29]="search"
vs1[30]='spends',v1[30]='spend'
vs1[31]='builds',v1[31]='build'
vs1[32]='learns',v1[32]='learn'
vs1[33]='dies',v1[33]='die'
vs1[34]='wins',v1[34]='wage'
vs1[35]='casts',v1[35]='win'
vs1[36]='mounts',v1[36]='cast'
vs1[37]='falls',v1[37]='mount'
vs1[38]='builds',v1[38]='fall'
vs1[39]='mourns',v1[39]='build'
vs1[40]='frees',v1[40]='free'
vs1[41]='bows',v1[41]='bow'
vs1[42]='soars',v1[42]='soar'
vs1[43]='boasts',v1[43]='save'
vs1[44]='saves',v1[44]='free'
vs1[45]='sings',v1[45]='sing'
vs1[46]='prays',v1[46]='pray'
vs1[47]='cheers',v1[47]='cheer'
vs1[48]='learns',v1[48]='learn'
vs1[49]='burns',v1[49]='burn'
vs2[0]="travels",v2[0]="travel"
vs2[1]="rallies",v2[1]="rally"
vs2[2]="marries",v2[2]="marry"
vs2[3]="brightens",v2[3]="brighten"
vs2[4]="softens",v2[4]="soften"
vs2[5]="welcomes",v2[5]="welcome"
vs2[6]="respects",v2[6]="respect"
vs2[7]="admires",v2[7]="admire"
vs2[8]="opens",v2[8]="open"
vs2[9]="provides",v2[9]="provide"
vs2[10]="transforms",v2[10]="transform"
vs2[11]="creates",v2[11]="create"
vs2[12]="studies",v2[12]="study"
vs2[13]="declares",v2[13]="declare"
vs2[14]="races",v2[14]="ignore"
vs2[15]="struggles",v2[15]="struggle"
vs2[16]="descends",v2[16]="descend"
vs2[17]="listens",v2[17]="listen"
vs2[18]="worries",v2[18]="worry"
vs2[19]="declines",v2[19]="decline"
vs2[20]="succeeds",v2[20]="succeed"
vs2[21]="ferments",v2[21]="ferment"
vs2[22]="stands by",v2[22]="stand by"
vs2[23]="prepares",v2[23]="prepare"
vs2[24]="prepares",v2[24]="deserve"
vs2[25]="believes",v2[25]="believe"
vs2[26]="defends",v2[26]="believe"
vs2[27]="defends",v2[27]="increase"
vs2[28]="protects",v2[28]="decrease"
vs2[29]="revolts",v2[29]="revolt"
vs2[30]='divides',v2[30]='divide'
vs2[31]='unites',v2[31]='unite'
vs2[32]='beckons',v2[32]='endorse'
vs2[33]='lectures',v2[33]='lecture'
vs2[34]='informs',v2[34]='inform'
vs2[35]='sustains',v2[35]='sustain'
vs2[36]='lobbies',v2[36]='lobby'
vs2[37]='pretends',v2[37]='pretend'
vs2[38]='measures',v2[38]='measure'
vs2[39]='stands proud',v2[39]='stand proud'
vs2[40]='stands tall',v2[40]='stand tall'
vs2[41]='wins big',v2[41]='win big'
vs2[42]='battles',v2[42]='battle'
vs2[43]='invests',v2[43]='invest'
vs2[44]='conspires',v2[44]='conspire'
vs2[45]='reaches',v2[45]='reach down'
vs2[46]='believes',v2[46]='believe'
vs2[47]='respects',v2[47]='respect'
vs2[48]='ages',v2[48]='deafen'
vs2[49]='happens',v2[49]='happen'
vs3[0]="promises",v3[0]="introduce"
vs3[1]="resonates",v3[1]="resonate"
vs3[2]="emerges",v3[2]="introduce"
vs3[3]="disappoints",v3[3]="disappoint"
vs3[4]="disappears",v3[4]="disappear"
vs3[5]="vanishes",v3[5]="diminish"
vs3[6]="recovers",v3[6]="recover"
vs3[7]="embraces",v3[7]="imagine"
vs3[8]="accuses",v3[8]="recollect"
vs3[9]="emerges",v3[9]="imagine"
vs3[10]="recollects",v3[10]="overwhelm"
vs3[11]="overwhelms",v3[11]="reawake"
vs3[12]="reawakes",v3[12]="replenish"
vs3[13]="convinces",v3[13]="remember"
vs3[14]="reaches deep",v3[14]="disappoint"
vs3[15]="recovers",v3[15]="recover"
vs3[16]="vanishes",v3[16]="nominate"
vs3[17]="emerges",v3[17]="recover"
vs3[18]="disappears",v3[18]="disappear"
vs3[19]="recovers",v3[19]="deliver"
vs3[20]="promises",v3[20]="takes the helm"
vs3[21]="hesitates",v3[21]="hesitate"
vs3[22]="imagines",v3[22]="imagine"
vs3[23]="promises",v3[23]="recover"
vs3[24]="takes command",v3[24]="stay the course"
vs3[25]="takes command",v3[25]="recover"
vs3[26]="endorses",v3[26]="recover"
vs3[27]="takes command",v3[27]="resonate"
vs3[28]="takes command",v3[28]="restore pride"
vs3[29]="promises",v3[29]="resonate"
vs3[30]='promises',v3[30]='resonate'
vs3[31]='takes command',v3[31]='take command'
vs3[32]='accuses',v3[32]='nominate'
vs3[33]='re-elects',v3[33]='re-elect'
vs3[34]='accuses',v3[34]='nominate'
vs3[35]='accuses',v3[35]='nominate'
vs3[36]='hesitates',v3[36]='diminish'
vs3[37]='hesitates',v3[37]='resonate'
vs3[38]='recollects',v3[38]='resonate'
vs3[39]='recollects',v3[39]='hypnotize'
vs3[40]='delivers',v3[40]='deliver'
vs3[41]='liberates',v3[41]='liberate'
vs3[42]='hesitates',v3[42]='embody'
vs3[43]='resonates',v3[43]='resonate'
vs3[44]='overcomes',v3[44]='overcome'
vs3[45]='inherits',v3[45]='inherit'
vs3[46]='resonates',v3[46]='resonate'
vs3[47]='recollects',v3[47]='recollect'
vs3[48]='recovers',v3[48]='recover'
vs3[49]='resonates',v3[49]='globalize'
vs4[0]="reconsiders",v4[0]="reconsider"
vs4[1]="passes muster",v4[1]="disenfranchise"
vs4[2]="diminishes",v4[2]="disintegrate"
vs4[3]="exhilarates",v4[3]="exhilarate"
vs4[4]="electrifies",v4[4]="electrify"
vs4[5]="electrocutes",v4[5]="electrocute"
vs4[6]="administers",v4[6]="administrate"
vs4[7]="electrocutes",v4[7]="reawaken"
vs4[8]="accelerates",v4[8]="accelerate"
vs4[9]="electrocutes",v4[9]="deregulate"
vs4[10]="gerrymanders",v4[10]="gerrymander"

a1[0]="clear"
a1[1]="low"
a1[2]="bright"
a1[3]="soft"
a1[4]="great"
a1[5]="pure"
a1[6]="thick"
a1[7]="free"
a1[8]="free"
a1[9]="safe"
a1[10]="rich"
a1[11]="white"
a1[12]="pure"
a1[13]="dry"
a1[14]="smooth"
a1[15]="deep"
a1[16]="warm"
a1[17]="clean"
a1[18]="just"
a1[19]="clear"
a1[20]="warm"
a1[21]="kind"
a1[22]="poor"
a1[23]="fresh"
a1[24]="old"
a1[25]="pure"
a1[26]="short"
a1[27]="huge"
a1[28]="free"
a1[29]="free"
a1[30]="clear"
a1[31]="brave"
a1[32]="white"
a1[33]="pure"
a1[34]="dry"
a1[35]="clear"
a1[36]="black"
a1[37]="tall"
a1[38]="rogue"
a1[39]="proud"
a1[40]='bold'
a1[41]='bold'
a1[42]='good'
a1[43]='great'
a1[44]='new'
a1[45]='bold'
a1[46]='brave'
a1[47]='broad'
a1[48]='rogue'
a1[49]='new'
a2[0]="eager"
a2[1]="daring"
a2[2]="decent"
a2[3]="ready"
a2[4]="able"
a2[5]="vivid"
a2[6]="glowing"
a2[7]="highest"
a2[8]="lowest"
a2[9]="fastest"
a2[10]="slowest"
a2[11]="greatest"
a2[12]="safest"
a2[13]="proudest"
a2[14]="valued"
a2[15]="greater"
a2[16]="bigger"
a2[17]="higher"
a2[18]="prouder"
a2[19]="wiser"
a2[20]="cleaner"
a2[21]="better"
a2[22]="risky"
a2[23]="foolish"
a2[24]="savvy"
a2[25]="unborn"
a2[26]="equal"
a2[27]="angry"
a2[28]="unborn"
a2[29]="cleaner"
a2[30]="safer"
a2[31]="humble"
a2[32]="corrupt"
a2[33]="better"
a2[34]="valued"
a2[35]="grass roots"
a2[36]="sunlit"
a2[37]="uphill"
a2[38]="noble"
a2[39]="humble"
a2[40]='noble'
a2[41]='newer'
a2[42]='cleaner'
a2[43]='better'
a2[44]='wiser'
a2[45]='prouder'
a2[46]='humble'
a2[47]='noble'
a2[48]='better'
a2[49]='newer'
a3[0]="different"
a3[1]="abundant"
a3[2]="ambitious"
a3[3]="ambitious"
a3[4]="passionate"
a3[5]="shimmering"
a3[6]="negative"
a3[7]="ambitious"
a3[8]="limited"
a3[9]="liberal"
a3[10]="ambitious"
a3[11]="liberal"
a3[12]="ambitious"
a3[13]="bottomless"
a3[14]="prosperous"
a3[15]="unbiased"
a3[16]="impartial"
a3[17]="prosperous"
a3[18]="unsteady"
a3[19]="limited"
a3[20]="unemployed"
a3[21]="untested"
a3[22]="unwelcome"
a3[23]="parental"
a3[24]="responsive"
a3[25]="religious"
a3[26]="unblinking"
a3[27]="unaided"
a3[28]="ambitious"
a3[29]="responsive"
a3[30]="important"
a3[31]="important"
a3[32]="inclusive"
a3[33]="groundshaking"
a3[34]='exclusive'
a3[35]='abundant'
a3[36]='limited'
a3[37]='dignified'
a3[38]='alarming'
a3[39]='dignified'
a3[40]='studious'
a3[41]='dignified'
a3[42]='unlikely'
a3[43]='unforeseen'
a3[44]='national'
a3[45]='limited'
a3[46]='extensive'
a3[47]='decisive'
a3[48]='breathtaking'
a3[49]='decisive'
a4[0]="responsible"
a4[1]="conservative"
a4[2]="regrettable"
a4[3]="forgettable"
a4[4]="memorable"
a4[5]="desirable"
a4[6]="conservative"
a4[7]="polemical"
a4[8]="polemical"
a4[9]="conservative"
a4[10]="universal"
a4[11]="responsible"
a4[12]="conservative"
a4[13]="formidable"
a4[14]="conservative"
a4[15]="undefeated"
a4[16]="compassionate"
a4[17]="compassionate"
a4[18]="fundamental"
a4[19]="compassionate"
a4[20]="essentially"
a4[21]="acceptable"
a4[22]="believable"
a4[23]="unskakeable"
a4[24]="bicameral"
a4[25]="bureaucratic"
a4[26]="accountable"
a4[27]="conservative"
a4[28]="polemical"
a4[29]="immovable"
a4[30]="formidable"
a4[31]="vulnerable"
a4[32]='admirable'
a4[33]='conservative'
a4[34]='honorable'
a4[35]='compassionate'
a4[36]='available'
a4[37]='apprehensive'
a4[38]='bewildering'
a4[39]='remarkable'
a4[40]='charitable'
a4[41]='affordable'
a4[42]='compassionate'
a4[43]='catastrophic'
a4[44]='catatonic'
a4[45]='charismatic'
a4[46]='charitable'
a4[47]="accountable"
a4[48]='compassionate'
a4[49]='responsible'
q2[0]="bluntly"
q2[1]="quickly"
q2[2]="softly"
q2[3]="proudly"
q2[4]="kindly"
q2[5]="coolly"
q2[6]="proudly"
q2[7]="proudly"
q2[8]="gently"
q2[9]="proudly"
q2[10]="proudly"
q2[11]="wisely"
q2[12]="brightly"
q2[13]="safely"
q2[14]="firmly"
q2[15]="bravely"
q2[16]="bravely"
q2[17]="bravely"
q2[18]="dryly"
q2[19]="bravely"
q2[20]="sharply"
q2[21]="bluntly"
q2[22]="bravely"
q2[23]="strongly"
q2[24]="proudly"
q2[25]="slowly"
q2[26]="proudly"
q2[27]="richly"
q2[28]="proudly"
q2[29]="warmly"
q2[30]="fairly"
q2[31]="fairly"
q2[32]="fairly"
q2[33]='blindly'
q2[34]='strictly'
q2[35]='proudly'
q2[36]='proudly'
q2[37]="fairly"
q2[38]='firmly'
q2[39]="frankly"
q2[40]="sadly"
q2[41]='firmly'
q2[42]='firmly'
q2[43]='freely'
q2[44]='freely'
q2[45]='faintly'
q2[46]='freely'
q2[47]='fiercely'
q2[48]='freely'
q2[49]='gladly'
q3[0]="alertly"
q3[1]="benignly"
q3[2]="angrily"
q3[3]="eagerly"
q3[4]="foolishly"
q3[5]="wastefully"
q3[6]="joyfully"
q3[7]="happily"
q3[8]="breathlessly"
q3[9]="tiredly"
q3[10]="rapidly"
q3[11]="sluggishly"
q3[12]="hungrily"
q3[13]="thirstily"
q3[14]="intensely"
q3[15]="eagerly"
q3[16]="vividly"
q3[17]="intensely"
q3[18]="prudently"
q3[19]="prudently"
q3[20]="prudently"
q3[21]="finally"
q3[22]="equally"
q3[23]="prudently"
q3[24]="carefully"
q3[25]="recklessly"
q3[26]="riskily"
q3[27]="brazenly"
q3[28]="cowardly"
q3[29]="cowardly"
q3[30]='cowardly'
q3[31]='cowardly'
q3[32]='cowardly'
q3[33]='completely'
q3[34]='cowardly'
q3[35]='alertly'
q3[36]='cowardly'
q3[37]='cowardly'
q3[38]='cowardly'
q3[39]='elderly'
q3[40]='benignly'
q3[41]='benignly'
q3[42]='benignly'
q3[43]='blissfully'
q3[44]='benignly'
q3[45]='recklessly'
q3[46]='recklessly'
q3[47]='boundlessly'
q3[48]='recklessly'
q3[49]='recklessly'
q4[0]="defiantly"
q4[1]="protectively"
q4[2]="disturbingly"
q4[3]="regrettably"
q4[4]="assuredly"
q4[5]="dramatically"
q4[6]="passionately"
q4[7]="memorably"
q4[8]="remarkably"
q4[9]="responsibly"
q4[10]="charitably"
q4[11]="responsibly"
q4[12]="prosperously"
q4[13]="conservatively"
q4[14]="conservatively"
q4[15]="honorably"
q4[16]="conservatively"
q4[17]="conservatively"
q4[18]="conservatively"
q4[19]="conservatively"
q4[20]="conservatively"
q4[21]="compassionately"
q4[22]="compassionately"
q4[23]="compassionately"
q4[24]="compassionately"
q4[25]="compassionately"
q4[26]="compassionately"
q4[27]="compassionately"
q4[28]="repentently"
q4[29]="compassionately"
q4[30]='admirably'
q4[31]='formidably'
q4[32]='formidably'
q4[33]='agreeably'
q4[34]='alarmingly'
q4[35]='decisively'
q4[36]='unsteadily'
q4[37]='unsteadily'
q4[38]='unsteadily'
q4[39]='unflinchingly'
q4[40]='appallingly'
q4[41]='approvingly'
q4[42]='unflinchingly'
q4[43]='ashamedly'
q4[44]='attractively'
q4[45]='audaciously'
q4[46]='primarily'
q4[47]='unflinchingly'
q4[48]='unflinchingly'
q4[49]='bloodthirstily'
g2[0]="passing"
g2[1]="coming"
g2[2]="giving"
g2[3]="shouting"
g2[4]="facing"
g2[5]="running"
g2[6]="moving"
g2[7]="singing"
g2[8]="crying"
g2[9]="gaining"
g2[10]="gaining"
g2[11]="gaining"
g2[12]="caring"
g2[13]="treading"
g2[14]="caring"
g2[15]="haunting"
g2[16]="voting"
g2[17]="vying"
g2[18]="learning"
g2[19]="hoping"
g2[20]="wishing"
g2[21]="praying"
g2[22]="leaning"
g2[23]="sharing"
g2[24]="gloating"
g2[25]="thrusting"
g2[26]="training"
g2[27]="laughing"
g2[28]="smiling"
g2[29]="frowning"
g2[30]="aiding"
g2[31]="funding"
g2[32]="founding"
g2[33]="helping"
g2[34]="voting"
g2[35]="speaking"
g2[36]="missing"
g2[37]="helping"
g2[38]='fumbling'
g2[39]="carping"
g2[40]="clouding"
g2[41]="hedging"
g2[42]='grieving'
g2[43]="pouting"
g2[44]="struggling"
g2[45]="praying"
g2[46]="urging"
g2[47]="cheering"
g2[48]="helping"
g2[49]="cheering"
g3[0]="following"
g3[1]="replying"
g3[2]="consuming"
g3[3]="defying"
g3[4]="welcoming"
g3[5]="beginning"
g3[6]="advancing"
g3[7]="promoting"
g3[8]="enforcing"
g3[9]="logrolling"
g3[10]="opening"
g3[11]="declaring"
g3[12]="listening"
g3[13]="succeeding"
g3[14]="fostering"
g3[15]="deserving"
g3[16]="preparing"
g3[17]="defending"
g3[18]="protecting"
g3[19]="dividing"
g3[20]="uniting"
g3[21]="rallying"
g3[22]="fundraising"
g3[23]="lobbying"
g3[24]="sustaining"
g3[25]="reforming"
g3[26]="peacekeeping"
g3[27]="defying"
g3[28]="investing"
g3[29]="tax-cutting"
g3[30]='enhancing'
g3[31]='measuring'
g3[32]='cost-cutting'
g3[33]='confronting'
g3[34]='mudslinging'
g3[35]='accusing'
g3[36]='lobbying'
g3[37]='electing'
g3[38]='emerging'
g3[39]='ground-swelling'
g3[40]='heart-warming'
g3[41]='promising'
g3[42]='push-polling'
g3[43]='emerging'
g3[44]='enduring'
g3[45]='downsizing'
g3[46]='contesting'
g3[47]='promising'
g3[48]='exploring'
g3[49]='bankrolling'

var wordType = 0
var wordBeat = 0
var wordPick = 0
var poemBeats = 0
var position = 1
var firstWord = true
var forceWord = false
var line1 = "true"
var line2 = "false"
var line3 = "false"
var tempWord = ""
var rndNum, pickOne
var word1 = ""
var comma = false
var line1WordCount = 0
var line2WordCount = 0
var line3WordCount = 0

// nouns = 1, adjectives = 2, verbs = 3, adverbs = 4, gerunds = 5

function chooseWord() {

// choose noun, verb, adjective, or adverb
comma = false
if (position == 1) {
rndNum = 4// noun, adjective, gerund or adverb
pickOne = Math.round(Math.random() * rndNum)
if (pickOne == 2) {
var sp = Math.round(Math.random() *2)// randomly choose singular or plural form
if (sp == 1) {
singPlur[1] = 0 // singular = 0, plural = 1
} else {
singPlur[1] = 1
}
wordType = 1// noun
} else if (pickOne == 3) {
wordType = 2// adjective
} else if (pickOne == 4) {
wordType = 5// gerund
} else if (pickOne == 1) {
wordType = 4// adverb
}
exactType[position] = wordType
}
if (position == 2) {// always preceded by noun, adjective or gerund

if (singPlur[1] == 1) {// if previous word plural, this plural too
singPlur[2] = 1
} else {
singPlur[2] = 0
}

rndNum = 2// follow with verb (noun), adjective or gerund + ,
if (exactType[1] == 1) { // word 1 is a noun
wordType = 3// follow with a verb
} else if (exactType[1] == 2) {// word 1 is an adjective
var pickOne = Math.round(Math.random() * rndNum)
if (pickOne == 1) {// adjective
wordType = 2
} else {
wordType = 1// noun
}
}else if (exactType[1] == 5) {// word 1 is a gerund, follow with noun or adverb
var pickOne = Math.round(Math.random() * rndNum)
if (pickOne == 1) {// adverb
wordType = 4
} else {
wordType = 1// noun
}
}else if (exactType[1] == 6) {// word 1 = preposition, follow with noun or adjective
var pickOne = Math.round(Math.random() * rndNum)
if (pickOne == 1) {// adjective
wordType = 2
} else {
wordType = 1// noun
}
}else if (exactType[1] == 4) {// word 1 = adverb, follow with gerund or noun/adjective + comma
var pickOne = Math.round(Math.random() * 3)
if (pickOne == 1) {// adjective
wordType = 2
//comma = true
} else if (pickOne == 2){
wordType = 1// noun
comma = true
} else {
wordType = 5// gerund
}
}
}
if (position > 2) {// all other cases

var sp = Math.round(Math.random() *2)// randomly choose singular or plural form
if (sp == 1) {
singPlur[position] = 0 // singular = 0, plural = 1
} else {
singPlur[position] = 1
}

if (exactType[(position - 1)] == 1) {// previous word was noun, follow with verb gerund or prep
if (singPlur[(position - 1)] == 1) {// assign plurality/singularity
singPlur[position] = 1
} else {
singPlur[position] = 0
}
rndNum = 2
pickOne = Math.round(Math.random() * rndNum) // randomly pick a word type
if (pickOne == 1) {// verb
wordType = 3
} else {
wordType = 5// gerund
}
}
if (exactType[(position - 1)] == 2) {// previous word was an adjective
// follow with adjective or noun

if (exactType[(position - 2)] == 2 && exactType[(position - 3)] == 2) {
wordType = 1// force noun if more than two adjectives
} else {
rndNum = 2
var pickOne = Math.round(Math.random() * rndNum)
if (pickOne == 1) {// adjective
wordType = 2
//comma = true
} else {
wordType = 1// noun
}
}
}
if (exactType[(position - 1)] == 3) {// previous word was a verb
// follow with anything but verb

if (singPlur[(position - 1)] == 1) {// assign plurality/singularity
singPlur[position] = 1
} else {
singPlur[position] = 0
}

rndNum = 5
pickOne = Math.round(Math.random() * rndNum)
if (pickOne <= 2) {// adverb 
wordType = 4
} else if (pickOne == 3) {// these need to be preceded by a comma or period.
wordType = 1// noun
if (exactType[(position - 2)] == 1) {
comma = true// if end of noun-verb pair, add a comma
}
} else if (pickOne == 4) {
wordType = 2// adjective
comma = true
} else if (pickOne == 5) {
wordType = 5// gerund
comma = true
}
}

if (exactType[(position - 1)] == 4) {// previous word was an adverb
// follow with anything but verb (for now)
rndNum = 5
pickOne = Math.round(Math.random() * rndNum)
if (pickOne == 1) {// adverb 
wordType = 4
comma = true
} else if (pickOne == 2 || pickOne == 3) {// these need to be preceded by a comma or period.
wordType = 1// noun
comma = true
} else if (pickOne == 4) {
wordType = 2// adjective
comma = true
} else if (pickOne == 5) {
wordType = 5// gerund - weighted
comma = true
}
}
if (exactType[(position - 1)] == 5) {// previous word was a gerund
// follow with anything but verb
rndNum = 5
pickOne = Math.round(Math.random() * rndNum)
if (pickOne == 1) {
wordType = 4// adverb
comma = true
} else if (pickOne == 2 || pickOne == 5) {// these need to be preceded by a comma or period.
wordType = 1// noun
} else if (pickOne == 3) {
wordType = 2// adjective
} else if (pickOne == 4) {
wordType = 5// gerund
comma = true
}
}
if (exactType[(position - 1)] == 6) {// word 1 = preposition, follow with noun or adjective
var pickOne = Math.round(Math.random() * rndNum)
if (pickOne == 1) {// adjective
wordType = 2
} else {
wordType = 1// noun
}
}
}
if (forceWord) {
var pickOne = Math.round(Math.random() * 3)
if (pickOne == 1) {
wordType = 4// adverb
} else if (pickOne == 2) {
wordType = 2// verb
} else if (pickOne == 3) {
wordType = 5// gerund
}
}
exactType[position] = wordType

// choose number of syllables, 1-4

if (wordType < 5) {  // currently have 4-syllable entries for nouns, adjectives, verbs and adverbs
rndNum = 4
} else { // max 3 syllables for gerunds, adverbs and preps (so far)
rndNum = 3
}
wordBeat = Math.round(Math.random() * rndNum)  // up to four syllables
if (wordBeat <= 0) { wordBeat = 2 }

// choose word from array
// different quantities of words for the various types
// nouns = 1 (50), adjectives = 2 (50), verbs = 3 (50), adverbs = 4 (50), gerunds = 5 (50), preps = 6 (10)
if (wordType == 1) { 
if (wordBeat == 1) { //183 1-s
wordPick = Math.round(Math.random() * 50) - 1
} else if (wordBeat == 2) {
wordPick = Math.round(Math.random() * 50) - 1  
} else if (wordBeat == 3) {
wordPick = Math.round(Math.random() * 50) - 1   
} else {
wordPick = Math.round(Math.random() * 44) - 1
}
} 
if (wordType == 2) {
if (wordBeat == 1) { //158 1-syllable adjectives
wordPick = Math.round(Math.random() * 50) - 1
} else if (wordBeat == 2 ){
wordPick = Math.round(Math.random() * 50) - 1  //334 2-syllable adjectives
} else if (wordBeat == 3 ){
wordPick = Math.round(Math.random() * 50) - 1  //198 2-syllable adjectives
} else {
wordPick = Math.round(Math.random() * 50) - 1
}
}
if (wordType == 3) {
if (wordBeat == 1) {
wordPick = Math.round(Math.random() * 50) - 1 // 205 1-syllable verbs
} else if (wordBeat == 2) {
wordPick = Math.round(Math.random() * 50) - 1 // 150 2-syllable verbs
} else if (wordBeat == 3) {
wordPick = Math.round(Math.random() * 50) - 1 // 51 3-syllable verbs
} else {
wordPick = Math.round(Math.random() * 11) - 1
}
}
if (wordType == 4) {
if (wordBeat == 2) {
wordPick = Math.round(Math.random() * 50) - 1 // 78 1-syl adv
} else if (wordBeat == 3) {
wordPick = Math.round(Math.random() * 50) - 1 // 226 2-syl adv
} else {
wordPick = Math.round(Math.random() * 50) - 1
}
}
if (wordType == 5) {
if (wordBeat == 2) {
wordPick = Math.round(Math.random() * 50) - 1 // 108 1-syl ger
} else if (wordBeat == 3) {
wordPick = Math.round(Math.random() * 50) - 1 // 94 3-syl ger
} else {
wordPick = Math.round(Math.random() * 30) - 1
}
}
if (wordType == 6) {
wordPick = Math.round(Math.random() * 30) - 1
}
if (wordPick < 0) { wordPick = 10 }

//wordPick = Math.round(Math.random() * 30) - 1    // an array entry from 0 to 29 (so far)
//if (wordPick < 0) { wordPick = 4 }  // correct for bug? sometimes result is -1


// get the word from the array

if (wordType == 1) { // noun
if (wordBeat == 1) { 
if (singPlur[position] == 1) {// lookup singular or plural form from array
word1 = ns1[wordPick]
} else {
word1 = n1[wordPick]
}
} else if (wordBeat  == 2) {
if (singPlur[position] == 1) {
word1 = ns2[wordPick]
} else {
word1 = n2[wordPick]
}
} else if (wordBeat  == 3) {
if (singPlur[position] == 1) {
word1 = ns3[wordPick]
} else {
word1 = n3[wordPick]
}
} else if (wordBeat  == 4) {
if (singPlur[position] == 1) {
word1 = ns4[wordPick]
} else {
word1 = n4[wordPick]
}
}
} else if (wordType == 2) { // adjective
if (wordBeat == 1) {
word1 = a1[wordPick]
} else if (wordBeat  == 2) {
word1 = a2[wordPick]
} else if (wordBeat  == 3) {
word1 = a3[wordPick]
} else if (wordBeat  == 4) {
word1 = a4[wordPick]
}
} else if (wordType == 3) { // verb
if (wordBeat == 1) {
if (singPlur[position] == 1) {
word1 = v1[wordPick]
} else {
word1 = vs1[wordPick]
}
} else if (wordBeat == 2) {
if (singPlur[position] == 1) {
word1 = v2[wordPick]
} else {
word1 = vs2[wordPick]
}
} else if (wordBeat  == 3) {
if (singPlur[position] == 1) {
word1 = v3[wordPick]
} else {
word1 = vs3[wordPick]
}
} else if (wordBeat  == 4) {
if (singPlur[position] == 1) {
word1 = v4[wordPick]
} else {
word1 = vs4[wordPick]
}
}

} else if (wordType == 4) { // adverb
if (wordBeat == 1) {
word1 = "x"// skipping 1-syllable adverbs
} else if (wordBeat  == 2) {
word1 = q2[wordPick]
} else if (wordBeat  == 3) {
word1 = q3[wordPick]
}
} else if (wordType == 5) { // gerund
if (wordBeat == 1) {
word1 = "x"// skipping 1-syllable gerunds
} else if (wordBeat  == 2) {
word1 = g2[wordPick]
} else if (wordBeat  == 3) {
word1 = g3[wordPick]
}
} else if (wordType == 6) { // preposition
if (wordBeat == 1) {
word1 = preps1[wordPick]
} else if (wordBeat  == 2) {
word1 = preps2[wordPick]
} else if (wordBeat  == 3) {
word1 = "x"// skipping 3-syllable preps
}
}
return word1
}
