var story=""

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"  
  var sonDaughter = "son"
 var card="Ginger"
  var neighNN="Willie"
 var neighWN="William"
 var neighGender="boy"
  } 
  else {
  var boyGirl = "girl"
   var heShe = "she"
   var heSheCap = "She"
   var hisHer = "her"
   var hisHerCap = "Her"
   var himHer = "her"
   var himherSelf = "herself"
  var sonDaughter = "daughter"
 var card="Henry"
 var neighNN="Julie"
 var neighWN="Juliet"
 var neighGender="girl";
 }

var x = fern.boss.selectedIndex
var z = x+1
	if(z/2 ==Math.floor(z/2)){
  var BheShe = "he"
  var BheSheCap = "He"
  var BhisHer = "his"
  var BhisHerCap = "His"
  var BhimHer = "him"
  } 
  else {
   var BheShe = "she"
   var BheSheCap = "She"
   var BhisHer = "her"
   var BhisHerCap = "Her"
   var BhimHer = "her";
 }


var x = fern.rel.selectedIndex
var z = x+1
	if(z/2 ==Math.floor(z/2)){
  var RheShe = "he"
  var RheSheCap = "He"
  var RhisHer = "his"
  var RhisHerCap = "His"
  var RhimHer = "him"
  } 
  else {
   var RheShe = "she"
   var RheSheCap = "She"
   var RhisHer = "her"
   var RhisHerCap = "Her"
   var RhimHer = "her";
 }


if  (fern.FriendGender.value == "Male"){
  var FhimHer= "him"
  var FheShe = "he"
   var friend1 = "buddy"
  var grandpaMa= "grandfather"
  } 
  else {
   var FhimHer = "her"
   var FheShe = "she"
  var friend1 = "best friend"
 var grandpaMa="grandmother";
 }

var x = fern.rel.selectedIndex
var z = x+1
	if(z/2 ==Math.floor(z/2)){
  var RheShe = "he"
  var RheSheCap = "He"
  var RhimHer = "him"
  var RhisHer = "his"
  } 
  else {
   var RheShe = "she"
   var RheSheCap = "She"
   var RhimHer = "her"
   var RhisHer = "her"
 };
var firstNme = fern.firstNme.value;
  firstNme = CkNme(firstNme);
var lastNme = fern.lastNme.value;
  lastNme = CkNme(lastNme);
var firstNmeCap = firstNme.toUpperCase();


var friend = fern.friend.value;
  friend = CkNme(friend);


var boss = fern.boss.value;

var Boss = boss.charAt(0).toUpperCase() + boss.substring(1,15);
var bossYou=Boss

var x1=fern.boss.selectedIndex
var x2=fern.rel.selectedIndex
if (x1==x2 && x1<4)
{ bossYou="you"
}
var maid= fern.maid.value;
var play=fern.play.value;
var item=fern.item.value;
var panic = fern.panic.value;
var snack= fern.snack.value;
var drink= fern.drink.value;
var fret= fern.fret.value;
var lost= fern.lost.value;
var rel= fern.rel.value;

var lostwords = new Array("HISTORY","TOAST","COOKED","DONE FOR","GONERS","UP A TREE","CORNERED","DEAD MEAT")
var x = fern.lost.selectedIndex
   var lost1 = lostwords[x]

var relwords1 = new Array("Mom","Dad","Grandma","Grandpa","Sis","Bro","Patsy","Fred")
var relwords2 = new Array(""+hisHer+" mom",""+hisHer+" dad",""+hisHer+" grandma",""+hisHer+" grandpa",""+hisHer+" sister",""+hisHer+" brother","Patsy","Fred")
var x = fern.rel.selectedIndex
   var rel1 = relwords1[x]
   var rel2 = relwords2[x]

var kidsAr = new Array("boys","children","girls","Guys","Kids","Girls")
var x1=fern.gender.selectedIndex
var x2=fern.FriendGender.selectedIndex
var x =x1+x2
   var kids = kidsAr[x]
   var kidsToo = kidsAr[x+3]
var playwords1= new Array("paged through all "+hisHer+" comics","paged through all "+hisHer+" magazines","paged through all "+hisHer+" sketch books","looked between every CD","paged through all "+hisHer+" color books","looked between every CD","looked between every DVD","looked between every DVD")
var playwords2= new Array("comics","magazines","sketch books","CDs","color books","CDs","DVDs","DVDs")
var x = fern.play.selectedIndex
   var play1 = playwords1[x]
   var play2 = playwords2[x]

