function qrand(n)
{
RandSeed = (RandMultiplier * RandSeed + RandIncrement) % 0x7fffffff
return (RandSeed >> 16) % n
}

function qinit()
{
RandMultiplier = 0x015a4e35
RandIncrement = 1
var now = new Date()
RandSeed = now.getTime() % 0xffffffff
FirstSentence = 1
FirstChristian = 1
}

function year0()
{
var n = 29
var p = qrand(n)
var year = 1859 + p
return year
}

function fWord(v,w,y,z)
{
var x; var word1;
x = qrand(4);
if (x == 3) word1 = v
else
if (x == 2) word1 = w
else
if (x == 1) word1 = y
else
word1 = z;
return word1;
}

function GenRandomSentenceTemplate()
{
var worldword = fWord("world","universe","cosmos","macrocosm")
var mindword = fWord("thought","mind","spirit","soul")

var w = "1 2 1."
var n = 26 + qrand(10)
var r = qrand(n)
if ( r == 1 )   w =    w = "1 2 1, 3 1 2 1."
else if ( r == 2 )      w = fWord("When ","If ","Whether ","Whenever ") + " 1 4, 1 4."
else if ( r == 3 )      w = fWord("When ","If ","Whether ","Whenever ") + " 1 2 1, then 1 4."
else if ( r == 4 )      w = "Sometimes 1 4, but 1 always 2 1!"
else if ( r == 5 )      w = "Most of us " + fWord("believe","think","wish","deny") + " that 1 2 1, but they should " + fWord("not forget","remember","recall","despair") + " that 7 1 4."
else if ( r == 6 )
{
   if ( FirstChristian )
   {
      FirstChristian = 0
      var p = qrand(5)
      if ( p == 0 ) w = "1, 1, and 1 are the " + fWord("puzzles","secrets","treasures","horrors") + " we cannot " + fWord("neglect","ignore","pray for","expect") + "."
      else if ( p == 1 ) w = "1 2 1 remains a mystery, God knows!"
      else if ( p == 2 ) w = "1, 1, and 1 are the secrets of the Christian myth!"
      else if ( p == 3 ) w = "1 and 1 are two problems not easily ignored."
      else if ( p > 3 ) w = "1 and 1 would give pause for considerable reflexion."
   }
   else
   {
	      w = "1 2 1."
   }
}
else if ( r == 7 )      w = "1 4, 3 1 2 1."
else if ( r == 8 )
{
      var p = qrand(5)
      if ( p == 0 ) w = "Now and then, 1 2 1."
      else if ( p == 1 ) w = "Occasionally, 1 2 1."
      else if ( p == 2 ) w = "At the Parousia, we expect, 1 2 1."
      else if ( p == 3 ) w = "The Resurrection led to 1 2 1."
      else if ( p > 3 ) w = "Not one thought 1 2 1."
}
else if ( r == 9 )      w = "1 4, and 1 4; however, 1 2 1."
else if ( r == 10 )
{
   if ( FirstSentence )
   {
      w = "1 2 1."
   }
   else
   {
      w = "Indeed, 1 2 1."
   }
}
else if ( r == 11 )
{
   if ( FirstSentence )
   {
      w = "1 2 1."
   }
   else
   {
      var p = qrand(3)
      if ( p == 0 ) w = "Furthermore, 1 4, and 1 2 1."
      if ( p == 1 ) w = "Moreover, 1 4, and 1 2 1."
      if ( p == 2 ) w = "" + fWord("Then again","And eventually","Ultimately","Consequently") + ", 1 4, and 1 2 1."
  }
}
else if ( r == 12 )
{
   if ( FirstSentence )
   {
      w = "1 2 1."
   }
   else
   {
      w = "For example, 1 shows that 1 2 1."
   }
}
else if ( r == 13 )     w = "When you believe 1, faith dictates that 1 4."
else if ( r == 14 )     w = "Many a tremulous 0 can 5 1, but it takes the " + GenAdjective() + " 0 to 5 1."
else if ( r == 15 )     w = "1 is 6."
else if ( r == 16 )     w = "When 1 is 6, 1 2 1."
else if ( r == 17 )     {
var tmpr = qrand(5)
if ( tmpr == 0 )         w = "" + fWord("you","I","we","they") + ", 0 of God, and 0 of Christ, according to the 0 of God's elect, acknowledge 1 which is " + GenPreposition() + " godliness in 1 of eternal life, which God that cannot lie promised before 1, but in " + fWord("due","former","old","imminent") + " times 4 his word, which is committed unto us according to the " + fWord("commandment","edict","pleasure","hilarity") + " of God our Saviour. "

else if ( tmpr == 1 )    w = "For this " + fWord("cause","jest","foolishness","deceit") + fWord("this son of man","the son of God","the Devil himself","a manipulator of fools") + " left some 0 in 1, that thou shouldst set in order 1, and so 4 in every " + fWord("city","latrine","home","soul") + " as thou wast appointed."

else if ( tmpr == 2 )    w = "A bishop must be 6, as the 0 of God, not selfwilled, not soon 6, not given to 0, no 0, not given to 1, but a lover of 0, a lover of 6 men, 6, indeed 6 and unquestionably 6, holding fast the 6 word as he hath been taught, that he may be able by 1 both to exhort and to convince the 0."

else if ( tmpr == 3 )    w = "Wherefore 7 5 0, that they may be 6 in the faith, not giving heed to 6 fables, and 1, that turn from the truth."

else w = "Blessings 0, mine own son after the common faith; 0, mercy, and 0, from 0 the Father and " + fWord("the Lord Jesus","Jesus","the saviour","the unbelievable") + "  Christ our 0."
}
else if ( r == 18 )     w = "This 0 is " + fWord("plainly false","true","admittedly incredible","true") + "."
else if ( r == 19 )     w = "If any be 6, so be the husband of one wife, having 6 " + fWord("children","cows","mistresses","arrests") + " accused of riot or unruly."
else if ( r ==  "20" )  w = fWord("Find time to pause for a moment and think about this. ","Can we believe this?","It must all be miraculous. ","If Christ was poor, we must beware the rich evangelist. ")
else if ( r == "21" )    w = "If the " + worldword + " is a " + worldword + " of " + mindword + ", then its " + fWord("creation","evolution","change","faults") + " must have been " + fWord("an act","a result","a consequence","a disease") + " of " + mindword + "."
FirstSentence = 0
return w
}

