
/*
 * -------
 * :ATTRIBUTION NOTICE BEGINS
 *
 * The following JSMsg functions are:
 * 
 *    (C) Copyright 2002 - 2004, Creativyst, Inc.
 *               ALL RIGHTS RESERVED
 * 
 * For more information go to:
 *   http://www.Creativyst.com/Doc/Std/JSMsg/JSMsg.htm
 * or email:
 *            Support@Creativyst.com
 * 
 * Licensed under the Open Software License version 1.1
 *
 * END ATTRIBUTION NOTICE:
 * -------
 *
 * The following version token is 
 * required by aggregators
 * -------
 * JSMsgVersion:1.0a
 * -------
 *
 * Made by: JSMFeed.pl v1.0e
*/
/* JSCpragma:StartCompress
*/
/* These functions are free software; you can redistribute 
 * them and/or modify them under the terms of the Open 
 * Software License (OSL) version 1.1 as published by
 * the Open Source Initiative;
 * 
 * This program is distributed in the hope that it will 
 * be useful, but WITHOUT ANY WARRANTY; without even the 
 * implied warranty of MERCHANTABILITY or FITNESS FOR A 
 * PARTICULAR PURPOSE. See the Open Software License
 * version 1.1 for more details.
 * 
 * For the complete details of the Open Software License
 * please visit the Open Source Initiative website.
 *
 * 
 * These functions are part of a shared convention.
 * called JSMsg.  Please see the JSMsg document
 * for more details.
 *
 * www.creativyst.com/Doc/Std/JSMsg/JSMsg.htm
 *
 * -------------------------------------------
 * Parts of this code were automatically
 * generated and may contain copyrighted
 * content from other sources as well.
 * Such content may not be used without
 * first obtaining explicit permissions
 * from their sources.
 *
 *
*/