var itemwords1= new Array("It had a great picture of Yogi Berra on it. Best of all, Yogi had signed it. It was old. "+friend+" kept it in a plastic sleeve.","It was blue and very old. "+friend+" kept it in a little plastic sleeve. George Washington was on it. "+friend+" said it was from 1910 and in mint condition. That made it rare.","It was silver with a buffalo and an Indian's head on it. It was dated 1930 and "+friend+" said it was worth a lot of money.","It was silver and had an eagle on it. "+friend+" said it belonged to a soldier in the Civil War. Someone on the Union side.","It was real gold and the stone was a real ruby. "+friend+" said maybe some pirate had stolen it long ago.","It was red and made of wood. King Tut was carved in it. "+friend+" said it was from the 1933 Chicago World's Fair and that people paid lots of money for stuff like this.","It was small and a little torn. But, it was a photo of the real Elvis back in 1958.  He was playing his guitar and had signed it. "+friend+" said people would pay good money for it. But, "+FheShe+" was keeping it forever.")
var itemwords2= new Array("Yogi Berra had signed it.","It was almost a hundred years old and still looked new. She said thank goodness it was in a plastic sleeve.","It was a 1930 Buffalo nickel. It looked newly minted which made it rare.","It looked old enough to be from the Civil War time.","It looked expensive.","Anything from the 1933 Chicago World's Fair was valuable.","She said thank goodness it was in a plastic sleeve. Elvis is still really big.")
var itemwords3= new Array("chew up","chew up","choke on","choke on","choke on","choke on","chew up")
var x = fern.item.selectedIndex
   var item1 = itemwords1[x]
   var item2 = itemwords2[x]
   var item3 = itemwords3[x]


var panicwords1= new Array("legs to stop shaking","stomach to calm down","heart to settle down","throat to relax","mouth to be wet again","head to stop spinning around")
var panicwords2= new Array("legs go weak","stomach flip","heart begin to pound","throat start to close","mouth go dry","head get dizzy")
var x = fern.panic.selectedIndex
   var panic1 = panicwords1[x]
   var panic2 = panicwords2[x]

var snackwords = new Array("these stale crackers","these smashed chips","this stale popcorn","these old peanuts","this half eaten brownie","this rotten apple","these dried up grapes","this half eaten oatmeal cookie","this really old trail mix")
var x = fern.snack.selectedIndex
   var snack1 = snackwords[x]


var story ="<html><HEAD><TITLE>Double Trouble</TITLE> <LINK REL=stylesheet Type='text/css' HREF='SansTxt.css'></HEAD>";

story+="<BODY text='#000000' BGCOLOR = '#6699FF'><Font size='+2'>";
story+="<h1 align='center'>Double Trouble";
story+="<br><sup>by " + firstNme + " " + lastNme + "</sup></h1><P>";

story+="<P>"+firstNme+"  was lying on "+hisHer+" bed "+play+" when the phone rang. At once, "+hisHer+" "+panic+". "+heSheCap+" jumped up, ran into the bathroom, and shut the door.";

story+="<P>\""+firstNme+", it\'s for you,\" "+hisHer+" "+rel+" called. No answer.";

story+="<P>\""+firstNme+", hurry up. Your "+friend1+" "+friend+" is on the phone.\" Silence.";

 story+="<P>\""+firstNmeCap+", where ARE you?\" The voice was louder and closer. ";

 story+="<P>"+heSheCap+" knew "+rel2+" would find "+himHer+" soon."; 

 story+="<P>Rapping on the bathroom door, "+rel2+" demanded, \""+firstNme+", are YOU in there?\""; 

story+="<P>\"Uh… Yah… I can't talk right now.\"";

 story+="<P>\""+friend+" says it\'s urgent.\" Pause.";
 
 story+="<P>Finally, "+firstNme+" said, \"Uh… Tell "+FhimHer+"… Tell "+FhimHer+"… I'll call "+FhimHer+" back.\" Then "+heShe+" added, \"Uh… Real soon.\""; 

 story+="<P>"+heSheCap+" heard "+rel2+" relay the message. "+heSheCap+" waited for "+hisHer+" " +panic1+". Then carefully opening the bathroom door, "+heShe+" crept to "+hisHer+" bedroom and shut "+himherSelf+" in.";
 
story+="<P>"+firstNme+" looked around. "+friend+"\'s "+item+" just had to be here. But, where? "+maid+" "+heShe+" had major work to do. It could be in any of these piles. Taking a deep breath, "+heShe+" got busy.";