function GenNoun() {
var n = 270
var r = qrand(n)
var w = ""
if ( r == 0 )   w = "cedar of Lebanon"
else if ( r == 1 )      w = fWord("testament","false testament","novel testament","testament")
else if ( r == 2 )      w = fWord("abstraction","obstruction","daydream","nightmare")
else if ( r == 3 )      w = fWord("mother, even seductress","grandmother","doting mother","drunken")
else if ( r == 4 )      w = "first fruit"
else if ( r == 5 )      w = "cup of wine"
else if ( r == 6 )      w = "house of Jacob"
else if ( r == 7 )      w = "grain of sand"
else if ( r == 8 )      w = fWord("donkey journey","donkey dropping","donkey","ass")
else if ( r == 9 )      w = fWord("man","woman","male","female")
else if ( r == 10 )     w = "woman"
else if ( r == 11 )     w = "sinner"
else if ( r == 12 )     w = "sin"
else if ( r == 13 )     w = "fornicator"
else if ( r == 14 )     w = fWord("metaphor","allegory","allusion","implication")
else if ( r == 15 )     w = fWord("soul","soul","soul","lost soul")
else if ( r == 16 )     w = "rich man"
else if ( r == 17 )     w = fWord("blood letting","blood","ichor","blood")
else if ( r == 18 )     w = "gentile"
else if ( r == 19 )     w = "anomaly"
else if ( r == 20 )     w = fWord("temple","church","congregation","temple")
else if ( r == 21 )     w = "priest"
else if ( r == 22 )     w = "resurrection"
else if ( r == 23 )     w = "apprehension"
else if ( r == 24 )     w = "theologian"
else if ( r == 25 )     w = fWord("star","messianic star","constellation","sun")
else if ( r == 26 )     w = fWord("generation","thousand generations","lifetime","life")
else if ( r == 27 )     w = fWord("sign","prophecy","sign of the glory of Adam","sign of the Lord")
else if ( r == 28 )     w = fWord("garden","Garden of Eden","paradise","Eden")
else if ( r == 29 )     w = "baptism"
else if ( r == 30 )     w = "clergyman"
else if ( r == 31 )     w = fWord("sword","sword of judgement","scimitar","blade")
else if ( r == 32 )     w = fWord("sprinkling","water","sprinkling of water","sprinkling")
else if ( r == 33 )     w = fWord("mark","mark of the seven avenging angels","mark of Cain","mark")
else if ( r == 34 )     w = fWord("contract","covenant of the lamb","covenant","covenant of God")
else if ( r == 35 )     w = "member of the humblest flock"
else if ( r == 36 )     w = fWord("presbyter","overseer","bishop","deacon")
else if ( r == 37 )     w = fWord("high seat","seat","holy seat","throne")
else if ( r == 38 )     w = fWord("punishment","punishment for the wicked","retribution","penitence")
else if ( r == 39 )     w = fWord("desert place","solitary place","place","lonely place")
else if ( r == 40 )     w = "commentary"
else if ( r == 41 )     w = "judgement"
else if ( r == 42 )     w = "repentant feeling"
else if ( r == 43 )     w = fWord("prayer","prayer of mercy","hope of mercy","prayer")
else if ( r == 44 )     w = "place of eagles and vultures"
else if ( r == 45 )     w = fWord("deceit","lie","falsehood","untruth")
else if ( r == 46 )     w = fWord("tree","vine tree","olive tree","fig tree")
else if ( r == 47 )     w = fWord("pain","agony","anguish","torture") + fWord("caused by pricks and arrows","of unrequited love","of the Inquisition","burning to death")
else if ( r == 48 )     w = "new testament"
else if ( r == 49 )     w = fWord("warning","warning of the last days","warning of God's visitation","warning of trickery")
else if ( r == 50 )     w = fWord("hint","hint of hidden things","hint of lust","hint of licentiousness")
else if ( r == 51 )     w = fWord("money lender","lucre","tax collector","spy")
else if ( r == 52 )     w = "pesharist"
else if ( r == 53 )     w = fWord("legion","legion of powerful forces","legion of the damned","Roman legion")
else if ( r == 54 )     w = "sign of the times"
else if ( r == 55 )     w = "scriptural reference"
else if ( r == 56 )     w = "deep sense of humility"
else if ( r == 57 )     w = fWord("kiss","kiss of angels","kiss of death","kiss of a beloeved disciple")
else if ( r == 58 )     w = fWord("time","appointed time","variety of dates and times","wrong time")
else if ( r == 59 )     w = fWord("design","intelligent design","idiotic design","design")
else if ( r == 60 )     w = "example of God's design"
else if ( r == 61 )     w = "morsal of bread"
else if ( r == 62 )     w = "final age"
else if ( r == 63 )     w = "cosmic balance"
else if ( r == 64 )     w = "droplet of " + fWord("wine","water","blood","seed")
else if ( r == 65 )     w = "hatred that is everlasting"
else if ( r == 66 )     w = "torment unyielding"
else if ( r == 67 )     w = "salvation of the " + fWord("spirit","soul","Devil","sinner")
else if ( r == 68 )     w = fWord("spirit","spirit of truth","spirit of falsehood","angry spirit")
else if ( r == 69 )     w = fWord("swain","wench","fellow","shrew")
else if ( r == 70 )     w = fWord("disciple","follower","gullible follower","credulous convert")
else if ( r == 71 )     w = "way of the Essenes"
else if ( r == 72 )     w = "messiah"
else if ( r == 73 )     w = "defendant"
else if ( r == 74 )     w = "realm of light"
else if ( r == 75 )     w = "thanksgiving hymn"
else if ( r == 76 )     w = "beloved one"
else if ( r == 77 )     w = "righteous one"
else if ( r == 78 )     w = "draft of warm milk"
else if ( r == 79 )     w = "molten flux"
else if ( r == 80 )     w = "fig cake"
else if ( r == 81 )     w = "trial by ordeal"
else if ( r == 82 )     w = "day of the Lord"
else if ( r == 83 )     w = "saviour"
else if ( r == 84 )     w = "messianic ideal"
else if ( r == 85 )     w = "feeling of inferiority"
else if ( r == 86 )     w = "end of evil"
else if ( r == 87 )     w = "new age"
else if ( r == 88 )     w = "deliverer"
else if ( r == 89 )     w = "gesture"
else if ( r == 90 )     w = "soul of the angels of light"
else if ( r == 91 )     w = "good spirit"
else if ( r == 92 )     w = "abyss"
else if ( r == 93 )     w = "savage loss"
else if ( r == 94 )     w = "angel"
else if ( r == 95 )     w = "false god"
else if ( r == 96 )     w = "devil"
else if ( r == 97 )     w = "religious belief"
else if ( r == 98 )     w = "Jew"
else if ( r == 99 )     w = "Israelite"
else if ( r == 100 )    w = "prophet"
else if ( r == 101 )    w = "pit viper"
else if ( r == 102 )    w = "mortal sin"
else if ( r == 103 )    w = "minor interest"
else if ( r == 104 )    w = "movement in Judaism"
else if ( r == 105 )    w = "fig tree"
else if ( r == 106 )    w = "eternal life"
else if ( r == 107 )    w = "prophetic vision"
else if ( r == 108 )    w = "messianic banquet"
else if ( r == 109 )    w = "sign of God's presence"
else if ( r == 110 )    w = "one of the elect"
else if ( r == 111 )    w = "one of the chosen"
else if ( r == 112 )    w = "vestment"
else if ( r == 113 )    w = "commandment of God"
else if ( r == 114 )    w = "end of the world"
else if ( r == 115 )    w = "demonic presence"
else if ( r == 116 )    w = "apocalyptic sect"
else if ( r == 117 )    w = "kingdom of God"
else if ( r == 118 )    w = "cosmic battle"
else if ( r == 119 )    w = "side of Good"
else if ( r == 120 )    w = "purpose"
else if ( r == 121 )    w = "force of evil"
else if ( r == 122 )    w = "universe"
else if ( r == 123 )    w = "god they called Yehouah"
else if ( r == 124 )    w = "eschatology"
else if ( r == 125 )      w = "testament"
else if ( r == 126 )      w = "Pharisee"
else if ( r == 127 )      w = "disciple"
else if ( r == 128 )      w = "fault"
else if ( r == 129 )      w = "tradition of the elders"
else if ( r == 130 )      w = "numinous presence"
else if ( r == 131 )      w = "dozen apostles"
else if ( r == 132 )      w = "lily of the field"
else if ( r == 133 )      w = "son of man"
else if ( r == 134 )      w = "master"
else if ( r == 135 )     w = "harlot of Babylon"
else if ( r == 136 )     w = "authority"
else if ( r == 137 )     w = "kingship"
else if ( r == 138 )     w = "chariot of Ezekiel"
else if ( r == 139 )     w = "psalm"
else if ( r == 140 )     w = "tribute"
else if ( r == 141 )     w = "child"
else if ( r == 142 )     w = "sacred fish"
else if ( r == 143 )     w = "blood money"
else if ( r == 144 )     w = "scribe"
else if ( r == 145 )     w = "Sadducee"
else if ( r == 146 )     w = "synagogue"
else if ( r == 147 )     w = "multitude"
else if ( r == 148 )     w = "orphan"
else if ( r == 149 )     w = "son of David"
else if ( r == 150 )     w = "right hand"
else if ( r == 151 )     w = "profound thought"
else if ( r == 152 )     w = "deep conjecture"
else if ( r == 153 )     w = "airy speculation"
else if ( r == 154 )     w = "dreamlike quality"
else if ( r == 155 )     w = "cloudy surrealism"
else if ( r == 156 )     w = "absence of reality"
else if ( r == 157 )     w = "ghost"
else if ( r == 158 )     w = "spirit of the Lord"
else if ( r == 159 )     w = "angelic favour"
else if ( r == 160 )     w = "pneuma"
else if ( r == 161 )     w = "peculiar confusion"
else if ( r == 162 )     w = "sad disjuncture"
else if ( r == 163 )     w = "man of God"
else if ( r == 164 )     w = "vague discomfort"
else if ( r == 165 )     w = "absence of God in Sheol"
else if ( r == 166 )     w = "salutation in the marketplace"
else if ( r == 167 )     w = "whitened sepulchre"
else if ( r == 168 )     w = "ground"
else if ( r == 169 )     w = "feeling, as of sorrow"
else if ( r == 170 )     w = "prayer to unburden the soul"
else if ( r == 171 )     w = "heavenly Father"
else if ( r == 172 )     w = "deceit"
else if ( r == 173 )     w = "hour that seemed eternal"
else if ( r == 174 )     w = "pain caused by pricks and arrows"
else if ( r == 175 )     w = "kiss that betrayed the Lord"
else if ( r == 176 )     w = "law of Moses"
else if ( r == 177 )     w = "congregation"
else if ( r == 178 )     w = "church"
else if ( r == 179 )     w = "psalmist"
else if ( r == 180 )     w = "force of mental exertion"
else if ( r == 181 )     w = "psychological power"
else if ( r == 182 )     w = "epistemological interpretation"
else if ( r == 183 )     w = "ontological hypothesis"
else if ( r == 184 )     w = "tautological implication"
else if ( r == 185 )     w = "insanity"
else if ( r == 186 )     w = "counsellor of Arimathea"
else if ( r == 187 )     w = "symbolic hand-washing"
else if ( r == 188 )     w = "appearance of Pilate"
else if ( r == 189 )     w = "appearance as of the light"
else if ( r == 190 )     w = "perennial difficulty"
else if ( r == 191 )     w = "erudite expression"
else if ( r == 192 )     w = fWord("Prophet of Sin","Prophet Mohammed","saint Augustine","the schoolman Aquinas")
else if ( r == 193 )     w = "raging spume"
else if ( r == 194 )     w = "spirit of " + fWord("poorness","poverty","robbery","sulphur")
else if ( r == 195 )     w = "comfort of the meek"
else if ( r == 196 )     w = "shepherd with no sheep"
else if ( r == 197 )     w = "spirit of falsehood"
else if ( r == 198 )     w = "basket of loaves"
else if ( r == 199 )     w = "total of twelve"
else if ( r == 200 )     w = "parabolic expression"
else if ( r == 201 )     w = "obscure parable"
else if ( r == 202 )     w = "unintelligibility"
else if ( r == 203 )     w = "vaguesness of ideas"
else if ( r == 204 )     w = "obscurity"
else if ( r == 205 )     w = "perplexity"
else if ( r == 206 )     w = "mystification"
else if ( r == 207 )     w = "latent incomprehension"
else if ( r == 208 )     w = "transcendentalism"
else if ( r == 209 )     w = "sealed book"
else if ( r == 210 )     w = "enigma inside a paradox"
else if ( r == 211 )     w = "ambiguity"
else if ( r == 212 )     w = "quibbling interrogation"
else if ( r == 213 )     w = "conundrum"
else if ( r == 214 )     w = "feeling of inferiority"
else if ( r == 215 )     w = "uncertain imagery"
else if ( r == 216 )     w = "figurativeness"
else if ( r == 217 )     w = "dubious allegory"
else if ( r == 218 )     w = "allusion"
else if ( r == 219 )     w = "adumbration"
else if ( r == 220 )     w = "euphemistic saying"
else if ( r == 221 )     w = "misapprehension"
else if ( r == 222 )     w = "elucidation"
else if ( r == 223 )     w = "prognosis"
else if ( r == 224 )     w = "diagnosis"
else if ( r == 225 )     w = "travesty"
else if ( r == 226 )     w = "falsification"
else if ( r == 227 )     w = "parody"
else if ( r == 228 )     w = "perverse interpretation"
else if ( r == 229 )    w = "biblical scholar"
else if ( r == 230 )    w = "school of empty paraphrasty"
else if ( r == 231 )    w = "epiphany"
else if ( r == 232 )    w = "cipher"
else if ( r == 233 )    w = "secrecy"
else if ( r == 234 )    w = "palimpsest"
else if ( r == 235 )    w = "dishonest behaviour"
else if ( r == 236 )    w = "suppression"
else if ( r == 237 )    w = "ignorance"
else if ( r == 238 )    w = "mystery of God"
else if ( r == 239 )    w = "seclusion"
else if ( r == 240 )    w = "evasion"
else if ( r == 241 )    w = "mythology"
else if ( r == 242 )    w = "silence"
else if ( r == 243 )    w = "revelation"
else if ( r == 244 )    w = "confession"
else if ( r == 245 )    w = "avowal of faith"
else if ( r == 246 )    w = "evidence of absence"
else if ( r == 247 )    w = "cosmic battle"
else if ( r == 248 )    w = "Lord Jesus"
else if ( r == 249 )    w = "absence of evidence"
else if ( r == 250 )    w = "symbolic furnace"
else if ( r == 251 )    w = "obfuscation"
else if ( r == 252 )    w = "prophet Isaiah"
else if ( r == 253 )    w = "prophet Daniel"
else if ( r == 254 )    w = "lawgiver Moses"
else if ( r == 255 )    w = "Baptist John"
else if ( r == 256 )    w = "Judge Samuel"
else if ( r == 256 )    w = "king called Cyrus"
else if ( r == 256 )    w = "monor Prophet Amos"
else if ( r == 256 )    w = "Archangel Michael"
else if ( r > 256 )    w = "Christ Jesus"
return w
}

