 var story=""
var feelings = new Array("glowed", "blushed", "stood tall", "felt proud", "smiled", "beamed", "radiated", "felt smart")

var eat1 = new Array("were", "were", "was", "were", "was", "was", "were", "was", "were", "were")
var eat2 = new Array("baking", "baking", "baking", "frying", "cooking", "baking", "baking", "baking", "cooling", "warming")
var eat3 = new Array("familiar", "sweet", "sweet", "familiar", "familiar", "sweet", "sweet", "sweet", "sweet", "familiar")



function CkNme(XNme)  {
  var UcNme = XNme.toUpperCase()
  var LcNme = XNme.toLowerCase()
  
  if (XNme==UcNme || XNme==LcNme){
  XNme = LcNme;
  XNme = XNme.charAt(0).toUpperCase() + XNme.substring(1,15);
  }  
 return XNme;
 }

function compute(fern)  {

if(fern.gender.value == "Male"){
 var boyGirl = "BOY"
 var heShe = "he"
 var heSheCap = "He"
 var hisHer = "his"
 var hisHerCap = "His"
 var himHer = "him"
 var himherSelf = "himself"
} 
else {
 var boyGirl = "GIRL"
 var heShe = "she"
 var heSheCap = "She"
 var hisHer = "her"
 var hisHerCap = "Her"
 var himHer = "her"
 var himherSelf = "herself"
};




var rel = fern.rel.value
var x = fern.rel.selectedIndex
var z = x+1
if(z/2==Math.floor(z/2)){
var RheSheCap="He"
var RheShe="he"
var RhimHer="him"
var RhisHer="his"
var RhimselfHerself="himself"
}
else{
var RheSheCap="She"
var RheShe="she"
var RhimHer="her"
var RhisHer="her"
var RhimselfHerself="herself"
};


var firstNme = fern.firstNme.value
  firstNme = CkNme(firstNme);
var lastNme = fern.lastNme.value
  lastNme = CkNme(lastNme);
var firstNmeCap = firstNme.toUpperCase();
var lastNmeCap = lastNme.toUpperCase();
 
 var keep = new Array("kept it in "+hisHer+" pocket", "wore it on a chain around "+hisHer+" neck", "kept it on a ribbon around "+hisHer+" neck", "wore it on a string around "+hisHer+" neck", "kept it in "+hisHer+" pocket", "kept it on a cord around "+hisHer+" neck", "wore it on "+hisHer+" little finger", "kept it on a yarn around "+hisHer+" neck", "kept it on a string around "+hisHer+" neck")
 
 var age = fern.age.value

 
 var stage1 = new Array("Soon "+heShe+" was bouncing, flipping and somersaulting on the trampoline. "+heSheCap+" learned to juggle balls, plates and batons. "+heSheCap+" jumped through hoops and walked on stilts.", "Soon "+heShe+" was sailing through the air on a trapeze, high above the ground. "+hisHerCap+" legs stretched forward. "+hisHerCap+" back arched. "+heSheCap+" flipped and spun and caught another swing. Back and forth. Higher and higher. "+heSheCap+" was as light and free as a bird.", "Soon "+heShe+" was bouncing high above the trampoline. "+heSheCap+" twirled, flipped, and spun. "+heSheCap+" was dancing in air - a daring, magical creature no longer tied to the ground. Up and down "+heShe+" sprang with ease.", "Soon "+heShe+" was walking on wire, high above the ground. "+hisHerCap+" arms stretched out from "+hisHer+" body. They moved gently up and down, steering "+himHer+" through an ocean of air. Each step forward became easier. "+heSheCap+" was weightless and free.", "Soon, high atop a unicycle, "+heShe+" sped across the ring. Then "+heShe+" stopped, turned, and spun off in a different direction. "+hisHerCap+" arms stretched out to catch Frisbees and balls as they sailed toward "+himHer+". "+hisHerCap+" body balanced with every move. Back and forth, "+heShe+" darted with ease, owning the whole stage.", "Soon "+heShe+" was climbing up a rope made of silk and dangling high in the air. Then, without warning, "+heShe+" dropped. "+hisHerCap+" legs magically caught the cord. "+hisHerCap+" body bent backwards. "+hisHerCap+" hands reached out to grab another part of the cord. Up and down, twisting and tumbling, "+heShe+" moved along the rope in seemingly impossible ways.") 
 var stage2 = new Array("being funny and hearing the laughter", "flying high in the air and hearing the applause", "dancing high in the air and hearing the applause", "floating high in the air and hearing the applause", "speed and hearing the applause", "falling and hearing the oohs and aahs")
 
  var act = fern.act.value
   var x = fern.act.selectedIndex	
    var action1 = stage1[x]
	var action2 = stage2[x]
 

 var x = act.indexOf(" ")
 var actAlone = act.substr(x)
 
 
 var actCaps = actAlone.toUpperCase();
 var color = fern.color.value
 var spark = fern.spark.value
 var luck = fern.luck.value
 var x = fern.luck.selectedIndex	
 var keeper = keep[x]
    var y = luck.indexOf(" ")
	var luckAlone = luck.substr(y)

 
 var eat = fern.eat.value
   var x = fern.eat.selectedIndex
   var food1=eat1[x]
   var food2=eat2[x]
   var food3=eat3[x]
 var feel = fern.feel.value
   var x = fern.feel.selectedIndex
   var feeling=feelings[x]

 var word = fern.word.value
 var mess = fern.mess.value
 var city1 = fern.city1.value
 var city2 = fern.city2.value
 var city3 = fern.city3.value
 var city4 = fern.city4.value
 var abroad = fern.abroad.value
 
 
 
 
 
 
 var poster = "<h2>*** COME AND SEE "+firstNmeCap+" "+lastNmeCap+" ***<br>"+boyGirl+"  WONDER<br>*** BEST  "+actCaps+" IN AMERICA ***</h2>";

var story = ("<html><HEAD><TITLE> " + firstNme +" "+lastNme+", Circus Star</TITLE> <LINK REL=stylesheet Type='text/css' HREF='SansTxt.css'></HEAD>");

story = (story +"<BODY text='#000000' BGCOLOR = '#6699FF'><Font size='+2'>");
story = (story +"<h1 align=center>" + firstNme +" "+lastNme+", Circus Star<br><sup>by " + firstNme + " " + lastNme + "</sup></h1><P>");

story = (story +"<P>"+firstNme+" was "+age+" years old when "+heShe+" went to "+hisHer+" first circus. "+heSheCap+" had seen them on television. "+heSheCap+" had read about them in books. Friends had been. "+heSheCap+", however, had never gone until one summer night when the circus came to "+hisHer+" town.");

 story = (story +"<P>The real thing thrilled "+himHer+". The parade of performers amazed "+himHer+". The acrobats, the jugglers, the trapeze artists, the clowns, the wirewalkers, the cyclists, the contortionists, the magicians - each awed "+himHer+". The color, the motion, the music stayed with "+himHer+". ");

story = (story +"<P>In fact, after going, it was impossible for "+himHer+" to think about anything else. The smell of fresh peanuts roasting followed "+himHer+" everywhere. On the playground, loud calls announced acts. Anything that flapped became brightly colored flags marking an entrance to the big top. Swallows were acrobats. Kites were dancers. Crowds became audience. Swings became trapezes. Balls were jugglers\' props. Frisbees, cyclists\' props.");

 story = (story +"<P>Day and night, performing in the circus became "+hisHer+" dream. Every time "+heShe+" closed "+hisHer+" eyes, the circus people surrounded "+himHer+" with their smiling faces and inviting gestures. "+firstNme+" was captured completely.");

 story = (story +"<P>Then one dark, quiet night, when no one was around, "+heShe+" surprised "+himherSelf+". "+heSheCap+" suddenly ran off with that troupe of circus people - without even telling "+hisHer+" family."); 

 story = (story +"<P>Right away the ticket taker became "+hisHer+" friend. He introduced "+himHer+" to the other performers. He showed "+himHer+" where to sleep and eat. In no time, "+firstNme+" felt safe and comfortable.  "+hisHerCap+" new friend helped "+himHer+" decide on an act. "+firstNme+" would be "+act+"."); 

story = (story +"<P>Every morning, "+heShe+" helped the cook fix breakfast for the hungry troupe. The kitchen was hot, but "+heShe+" didn\'t mind. "+heSheCap+" made "+eat+" for "+hisHer+" circus friends. They said "+hisHer+" "+eat+" "+food1+" the best they ever tasted. The breakfast tent smelled just like home. "+firstNme+"  "+feel+" with each compliment.");

 story = (story +"<P>Every afternoon, an expert "+actAlone+" trained "+himHer+". "+firstNme+" learned quickly. "+action1+" What fun "+firstNme+" was having! Ending each practice was hard.");
 
 story = (story +"<P>"+firstNme+" and "+hisHer+" teacher designed a costume. The "+color+"; the fabric silk. "+spark+" sequins made it sparkle. When "+heShe+" tried it on, the ticket taker and the "+actAlone+" said "+heShe+" looked "+word+"! "+firstNme+" "+feeling+" again."); 

 story = (story +"<P>Now it was time to perform for the ringmaster. Wide grins broke across both their faces when "+heShe+" finished. The ringmaster said "+firstNme+" was ready to be part of the show. He gave "+himHer+" "+luck+" for luck. "+firstNme+" treasured it and always "+keeper+".");
 
 story = (story +"<P>The ringmaster put up huge posters that said,");
 
 story = (story +poster+" ");
 
story = (story +"<P>The first show was in "+city1+". "+firstNme+" was wonderful! The next show was in "+city2+". "+firstNme+" was wonderful! When they went to "+city3+", all the children clapped and yelled, \"WE WANT "+firstNmeCap+"! WE WANT "+firstNmeCap+"!\" After the act, they stamped their feet and screamed, \" "+firstNmeCap+" IS THE GREATEST! "+firstNmeCap+" IS THE GREATEST!\" In "+city4+", the same thing happened. From Coast to Coast, "+heShe+" was famous all over America.");

story = (story +"<P>Next, the circus troupe wanted to leave the United States. They were planning to take the show to "+abroad+". They said "+firstNme+" was their star "+actAlone+" and had to go with them.");

 story = (story +"<P>"+heSheCap+" told them "+heShe+" didn\'t want to go to "+abroad+". Someone in the front row kept reminding "+himHer+" of "+hisHer+" "+rel+". "+heSheCap+" was starting to miss "+hisHer+" family. "+firstNme+" was tired and wanted to go home.");  

 story = (story +"<P>They insisted "+heShe+" stay. Someone shouted, \"You must go with us.\" Another yelled, \"We won\'t let you leave.\" Still another called out, \"You\'re part of our family now.\"");

story = (story +"<P>"+firstNme+" started to run from them. The cook tried to grab "+himHer+". "+heSheCap+" pushed him away. The ticket taker tried to hold "+himHer+". "+heSheCap+" escaped. Then the ringmaster cried, \"Quick! After "+himHer+"!\" The "+actAlone+" blocked "+hisHer+" way. Others were behind "+himHer+". "+heSheCap+" twisted and turned and tried to keep running. "+heSheCap+" clutched "+hisHer+" "+luckAlone+" for strength and luck. It didn\'t help.");

story = (story +"<P>The circus people held "+himHer+" down. "+heSheCap+" was pinned, truly scared, and could not move. \"Someone help me! Save me! Let me go,\" "+heShe+" called out. Where was "+hisHer+" real family?");

story = (story +"<P>\""+firstNme+"! Hey, "+firstNme+"! You have to get up. It\'s already nine o\'clock.\" "+hisHerCap+" "+rel+" was standing in the doorway.");

story = (story +"<P>The bedroom was very hot. "+hisHerCap+" legs were tangled up in "+hisHer+" blanket. Both sheets had pulled free of the mattress. "+hisHerCap+" head was at the foot of the bed. "+hisHerCap+" back was against one of the bedposts. One pillow was across the room on the floor. "+hisHerCap+" arm was pinned under another pillow. "+hisHerCap+" pajamas were twisted on "+hisHer+" body. "+heSheCap+" was clutching a pajama button that had come off.");

story = (story +"<P>"+hisHerCap+" "+rel+" looked puzzled. "+RheSheCap+" said, \"Whoa! What a mess! What happened to you? Your bed looks like a "+mess+" hit it. It\'s a disaster area.\"");

story = (story +"<P>"+firstNme+" untangled "+himherSelf+", slowly sat up, and looked around. When "+heShe+" realized everything was normal, except the late hour, "+heShe+" smiled. "+heSheCap+" sniffed the "+food3+" smell of "+eat+" "+food2+". The aroma was coming from the kitchen."); 

story = (story +"<P>Then, "+heShe+" looked at "+hisHer+" "+rel+", sighed, and simply said, \"Yes, I know. I\'ve been busy.\"");

story = (story +"<p>"+firstNme+" sank back on "+hisHer+" own, safe, empty bed. For a moment "+heShe+" tried to recapture that feeling of "+action2+" of so many fans. But, "+heShe+" couldn\'t. It was gone. And, with that, "+hisHer+" dream of being "+act+" ended. . . . At least, until the next summer when the circus came to "+hisHer+" town.");



story=(story+"<br><br><font color='blue' size='-4'>&copy;2004 Kay Wittes</font>"); 
msgWindow=window.open("","displayWindow","toolbar=yes,width=640,height=400,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=yes")
msgWindow.document.write(story)
msgWindow.focus()
msgWindow.document.close()
}