story+="<P>At first, "+heShe+" crawled from pile to pile, pawing through each like a dog digging for a buried bone. No "+item+" turned up. All "+heShe+" had done was make more piles. "+heSheCap+" sat back, sighed, and wished "+heShe+" had started looking  yesterday. On Friday "+friend+" told "+himHer+" "+FheShe+" had to have it back.";

story+="<P>"+firstNme+" could see the "+item+" in "+hisHer+" mind. "+item1+" That new kid next door was going to be so wowed.";

 story+="<P>\"Maybe I went too fast,\" "+firstNme+" told "+himherSelf+".";  

 story+="<P>"+heSheCap+" started again. This time "+heShe+" checked the pockets of "+hisHer+" clothes. "+heSheCap+" "+play1+". "+heSheCap+" searched under "+hisHer+" bed, dresser, and bookcase. "+heSheCap+" dumped everything out of "+hisHer+" drawers. "+heSheCap+" took everything out of the closet. "+heSheCap+" combed through "+hisHer+" desk. No "+item+". "+firstNme+" felt "+hisHer+" " +panic2+" again.";

story+="<P>\""+friend+" is going to kill me. I promised to be careful. "+fret+" I only borrowed it to show that new kid next door.\"";

story+="<P>If "+friend+" didn't kill "+himHer+", "+hisHer+" "+boss+" would. "+BheSheCap+" had told "+firstNme+" to ask before borrowing anything valuable from a friend. Had "+heShe+" missed a pile? By now, the bedroom was too messy to tell.";

story+="<P>The doorbell rang and "+heShe+" froze. \"Please, don't let it be "+friend+",\" "+heShe+" prayed to the closed door. But, within seconds, "+heShe+" heard "+hisHer+" "+rel+" talking. Then "+heShe+" heard "+hisHer+" "+friend1+" coming down the hallway. "+heSheCap+" gulped and said to "+himherSelf+", \"I\'m "+lost+"!\"";

story+="<P>\"Wow! What happened here?\" "+friend+" cried out in surprise as "+FheShe+" looked around "+firstNme+"\'s room.";

story+="<P>\"I really was going to call you back,\" "+firstNme+" began, ignoring the question. Lamely "+heShe+" went on. \"I think I misplaced your "+item+" and I\'m still looking for it.\" Then "+heShe+" was silent.";

story+="<P>"+firstNme+" expected "+hisHer+" friend to get angry. Instead, "+friend+" paled and looked like "+FheShe+" was going to be sick.";

story+="<P>Finally, "+friend+" spoke. \""+fret+" My parents are going to kill me. I’m not supposed to lend my good stuff to anybody without asking them first. My "+grandpaMa+"\'s friend gave me that "+item+" when I was a little kid. I'm in real trouble now.\"";

story+="<P>\"You know what?\" "+firstNme+" said. \"I'm in real trouble too. I'm not supposed to borrow stuff without checking first. Besides, I may have lost it.\"";

story+="<P>\"We've got DOUBLE TROUBLE,\" both said at the same time.";

story+="<P>Without wasting a moment, the two friends each picked a pile and dove in. Nothing escaped them. Nothing was tossed back. After inspecting something, "+firstNme+" and "+friend+" put it where it belonged.";

story+="<P>They worked for a long time. For the most part, they were focused and quiet. ";

story+="<P>About every twenty minutes though, "+friend+" said, \"It's just got to be here somewhere, right?\" ";

story+="<P>"+firstNme+" spoke more often. "+heSheCap+" said things like, \"Hey, I forgot all about this Chinese puzzle.\" And, \"Gosh, this shirt is way too little.\" And, \"Check out this old valentine "+card+" gave me last year.\" And, \"Guess I don't need "+snack1+" any more.\" And, \"Oops, I bet my "+boss+" forgot about this CD.\"";

story+="<P>Little by little, the piles shrunk. Clothes ended up in the closet, dresser, or a to-be-washed heap. Books and "+play2+" were stacked in the bookshelf. Toys, games, and puzzles were together. School stuff was on or in the desk. To-be-returned things were by the door. The wastebasket was full. "+firstNme+"’s room looked perfect. But, no "+item+" turned up.";

story+="<P>About then, "+firstNme+"\'s "+rel+" tapped on the door. \""+fret+" We're "+lost1+"!\" the "+kids+" said together.";

story+="<P>When "+RheShe+" came in, surprise burst across "+RhisHer+" face. \"Whoa! What happened here? Amazing!\" "+RheSheCap+" kept looking around the room. Finally, "+RheShe+" spoke. \"I… I just came to ask… if you wanted some "+drink+" and "+snack+".\"";