function GenPreposition()
{
var n = 15
var r = qrand(n)
var w = ""
if ( r == 0 )   w = "of"
else if ( r == 1 )      w = "from"
else if ( r == 2 )      w = "near"
else if ( r == 3 )      w = "about"
else if ( r == 4 )      w = "around"
else if ( r == 5 )      w = "for"
else if ( r == 6 )      w = "toward"
else if ( r == 7 )      w = "over"
else if ( r == 8 )      w = "behind"
else if ( r == 9 )      w = "out of"
else if ( r == 10 )     w = "related to"
else if ( r == 11 )     w = "defined by"
else if ( r == 12 )     w = "beside"
else if ( r == 13 )     w = "living with"
else if ( r > 13 )     w = "beyond"
return w
}

function GenNounPhrase(depth)
{
var phraseKind = qrand(19)
var s = ""
if ( phraseKind <= 5 || depth>0 )
{
s = GenNoun()
}
else if ( phraseKind <= 13  )
{
s = GenAdjective() + " " + GenNoun()
}
else if ( phraseKind == 14 )
{
s = GenNoun() + " " + GenPreposition() + " " + GenNounPhrase(depth+1)
}
else if ( phraseKind == 15 )
{
s = GenNoun() + " or " + GenNoun()
}
else if ( phraseKind == 16 )
{
s = GenNoun() + " or " + GenNounPhrase(depth+1)
}
else if ( phraseKind == 17 )
{
s = GenNoun() + fWord(", yea ",", even ",", none other than ",", to wit ") + GenNoun()
}
else if ( phraseKind == 18 )
{
s = GenNoun() + fWord(", yea ",", even ",", none other than ",", to wit ") + GenNounPhrase(depth+1)
}
var r = qrand(100)
if ( r < 60 )
{
s = "the " + s
}
else if ( r < 65 )
{
s = "another " + s
}
else if ( r < 70 )
{
s = "some kind of " + s
}
else
{
var c = s.substring(0,1).toLowerCase()
if  (c=='a' || c=='e' || c=='i' || c=='o' || c=='u')  {
s = "an " + s
}
else
{
s = "a " + s
}
}
return s
}