function nn_JSMsg() {

this.Title = Array([this.ShortListSize]);
this.Desc = Array([this.ShortListSize]);
this.Link = Array([this.ShortListSize]);
this.Cat = Array([this.ShortListSize]);
this.DateN = Array([this.ShortListSize]);

this.MetaKeys = Array([5]);
this.MetaVals = Array([5]);



 this.ShortListSize = 20;
 this.BeenLoaded = 0;
 this.dispNumb;

 this.Msg = function(msgPart, msgOffset)
 {
    document.write( this.Get(msgPart, msgOffset) );
 }

 this.MsgDay = function(msgPart)
 {
    document.write( this.GetDay(msgPart) );
 }

 this.MsgN = function(msgPart, msgNumber)
 {
    document.write( this.GetN(msgPart, msgNumber) );
 }


 this.Get = function(msgPart, msgOffset)
 {
    if(!msgOffset) {
        msgOffset = 0;
    }
    if(!this.BeenLoaded) {
        this.BeenLoaded = 1;
        dispNumb = 
           this.getRandInt(this.ShortListSize);
    }
    return( this.GetN(msgPart, (dispNumb + msgOffset)) );
 }

 this.GetMsgN = function()
 {
	return(this.ShortListSize);
 }

 this.GetDay = function(msgPart)
 {
    var d = new Date();
    var x = d.getDate();
    return( this.GetN(msgPart, x) );
 }


 this.GetN = function(msgPart, msgNumber)
 {
    return( this.GetNCore(msgPart, msgNumber) );
 }

 this.GetNCore = function(msgPart, msgNumber)
 {
    var myTmp;

    if(!msgPart) {
        msgPart = "Body";
    }
    if(!msgNumber) {
        msgNumber = 0;
    }

    if(msgNumber >= this.ShortListSize) {
        msgNumber = msgNumber % this.ShortListSize;
    }

    if(  this.ok(msgPart,"Type") ) {
        return(this.Type[msgNumber]);
    }
    if(  this.ok(msgPart,"Title") ) {
        return(this.Title[msgNumber]);
    }
    if(  this.ok(msgPart, "Desc Description Content") ) {
        return(this.Desc[msgNumber]);
    }
    if(  this.ok(msgPart,"Body") ) {
        return(this.Body[msgNumber]);
    }
    if(  this.ok(msgPart, "Attrib Attribute Source") ) {
        return(this.Attrib[msgNumber]);
    }
    if(  this.ok(msgPart, "Author") ) {
        if(!this.Author[msgNumber]) {
            return(this.Attrib[msgNumber]);
        }
        return(this.Author[msgNumber]);
    }

    if(  this.ok(msgPart,"DayN Day2N Day") ) {
        myTmp = this.DateN[msgNumber];
        if(myTmp.length) { 
          myTmp = myTmp.substr(6,2);
          if(  this.ok(msgPart,"Day2N") ) {
            return(myTmp);
          }
          if(myTmp.charAt(0) == "0") {
            return(myTmp.substr(1,1))
          }
          return(myTmp);
        }
    }
    if(  this.ok(msgPart, "MonthN Month2N") ) {
        myTmp = this.DateN[msgNumber];
        if(myTmp.length) {
          myTmp = myTmp.substr(4,2)
          if(  this.ok(msgPart,"Month2N") ) {
            return(myTmp);
          }
          if(myTmp.charAt(0) == "0") {
            return(myTmp.substr(1,1))
          }
          return(myTmp);
        }
    }
    if(  this.ok(msgPart, "Year2N Year4N YearN Year") ) {
        if(this.DateN[msgNumber].length) {
          if(  this.ok(msgPart,"Year2N") ) {
            return(this.DateN[msgNumber].substr(2,2));
          }
          return(this.DateN[msgNumber].substr(0,4));
        }
    }

    if(  this.ok(msgPart,"Time") ) {
      myTmp = this.DateN[msgNumber];
      return(myTmp.substr(8,6));
    }
    if(  this.ok(msgPart,"Hour2N") ) {
      myTmp = this.DateN[msgNumber];
      return(myTmp.substr(8,2));
    }
    if(  this.ok(msgPart,"Minute2N") ) {
      myTmp = this.DateN[msgNumber];
      return(myTmp.substr(10,2));
    }

    if(  this.ok(msgPart,"Link") ) {
        return(this.Link[msgNumber]);
    }
    if( this.ok(msgPart,"LinkTitle") ) {
        if(this.MetaMsg(msgPart,"Link") && this.MetaMsg(msgPart,"Title") ) {
          if( !this.Link[msgNumber] ) {
              return(this.Title[msgNumber]);
          }

          if( !this.Title[msgNumber] ) {
            this.Title[msgNumber] =  this.Link[msgNumber];              
          }
          myTmp = '<A TARGET="_blank" \n'; 
          myTmp = myTmp + 'HREF="' + this.Link[msgNumber] + '">\n';
          myTmp = myTmp + this.Title[msgNumber] + '</A>\n';

          return(myTmp);

        }
        if( this.MetaMsg(msgPart,"Title") ) {
          return(this.Title[msgNumber]);
        }
        if( this.MetaMsg(msgPart,"Link") ) {
          if( this.Link[msgNumber] ) {
            myTmp = "<A TARGET=\"_blank\" \n"; 
            myTmp = myTmp + "HREF=\"" + this.Link[msgNumber] + "\">\n";
            myTmp = myTmp + this.Link[msgNumber] + "</A>\n";
            return(myTmp);
          }
        }
        return("");
    }
    if( this.ok(msgPart,"Cat Category Subject") ) {
        return(this.Cat[msgNumber]);
    }
    if( this.ok(msgPart,"Thumb") ) {
        return(this.Thumb[msgNumber]);
    }
    if( this.ok(msgPart,"Alt") ) {
        return(this.Alt[msgNumber]);
    }

    return("");
 }




 this.getRandInt = function(RandSz)
 {
    var t, t2, t3;

    t = 0;
    while(t < .000001) {
        t = Math.random();
        t = Math.abs(t);
    }
    t2 = t * 1000000;
    t2 = Math.round(t2);
    t3 = t2 % RandSz;
    return(t3);
 }



 this.ok = function(a, b)
 {
    var t, t2;

    if(!this.is(a,b)) {
        return(0);
    }
    return(this.MetaMsg(a));
 }

 this.is = function(a, b)
 {
    var t, t2;

    t = a + " ";
    t2 = b + " ";
    t2 = t2.toUpperCase();
    t = t.toUpperCase();

    if(t2.indexOf(t) == -1) {
        return(0);
    }
    return(1);
 }


 this.MetaMsg = function(msgCmd)
 {
    var i,l;

    if( this.is(msgCmd, "Title LinkTitle Desc Description Link LinkTitle Cat Category SubjectDayN Day2N MonthN Month2N Year2N Year4N YearN Year Time Hour2N Minute2N ") ) {
         return(1);

    }
    else if( this.is(msgCmd, "MetaCount") ) {
        return(20);
    }
    else {
        if(this.MetaKeys) {
            l = this.MetaKeys.length;
            for(i = 0;i < l;i++) {
                if(this.MetaKeys[i] == msgCmd) {
                    return(this.MetaVals[i]);
                }
            }
        }
        return(0);
    }
 }

     

}