story+="<P>Any other day both would have sped to the kitchen. This time, however, they shrugged their shoulders and said, \"Sure, might as well.\" ";

story+="<P>"+firstNme+"'s "+rel+" decided to sit at the table with the "+kids+". \"So… Uh… What's new with you two? That is, besides being merry maids.\" "+RhisHerCap+" tone was a bit too cheerful.";

story+="<P>"+firstNme+" couldn't eat and couldn't drink. "+heSheCap+" took a deep breath and said, \"We've got double trouble, "+rel1+".\"";

story+="<P>\"I'm all ears,\" "+rel2+" replied quickly.";

story+="<P>\"Well, remember how "+bossYou+" told me never borrow stuff without asking first. I sort of forgot. I borrowed "+friend+"\'s "+item+" to show that new kid next door. It was really valuable. And, I lost it.\" "+firstNme+" sighed.";

story+="<P>Then it was "+friend+"'s turn. \"My dad told me never to lend my good stuff. Well, I kind of forgot because "+firstNme+" asked. My dad is going to kill me when he finds out.\"";

story+="<P>"+firstNme+"\'s "+rel+" thought for a minute. \""+kidsToo+", this does sound like a problem. When did you last see the "+item+", "+firstNme+"?\" "+RheShe+" asked.";

story+="<P>The doorbell rang and stopped their conversation. The new kid had come over. "+heSheCap+" said "+heShe+" needed to talk to "+firstNme+".";

story+="<P>Once in the kitchen, "+heShe+" explained. \"Well, my mom said Ham was playing with something he could "+item3+". So, she took it away. Ham finds stuff all the time and brings it home. When she looked at it, she said she knew it was very special. "+item2+" Mom told me to ask around. Somebody must be missing it.\"";

story+="<P>Then "+heShe+" showed them the "+item+". Right away, a chorus of deep sighs came from the other three.";

story+="<P>\"Whew… We're saved,\" cried "+firstNme+" and "+friend+" together.";

story+="<P>\"It's mine,\" said "+friend+", grinning from ear to ear. \"Thank you, thank you!\" ";

story+="<P>\"And, who are we thanking?\" asked "+firstNme+"\'s "+rel+".";

story+="<P>\"Oops… "+rel1+" and "+friend+", this is "+neighNN+", the "+neighGender+" next door.\" "+firstNme+" had found "+hisHer+" manners.";

story+="<P>\"And, who is Ham?\" "+RheShe+" asked "+neighNN+".";

story+="<P>\"Oh, Ham. Ham is our cat,\" "+heShe+" answered. \"Ham is short for Hamlet. And, "+neighNN+" is short for "+neighWN+". You might say my parents are kind of Shakespeare nuts.\"";

story+="<P>"+firstNme+"'s "+rel+" burst out laughing. \"Well, thank goodness they are! We all can use advice from Shakespeare, especially now.\" "+RheSheCap+" looked at the "+kids+". \"Did you two learn anything?\"";

story+="<P>"+firstNme+" went first. \"I don't get what's so funny, "+rel1+". But, I know I'm never going to borrow things again. Unless I ask.\"";

story+="<P>Then "+friend+" added, \"And, I'm checking before I lend anything ever again.\"";

story+="<P>Their lessons were lost on "+neighNN+" who now looked left out.";

story+="<p>\"Don't worry, "+neighNN+". I'll explain later,\" promised "+firstNme+". \"Say… Why don't we go to my room? We can do my new thousand-piece puzzle on the floor. I have lots of space.\"";

story+="<p>With that,  the "+kids+" trotted down the hallway to "+firstNme+"\'s room. The "+rel+", left alone, started to clean up, smiled, and said to "+RhimHer+"self, \"Well, looks like Shakespeare still rules. Works for me!\"<p><p>";

story+="<hr><h2 class=PS>William Shakespeare may be the greatest writer of English to have ever lived. He was born over four hundred years ago! In spite of that, his work is far from old or forgotten. You won't get through high school without studying some of his plays and poems. Thank goodness!<br><br>In Shakespeare\'s play, <i>Hamlet</i>, a character is leaving home. His father sends him off with good advice. He tells his son not to borrow or lend. Below is part of what he says. <blockquote>\"Neither a borrower, nor a lender be;<br>For loan oft loses both itself and friend…\"</blockquote></h2><hr>";

story+="<br><br><font color='blue' size='-4'>&copy;2005 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()
}