function GenAdverb() {
var n = 30
var r = qrand(n)
var s = ""
if ( r == 0 )   s = "knowingly"
else if ( r == 1 )      s = "problematically"
else if ( r == 2 )      s = "greedily"
else if ( r == 3 )      s = "hesitantly"
else if ( r == 4 )      s = "secretly"
else if ( r == 5 )      s = "carelessly"
else if ( r == 6 )      s = "thoroughly"
else if ( r == 7 )      s = "barely"
else if ( r == 8 )      s = "ridiculously"
else if ( r == 9 )      s = "righteously"
else if ( r == 10 )     s = "hardly"
else if ( r == 11 )     s = "eagerly"
else if ( r == 12 )     s = "feverishly"
else if ( r == 13 )     s = "possibly"
else if ( r == 14 )     s = "inexorably"
else if ( r == 15 )     s = "accurately"
else if ( r == 16 )     s = "accidentally"
else if ( r == 17 )     s = "completely"
else if ( r == 18 )     s = "usually"
else if ( r == 19 )     s = "probably"
else if ( r == 20 )     s = "underhandedly"
else if ( r == 21 )     s = fWord("most","more","least","less")
else if ( r == 22 )     s = "wisely"
else if ( r == 23 )     s = "ostensibly"
else if ( r == 24 )     s = "somewhat"
else if ( r == 25 )     s = "overwhelmingly"
else if ( r == 26 )     s = "absentmindedly"
else if ( r == 27 )     s = "excrutiatingly"
else if ( r == 28 )     s = fWord("seldom","almost","often","never")
return s
}

