 var story=""
var ColorPhrase1 = new Array("Red belongs on stop signs, not me", "Orange belongs on pumpkins, not me", "Yellow belongs on egg yolks, not me", "I look sick when I wear green", "Cookie Monster wears blue, not me", "Purple is for popsicles, not me", "Only babies, flamingos, and wimps wear pink", "I feel muddy when I wear brown")

var ColorPhrase2= new Array("feel like a stop sign", "have pumpkin feelings", "think about egg yolks", "feel sick", "picture Cookie Monster", "feel like a popsicle", "think about flamingos", "feel muddy")

var ColorPhrase3= new Array("my mother's flower garden", "campfires on a June night", "buttercups on a summer day", "hiking in mountain meadows", "sea water on a sunny day", "western sunsets", "salt water taffy at the beach", "cocoa on a chilly afternoon")

var ColorPhrase4= new Array("Red is an exciting, notice-me color.", "Orange is a happy, lively color.", "Yellow is a warm, playful color.", "Green is the color of life!", "Blue is a royal color, the choice of kings and queens.", "Purple is a noble color, fit for an emperor or empress.", "Pink is such a friendly color - cozy and fun!", "Brown is a rich, earth color. It makes all the other colors look great.")

var BoyDesign1 = new Array("sailboats", "fish", "airplanes", "cars", "flags", "flowers", "shells", "dogs")

var GirlDesign1 = new Array("cherries", "butterflies", "hats", "feathers", "bells", "starfish", "roses", "bears")

var BoyDesign2 = new Array("arrows", "zigzags", "triangles", "turtles", "stars", "dots", "squares", "footballs")
var GirlDesign2 = new Array("ladybugs", "flowers", "dots", "leaves", "birds", "berries", "fish", "swirls")
var FamilyNme1 = new Array("Mom", "Dad", "Grandma", "Grandpa", "Mom", "Dad")
var FamilyNme2 = new Array("mom", "dad", "grandma", "grandpa", "stepmom", "stepdad")
var Occasion = new Array("your birthday", "Christmas", "Hanukkah", "Easter", "Valentine's Day")


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 peer = "Marty"
 var quip = "Smarty Marty"
 var donor1 = "son Frankie"
 var donor2 = "Frankie"
 var clothes = "two pairs of pants"
 var nuclothes = "shirt"
var Design1 = BoyDesign1
var Design2 = BoyDesign2
} 
else {
 var boyGirl = "girl"
 var heShe = "she"
 var heSheCap = "She"
 var hisHer = "her"
 var hisHerCap = "Her"
 var himHer = "her"
 var himherSelf = "herself"
 var peer = "Penny"
 var quip = "Penny Perfect"
 var donor1 = "daughter Mary Beth"
 var donor2 = "Mary Beth"
 var clothes = "a pair of pants, a skirt"
 var nuclothes = "dress"
 var Design1 = GirlDesign1
 var Design2 = GirlDesign2
};


if(fern.PalsGender.value == "Male"){
 var PalheShe = "he" 
} 
else {
 var PalheShe = "she"
};

var x = fern.boss.selectedIndex
var z = x+1
if(z/2==Math.floor(z/2)){
var BheSheCap="He"
var BheShe="he"
var BhimHer="him"
var BhisHer="his"
var BhimselfHerself="himself"
}
else{
var BheSheCap="She"
var BheShe="she"
var BhimHer="her"
var BhisHer="her"
var BhimselfHerself="herself"
};

var GoodColor = fern.GoodColor.value
var LcGoodColor = GoodColor.toLowerCase()

var BadColor = fern.BadColor.value
var LcBadColor = BadColor.toLowerCase()
var x=fern.BadColor.selectedIndex
var Phrase1=ColorPhrase1[x]
var Phrase2=ColorPhrase2[x]
var Phrase3=ColorPhrase3[x]
var Phrase4=ColorPhrase4[x]
var Scratch1=Design1[x]
var Scratch2=Design2[x]
 