nn = new nn_JSMsg();

/* how slow is the with statement */

with( nn ) {
/* Meta values
*/
MetaKeys[0] = "MetaCopyright";
MetaVals[0] = "Copyright 2010 The Seattle Times Company";
MetaKeys[1] = "MetaTitle";
MetaVals[1] = "The Seattle Times: Home &amp; Garden";
MetaKeys[2] = "MetaLink";
MetaVals[2] = "http://seattletimes.nwsource.com/html/homegarden/index.html";
MetaKeys[3] = "MetaLinkTitle";
MetaVals[3] = "<A HREF=\"http://seattletimes.nwsource.com/html/homegarden/index.html\" CLASS=\"JSMsg\">The Seattle Times: Home &amp; Garden</A>";
MetaKeys[4] = "MetaUpdateDate";
MetaVals[4] = "20100904190810";


/* content vaues:
*/
Title[0] = "Northwest garden lovers can learn about New Zealand or bees";
Desc[0] = "Clippings: An occasional gathering of garden notes";
Link[0] = "http://seattletimes.nwsource.com/html/pacificnw/2012711700_pacificplife05.html?syndication=rss";
Cat[0] = "Pacific NW";
DateN[0] = "20100831131121";

Title[1] = "A garden full of flowers flows right on in to a sunny new room";
Desc[1] = " In Seattle, a frilly, flower-filled garden is all about going with the flow. From the koi pond out back to the sunroom to the entry courtyard in front, all is fragrant and lush.";
Link[1] = "http://seattletimes.nwsource.com/html/pacificnw/2012711701_pacificpnwl05.html?syndication=rss";
Cat[1] = "Pacific NW";
DateN[1] = "20100903183539";

Title[2] = "For sophistication and style, designer Candice Olson paints it black";
Desc[2] = "Divine Design: Interior designer Candice Olson updates a kitchen for a couple that entertains both clients and friends at home.";
Link[2] = "http://seattletimes.nwsource.com/html/homegarden/2012804331_divinedesign04.html?syndication=rss";
Cat[2] = "Home & Garden";
DateN[2] = "20100903210104";

Title[3] = "Save your seeds, save money";
Desc[3] = "Yardsmart: Horticulturist Maureen Gilmer shares how to save plants seeds to use next year or to give as gifts.";
Link[3] = "http://seattletimes.nwsource.com/html/homegarden/2012804348_yardsmart04.html?syndication=rss";
Cat[3] = "Home & Garden";
DateN[3] = "20100903210104";

Title[4] = "Ins and outs of home inspection";
Desc[4] = "Homefix: Dwight Barnett answers home-improvement questions. This week&#39;s topic is on home inspections.";
Link[4] = "http://seattletimes.nwsource.com/html/homegarden/2012805262_homefix04.html?syndication=rss";
Cat[4] = "Home & Garden";
DateN[4] = "20100903210104";

Title[5] = "Treasures: Bombshell photo a touchdown find";
Desc[5] = "Signed photo has minimum insurance value of $7,000 to $10,000 &#8212; but that price could go much higher because of its football associations.";
Link[5] = "http://seattletimes.nwsource.com/html/homegarden/2012768834_webtreasures03.html?syndication=rss";
Cat[5] = "Home & Garden";
DateN[5] = "20100902211603";

Title[6] = "Some remove pools rather than fix them";
Desc[6] = "There are about 5 million in-ground residential pools in the United States, according to the Association of Pool and Spa Professionals.";
Link[6] = "http://seattletimes.nwsource.com/html/homegarden/2012771367_webpool03.html?syndication=rss";
Cat[6] = "Home & Garden";
DateN[6] = "20100902210103";

Title[7] = "Host a garden party";
Desc[7] = "11 tips to making your garden shine for a party.";
Link[7] = "http://seattletimes.nwsource.com/html/homegarden/2012794864_gardenparty03.html?syndication=rss";
Cat[7] = "Home & Garden";
DateN[7] = "20100902210104";

Title[8] = "Fianc&#233;e doesn&#39;t want to live in ex-wife&#39;s house";
Desc[8] = "Ex-Etiquette: I don&#39;t want to live in their house";
Link[8] = "http://seattletimes.nwsource.com/html/homegarden/2012794899_exetiquette03.html?syndication=rss";
Cat[8] = "Home & Garden";
DateN[8] = "20100902210104";

Title[9] = "Simple ways to refeather your nest";
Desc[9] = "Interior design experts offer advice on easy updates for the bedroom.";
Link[9] = "http://seattletimes.nwsource.com/html/homegarden/2012794781_designfix03.html?syndication=rss";
Cat[9] = "Home & Garden";
DateN[9] = "20100902210103";

Title[10] = "Tight wedding budget leaves some guests dateless";
Desc[10] = "Ask Carley: Must everyone be allowed to bring a guest to a wedding?";
Link[10] = "http://seattletimes.nwsource.com/html/homegarden/2012794960_askcarley03.html?syndication=rss";
Cat[10] = "Home & Garden";
DateN[10] = "20100902210104";

Title[11] = "Interiors: A simple change or addition can make a big difference";
Desc[11] = "Plan and consider small, easy steps before diving in.";
Link[11] = "http://seattletimes.nwsource.com/html/homegarden/2012768944_webinterior02.html?syndication=rss";
Cat[11] = "Home & Garden";
DateN[11] = "20100901214603";

Title[12] = "Ask Mr. Dad: Role of comforter";
Desc[12] = "Whenever she gets hurt or upset, daughter screams for her mommy.";
Link[12] = "http://seattletimes.nwsource.com/html/homegarden/2012768809_webdad02.html?syndication=rss";
Cat[12] = "Home & Garden";
DateN[12] = "20100901210104";

Title[13] = "Overwinter cactuses in a cold, dry garage";
Desc[13] = "Garden writer Ciscoe Morris offers tips on overwintering cactuses; the fun of growing Robinia pseudoacacia &#39;Twisty Baby&#39; and the events at the upcoming 4th Annual Blues for Food Fest at Magnuson Park.";
Link[13] = "http://seattletimes.nwsource.com/html/homegarden/2012778644_ciscoemorris02.html?syndication=rss";
Cat[13] = "Home & Garden";
DateN[13] = "20100901210107";

Title[14] = "Fall garden checklist";
Desc[14] = "A checklist of seasonal tasks in the garden.";
Link[14] = "http://seattletimes.nwsource.com/html/homegarden/2012765413_fallgardenchecklist01.html?syndication=rss";
Cat[14] = "Home & Garden";
DateN[14] = "20100831210103";

Title[15] = "Plumber: Generate a pre-storm plan";
Desc[15] = "Generators are hot items when big storms hit, because it&#39;s important to keep electrical equipment like sump pumps and refrigerators running.";
Link[15] = "http://seattletimes.nwsource.com/html/homegarden/2012763586_webplumb31.html?syndication=rss";
Cat[15] = "Home & Garden";
DateN[15] = "20100830211603";

Title[16] = "ButtonedUp: Get organized at work";
Desc[16] = "A recent study showed that a typical desk has 400 times more bacteria per square inch than an office toilet seat.";
Link[16] = "http://seattletimes.nwsource.com/html/homegarden/2012721741_webgerms31.html?syndication=rss";
Cat[16] = "Home & Garden";
DateN[16] = "20100825134503";

Title[17] = "Home Style: Dramatic fall table displays";
Desc[17] = "Here is a quick four-step approach to make a statment.";
Link[17] = "http://seattletimes.nwsource.com/html/homegarden/2012762208_webstyle31.html?syndication=rss";
Cat[17] = "Home & Garden";
DateN[17] = "20100830210103";

Title[18] = "A lost class ring comes full circle";
Desc[18] = "A promise is fulfilled and a new friendship formed when a ring lost in 1975 is returned to its owner.";
Link[18] = "http://seattletimes.nwsource.com/html/homegarden/2012741053_classring30.html?syndication=rss";
Cat[18] = "Home & Garden";
DateN[18] = "20100829210103";

Title[19] = "How to tackle the teen dressing dilemma";
Desc[19] = "The Parent Hood: Experts and parents offer advice on how to encourage teens to dress appropriately.";
Link[19] = "http://seattletimes.nwsource.com/html/homegarden/2012744445_parenthood30.html?syndication=rss";
Cat[19] = "Home & Garden";
DateN[19] = "20100829210104";

} // end with block