function GenAdjective() {
var n = 112
var r = qrand(n)
var w = ""
if ( r == 0 )   w = "transcendental"
else if ( r == 1 )      w = "ephemeral"
else if ( r == 2 )      w = "gentle"
else if ( r == 3 )      w = "dead"
else if ( r == 4 )      w = "treacherous"
else if ( r == 5 )      w = "loyal"
else if ( r == 6 )      w = "consecrated"
else if ( r == 7 )      w = "evanescent"
else if ( r == 8 )      w = "annoying"
else if ( r == 9 )      w = "hefty"
else if ( r == 10 )     w = "wrong"
else if ( r == 11 )     w = "mass"
else if ( r == 12 )     w = "cynical"
else if ( r == 13 )     w = "national"
else if ( r == 14 )     w = "false"
else if ( r == 15 )     w = "magnificent"
else if ( r == 16 )     w = "alleged"
else if ( r == 17 )     w = "true"
else if ( r == 18 )     w = "gratifying"
else if ( r == 19 )     w = "elusive"
else if ( r == 20 )     w = "revered"
else if ( r == 21 )     w = "spartan"
else if ( r == 22 )     w = "righteous"
else if ( r == 23 )     w = "mysterious"
else if ( r == 24 )     w = "otherworldly"
else if ( r == 25 )     w = "just"
else if ( r == 26 )     w = "simple"
else if ( r == 27 )     w = "complicated"
else if ( r == 28 )     w = "statesmanlike"
else if ( r == 29 )     w = "stoic"
else if ( r == 30 )     w = "hypnotic"
else if ( r == 31 )     w = "dirt-encrusted"
else if ( r == 32 )     w = "whitened"
else if ( r == 33 )     w = "infected"
else if ( r == 34 )     w = "sordid"
else if ( r == 35 )     w = "tattered"
else if ( r == 36 )     w = "Jewish"
else if ( r == 37 )     w = "Roman"
else if ( r == 38 )     w = "overripe"
else if ( r == 39 )     w = "loathsome"
else if ( r == 40 )     w = "frustrating"
else if ( r == 41 )     w = "rusticated"
else if ( r == 42 )     w = "pompous"
else if ( r == 43 )     w = "metaphysical"
else if ( r == 44 )     w = "makeshift"
else if ( r == 45 )     w = "so-called"
else if ( r == 46 )     w = "proverbial"
else if ( r == 47 )     w = "liquid"
else if ( r == 48 )     w = "ravaged"
else if ( r == 49 )     w = "psychotic"
else if ( r == 50 )     w = "foreign"
else if ( r == 51 )     w = "familiar"
else if ( r == 52 )     w = "pathetic"
else if ( r == 53 )     w = "precise"
else if ( r == 54 )     w = "puzzling"
else if ( r == 55 )     w = "multi-faceted"
else if ( r == 56 )     w = "variegated"
else if ( r == 57 )     w = "mean-spirited"
else if ( r == 58 )     w = "deceitful"
else if ( r == 59 )     w = "sacred"
else if ( r == 60 )     w = "temporal"
else if ( r == 61 )     w = "fractured"
else if ( r == 62 )     w = "dreamlike"
else if ( r == 63 )     w = "imaginative"
else if ( r == 64 )     w = "cantankerous"
else if ( r == 65 )     w = "obsequious"
else if ( r == 66 )     w = "twisted"
else if ( r == 67 )     w = "overweening"
else if ( r == 68 )     w = "agricultural"
else if ( r == 69 )     w = "pious"
else if ( r == 70 )     w = "unstable"
else if ( r == 71 )     w = "outer"
else if ( r == 72 )     w = "neurotic"
else if ( r == 73 )     w = "most difficult"
else if ( r == 74 )     w = "gentile"
else if ( r == 75 )     w = "challenging"
else if ( r == 76 )     w = "philosophical"
else if ( r == 77 )     w = "sanctimonious"
else if ( r == 78 )     w = "muddied"
else if ( r == 79 )     w = "faithless"
else if ( r == 80 )     w = "holy"
else if ( r == 81 )     w = "evil"
else if ( r == 82 )     w = "dessicated"
else if ( r == 83 )     w = "infernal"
else if ( r == 84 )     w = "plain"
else if ( r == 85 )     w = "crucified"
else if ( r == 86 )     w = "obvious"
else if ( r == 87 )     w = "introspective"
else if ( r == 88 )     w = "paternal"
else if ( r == 89 )     w = "childlike"
else if ( r == 90 )     w = "sinuous"
else if ( r == 91 )     w = "glorious"
else if ( r == 92 )     w = "numinous"
else if ( r == 93 )     w = "green"
else if ( r == 94 )     w = "eternal"
else if ( r == 95 )     w = "frightened"
else if ( r == 96 )     w = "fashionable"
else if ( r == 97 )     w = "resplendent"
else if ( r == 98 )     w = "wicked"
else if ( r == 99 )     w = "consuming"
else if ( r == 100 )    w = "hidden"
else if ( r == 101 )    w = "mysterious"
else if ( r == 102 )    w = "psychological"
else if ( r == 103 )    w = "miserly"
else if ( r == 104 )    w = "nebulous"
else if ( r == 105 )    w = "pellucid"
else if ( r == 106 )    w = "new"
else if ( r == 107 )    w = "filthy"
else if ( r == 108 )    w = "honourable"
else if ( r > 109 )    w = "spiritual"
if ( qrand(10) > 7 ) {
w = GenAdverb() + " " + w
}
return w
}