var firstNme = fern.firstNme.value
  firstNme = CkNme(firstNme);
var lastNme = fern.lastNme.value
  lastNme = CkNme(lastNme);

 var boss = fern.boss.value
 var x=fern.boss.selectedIndex
 var bossLc=FamilyNme2[x]
 var bossCps=FamilyNme1[x]
 
 var friend = fern.friend.value
   friend = CkNme(friend);
 var food = fern.food.value
 var stiff = fern.stiff.value
 var book = fern.book.value
 var video = fern.video.value
 var game = fern.game.value
 var GoodColor = fern.GoodColor.value
 var BadColor = fern.BadColor.value
 var gift = fern.gift.value
 var x=fern.gift.selectedIndex
 var gift2 = Occasion[x]
 
 var story = ("<html><HEAD><TITLE> " + firstNme +"\'s New Clothes</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 +"\'s New Clothes<br><sup>by " + firstNme + " " + lastNme + "</sup></h1><P>");

story=(story+"");
story=(story+"<P>I looked out the front window and saw my "+boss+" getting out of the car. \"Oh, no! Not again,\" I cried to myself. I just knew "+BheShe+" had more of that stuff for me.");

story=(story+"<P>"+BheSheCap+" smiled when "+BheShe+" came in the house. "+BheSheCap+" cradled a brown paper bag in each arm. \""+firstNme+", this is our lucky day. You’re not going to believe the surprises I have for you.\"");

story=(story+"<P>I tried to keep the dismay off my face. But, the final \'s\' on the word \'surprises\' alarmed me. Furthermore, the sacks my "+bossLc+" held looked full.");

story=(story+"<P>"+BheSheCap+" was beaming now. \"You remember my friend Irma. Well, her "+donor1+" has outgrown these outfits. Irma saved them just for you. Isn’t that nice? You take a look while I start dinner.\"");
 
story=(story+"<P>I laid out the clothes on the sofa. The first thing I noticed was the color. \""+BadColor+". I hate "+LcBadColor+". "+Phrase1+".\" I couldn’t stop muttering. "+BadColor+" was on everything in front of me. "+GoodColor+", my favorite color, was nowhere to be seen.");

story=(story+"<P>In the kitchen, my "+boss+" was humming. The happy sound made me feel worse. \"Maybe they won’t fit,\" I told myself.");

story=(story+"<P>After dinner, I tried on the clothes. There were three shirts, a sweater, "+clothes+", a vest, and a jacket. I felt like "+stiff+" as I marched in front of my family. The sweater needed new buttons. The hem in the pants could be let down. Only the vest was too small. All the other things fit perfectly.");

story=(story+"<P>\"Just think,\" my "+boss+" said. \"You can mix and match them. Now, you have six new outfits to wear to school.\"");

story=(story+"<P>Later, getting ready for bed, I overheard "+BhimHer+" on the phone. \"Oh, I’m so relieved! Our budget is very tight. I didn’t know where to find money for "+firstNme+"’s clothes. And, these look almost new. That Irma is a dear! She always helps me remember waste not, want not.\"");

story=(story+"<P>My heart sank. I was stuck with someone else’s, "+LcBadColor+", hardly worn, perfectly fitting clothes. Moreover, a tight budget meant making do, little room for extras. Protesting wouldn’t be right, even if it worked. ‘Waste not, want not’ were strong words in my family.");

story=(story+"<P>Monday I wore the shirt with the "+LcBadColor+" stripes to school. That morning on the playground my pal "+friend+" noticed right away.");

story=(story+"<P>\"I didn’t know you liked "+LcBadColor+",\" "+PalheShe+" said. \"Is that shirt new?\" ");

story=(story+"<P>I started to "+Phrase2+". Luckily, other kids came along. I didn’t have to explain. Soon we were  "+game+".");

story=(story+"<P>The next day in math class, I felt "+peer+"’s eyes on me. "+heSheCap+" was checking out the "+LcBadColor+" "+Scratch1+" on "+donor2+"’s shirt. When I looked at "+himHer+", "+heShe+" smirked and turned away. We never spoke. We didn’t have to. I knew what "+heShe+" was thinking. \"Well,\" I muttered to myself, \""+quip+" is too dumb to understand about budgets.\"");

story=(story+"<P>Friday my "+bossLc+" insisted I wear the sweater with the matching pants. Then my teacher asked me to take the roll card to the office. That was okay. But, on the way back, this kid in another class passed me and said, \"Wow! You sure are "+LcBadColor+"!\" Since no one else was around, I pretended not to hear.");

story=(story+"<P>By afternoon, I thought about weekend reading. I went in the library to get some "+book+". When it was my turn to check them out, the librarian smiled at me. Then, in a very loud voice, she said, \"Oh, "+firstNme+"! I LOVE that color. It reminds me of "+Phrase3+".\" All the kids looked at me. Some were laughing. I wanted to disappear.");

story=(story+"<P>The next Tuesday we had art class. We were learning to draw people using markers and watercolors. The teacher asked me to be the model. I wanted to say no way but the words stuck in my throat. Besides, he had made a big point of choosing me.");

story=(story+"<P>\"Children, notice how the "+LcBadColor+" design on "+firstNme+"\’s shirt stands out. "+Phrase4+" Don’t be shy with "+LcBadColor+". Use lots of paint,\" he advised.");

story=(story+"<P>The kids worked for a long time. They told me later that I was a great model. Even "+peer+" said I was fun to paint. Then "+heShe+" surprised me more by saying "+heShe+" liked my shirt. "+friend+"\’s painting was so good that the teacher kept it to show his next class.");

story=(story+"<P>School was going pretty well. At home, I knew my "+boss+" was still worried about money. \"We have to remember our budget,\" "+BheShe+" said whenever we went shopping.");

story=(story+"<P>I was doing my part. When we went to the grocery store, I didn’t ask for "+food+" from the bakery. At the video store, I told "+BhimHer+" one "+video+" movie was plenty. I stayed away from toy departments and bookstores.");

story=(story+"<P>Then one Saturday morning my "+bossLc+" caught me by surprise. \""+firstNme+", what would you like for "+gift2+"?\" "+BheShe+" asked at breakfast.");

story=(story+"<P>Without thinking, I blurted out, \"I just want a "+nuclothes+" of my own. A "+LcGoodColor+" one.\"");

story=(story+"<P>My "+boss+" looked as stunned as if I had hit "+BhimHer+". "+BheSheCap+" slapped "+BhimselfHerself+" on the forehead. For a moment, "+BheShe+" didn’t say a word. Then "+BheShe+" blurted out, \" "+firstNme+", BUDGET SMUDGE-IT! We’re going shopping.\"");

story=(story+"<P>We did just that. I ended up with three new outfits that I picked out myself. My favorite wasn\’t even "+LcGoodColor+". Tiny "+LcBadColor+" "+Scratch2+" were printed all over it. I wore that "+nuclothes+" until it fell apart in the washing machine. The rest of the clothes we gave to the Goodwill when I outgrew them.");

story=(story+"<P>That was the best "+gift+" ever. I discovered that "+LcBadColor+" really is a great color, especially with some "+LcGoodColor+". I learned that speaking up can take you places. I found out that \"waste not, want not\" doesn’t always mean you can't get something new. And, tight times don't have to last forever.");


story=(story+"<hr><blockquote>PS ... Color was an important part of <i>New Clothes</i>. To have some fun with colors on your computer, try Jim\'s new color tricks. You may discover some great shades that you never knew you liked. Look for \"Color-Typer\" and \"Roll-a-Color\" on the Contents page.</blockquote><hr>");

story=(story+"<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()
}