function GenTransitiveVerbPhrase(tense) {
var n = 70
var r = qrand(n)
var s = ""
if ( r == 0 )   s = "evoke$"
else if ( r == 1 )      s = "conquer$ " + GenNounPhrase(0) + " through"
else if ( r == 2 )      s = "evaluate$ " + GenNounPhrase(0) + " as"
else if ( r == 3 )      s = "know$ " + GenNounPhrase(0) + " from"
else if ( r == 4 )      s = "teach* " + GenNounPhrase(0) + " to"
else if ( r == 5 )      s = "require$ assistance from"
else if ( r == 6 )      s = "pour$ scorn upon"
else if ( r == 7 )      s = "find$ comfort in"
else if ( r == 8 )      s = "seek$ " + GenNounPhrase(0) + " from"
else if ( r == 9 )      s = "denounce$ " + GenNounPhrase(0) + " to"
else if ( r == 10 )     s = "walk$ with"
else if ( r == 11 )     s = "recognize$"
else if ( r == 12 )     s = "compete$ with"
else if ( r == 13 )     s = "reach* an understanding with"
else if ( r == 14 )     s = "negotiate$ an agreement with"
else if ( r == 15 )     s = "assimilate$ " + GenNounPhrase(0) + " from"
else if ( r == 16 )     s = "bestow$ great honour upon"
else if ( r == 17 )     s = "derive$ perverse satisfaction from"
else if ( r == 18 )     s = "steal$ kudos from"
else if ( r == 19 )     s = "tr& to seduce"
else if ( r == 20 )     s = "go* metaphorically fishing for " + GenNounPhrase(0) + " with"
else if ( r == 21 )     s = "find$ subtle faults with"
else if ( r == 22 )     s = "consume$ and imbibe$ with"
else if ( r == 23 )     s = "uphold$"
else if ( r == 24 )     s = "make$ amends for"
else if ( r == 25 )     s = "betray$ a secret to"
else if ( r == 26 )     s = "immunise$"
else if ( r == 27 )     s = "trade$ metaphorical blows with"
else if ( r == 28 )     s = "sell$ " + GenNounPhrase(0) + " to"
else if ( r == 29 )     s = "caricature$"
else if ( r == 30 )     s = "sanitize$"
else if ( r == 31 )     s = "satiate$"
else if ( r == 32 )     s = "organize$"
else if ( r == 33 )     s = "rise$ up from"
else if ( r == 34 )     s = "give$ lectures on morality to"
else if ( r == 35 )     s = "^ a change of heart about"
else if ( r == 36 )     s = "pluck$ the emotional chords of"
else if ( r == 37 )     s = "give$ the benefit of the doubt to"
else if ( r == 38 )     s = "share$ the gift of"
else if ( r == 39 )     s = "buy$ an expensive ointment for"
else if ( r == 40 )     s = "salt$ the covenant for"
else if ( r == 41 )     s = "take$ a look at"
else if ( r == 42 )     s = "hurl$ vituperation on"
else if ( r == 43 )     s = "write$ a metaphorical bill of divorce for"
else if ( r == 44 )     s = "engage$ in argument with"
else if ( r == 45 )     s = "avoid$ contact with"
else if ( r == 46 )     s = ") a big enemy of"
else if ( r == 47 )     s = "secretly admire$"
else if ( r == 48 )     s = "borrow$ everything from"
else if ( r == 49 )     s = "operate$ a secret mission with"
else if ( r == 50 )     s = "throw$ " + GenNounPhrase(0) + " at"
else if ( r == 51 )     s = "bur&"
else if ( r == 52 )     s = "can be kind to"
else if ( r == 53 )     s = "learn$ a hard lesson from"
else if ( r == 54 )     s = "plan$ an escape from " + GenNounPhrase(0)
else if ( r == 55 )     s = "reveal$ " + GenNounPhrase(0) + " to"
else if ( r == 56 )     s = "make$ war with"
else if ( r == 57 )     s = "discuss* " + GenNounPhrase(0) + " with"
else if ( r == 58 )     s = "analyse$ " + GenNounPhrase(0) + " with"
else if ( r == 59 )     s = "pray$ for " + GenNounPhrase(0) + " with"
else if ( r == 60 )     s = "hope$ for " + GenNounPhrase(0) + " with"
else if ( r == 61 )     s = "can be critical of"
else if ( r == 62 )     s = "develop$ the idea of the Holy from"
else if ( r == 63 )     s = "consume$"
else if ( r == 64 )     s = "inure$"
else if ( r > 64 )     s = "reveal$"
vt = ""
var i
for (i=0; i<s.length; i++ ) {
var c = s.substring(i,i+1)
var w = c
if ( c == '$' ) {
if ( tense == 0 )       w = ""
else if ( tense == 1 )  w = "s"
}
else if ( c == '*' ) {
if ( tense == 0 )       w = ""
else if ( tense == 1 )  w = "es"
}
else if ( c == ')' ) {
if ( tense == 0 )       w = "be"
else if ( tense == 1 )  w = "is"
}
else if ( c == '^' ) {
if ( tense == 0 )       w = "have"
else if ( tense == 1 )  w = "has"
}
else if ( c == '&' ) {
if ( tense == 0 )       w = "y"
else if ( tense == 1 )  w = "ies"
}
vt += w
}
if ( qrand(10) < 3 ) {
vt = GenAdverb() + " " + vt
}
return vt
}

function GenIntransitiveVerbPhrase() {
var n = 35
var r = qrand(n)
var s = ""
if ( r == 0 )   s = "creates problems"
else if ( r == 1 )      s = "goes to sleep"
else if ( r == 2 )      s = "takes a bright light"
else if ( r == 3 )      s = "surges forth"
else if ( r == 4 )      s = "reads a sermon"
else if ( r == 5 )      s = "atones"
else if ( r == 6 )      s = "mediates"
else if ( r == 7 )      s = "reminisces about lost glory"
else if ( r == 8 )      s = "flies into a rage"
else if ( r == 9 )      s = "earns frequent criticisms"
else if ( r == 10 )     s = "cleanses the spiritual temple"
else if ( r == 11 )     s = "feels nagging remorse"
else if ( r == 12 )     s = "returns home"
else if ( r == 13 )     s = "rejoices"
else if ( r == 14 )     s = "prays"
else if ( r == 15 )     s = "procrastinates"
else if ( r == 16 )     s = "excites the spiritual imagination"
else if ( r == 17 )     s = "ceases to exist"
else if ( r == 18 )     s = "hides"
else if ( r == 19 )     s = "inclines to panic"
else if ( r == 20 )     s = "cries in shame"
else if ( r == 21 )     s = "begins unsurely"
else if ( r == 22 )     s = "gets thoroughly confused"
else if ( r == 23 )     s = "awakens"
else if ( r == 24 )     s = "hesitates"
else if ( r == 25 )     s = "trembles"
else if ( r == 26 )     s = "ponders"
else if ( r == 27 )     s = "dies"
else if ( r == 28 )     s = "lacks " + GenNounPhrase(0)
else if ( r == 29 )     s = "decides " + GenNounPhrase(0)
else if ( r > 29 )      s = "decides uncertainty"
return s
}

function GenConjunction() {
var n = 9
var r = qrand(n)
var s = ""
if ( r == 0 )   s = "and"
else if ( r == 1 )      s = "or"
else if ( r == 2 )      s = "but"
else if ( r == 3 )      s = "because"
else if ( r == 4 )      s = "not that"
else if ( r == 5 )      s = "and so"
else if ( r == 6 )      s = "and then"
else if ( r > 7 )      s = "and therefore"
return s
}

function CapFirst(s) {
return s.substring(0,1).toUpperCase() + s.substring(1,s.length)
}

function GenRandomSentence() {
var stemp = GenRandomSentenceTemplate()
var i
var s = ""
for ( i=0; i<stemp.length; i++ ) {
var c = stemp.substring(i,i+1)
var w = ""
if      ( c == '0' )    w = GenNoun()
else if ( c == '1' )    w = GenNounPhrase(0)
else if ( c == '2' )    w = GenTransitiveVerbPhrase(1)
else if ( c == '3' )    w = GenConjunction()
else if ( c == '4' )    w = GenIntransitiveVerbPhrase()
else if ( c == '5' )    w = GenTransitiveVerbPhrase(0)
else if ( c == '6' )    w = GenAdjective()
else if ( c == '7' )    w = GenAdverb()
else    w = c
s += w
}
return CapFirst(s)
}

