
/*
 * -------
 * :ATTRIBUTION NOTICE BEGINS
 *
 * The following JSMsg functions are:
 * 
 *    (C) Copyright 2002 - 2006, 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.0f
*/
/* 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 np_JSMsg() {

this.Title = Array([this.ShortListSize]);
this.Desc = Array([this.ShortListSize]);
this.Link = 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.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 DayN 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);
    }
 }

     

}

np = new np_JSMsg();

/* how slow is the with statement */

with( np ) {
/* Meta values
*/
MetaKeys[0] = "MetaTitle";
MetaVals[0] = "Yahoo! Finance: Retirement News";
MetaKeys[1] = "MetaLink";
MetaVals[1] = "http://biz.yahoo.com/topic/retirement/";
MetaKeys[2] = "MetaLinkTitle";
MetaVals[2] = "<A HREF=\"http://biz.yahoo.com/topic/retirement/\" CLASS=\"JSMsg\">Yahoo! Finance: Retirement News</A>";
MetaKeys[3] = "MetaUpdateDate";
MetaVals[3] = "20100317182530";
MetaKeys[4] = "MetaDesc";
MetaVals[4] = "The latest news on Retirement from Yahoo! Finance ";


/* content vaues:
*/
Title[0] = "Schlumberger CEO\'s pay falls 4.2 percent in 2009 (AP)";
Desc[0] = "The chairman and CEO of Schlumberger Ltd., the world\'s biggest oilfield services company, saw his total compensation fall 4.2 percent in 2009 from a year earlier, according to an Associated Press analysis of a Securities and Exchange Commission filing.";
Link[0] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/ap/100317/us_schlumberger_executive_compensation.html?.v=4";
DateN[0] = "20100317182530";

Title[1] = "IRS: Tax schemes to be wary of this year (CNNMoney.com)";
Desc[1] = "As the tax deadline draws near, the Internal Revenue Service wants you to beware of fraudulent tax preparers, hidden offshore bank accounts and offers that seem too good to be true.";
Link[1] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/cnnm/100317/031610_tax_scams.html?.v=3";
DateN[1] = "20100317135600";

Title[2] = "Can You Afford to Retire? (BusinessWeek)";
Desc[2] = "After watching their savings evaporate and their net worth plunge, many are giving up on retirement planning. But there are ways out of this mess without winning the lottery";
Link[2] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/bizwk/100317/0928b4139036332450.html?.v=1";
DateN[2] = "20100317120844";

Title[3] = "How Does Your Spending Stack Up? (Morningstar.com)";
Desc[3] = "Five questions with Bundle.com managing editor Janet Paskin.";
Link[3] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/ms/100317/329664.html?.v=1";
DateN[3] = "20100317110000";

Title[4] = "How to bequeath your retirement savings (Bankrate.com)";
Desc[4] = "Careful planning can save your heirs a bundle on taxes or stop them from squandering your savings.";
Link[4] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/brn/100317/8142619.html?.v=1";
DateN[4] = "20100317100000";

Title[5] = "Financial Engines shares soar in trading debut (AP)";
Desc[5] = "Shares of Financial Engines Inc. soared nearly 44 percent in their market debut Tuesday, giving the portfolio manager and advisory firm the best first-day IPO performance so far this year.";
Link[5] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/ap/100316/us_financial_engines_ipo_mover.html?.v=5";
DateN[5] = "20100316213141";

Title[6] = "IRS: Tax schemes to be wary of this year (CNNMoney.com)";
Desc[6] = "As the tax deadline draws near, the IRS wants you to beware of fraudulent tax preparers, hidden offshore bank accounts and offers that seem too good to be true.";
Link[6] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/cnnm/100316/031610_tax_scams.html?.v=2";
DateN[6] = "20100316211100";

Title[7] = "New York Times CEO was paid $4.9 million in 2009 (AP)";
Desc[7] = "New York Times Co. CEO Janet Robinson got a compensation package worth roughly $4.9 million in 2009, according to an Associated Press analysis of a regulatory filing.";
Link[7] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/ap/100316/us_new_york_times_executive_compensation.html?.v=5";
DateN[7] = "20100316192752";

Title[8] = "8 Roth IRA conversion traps to avoid (Bankrate.com)";
Desc[8] = "Converting a traditional IRA to a Roth IRA can be a smart move; just be mindful of these traps.";
Link[8] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/brn/100316/8143057.html?.v=1";
DateN[8] = "20100316100000";

Title[9] = "Investment Manager Goes Down The Totem Pole To Find Market (Investor\'s Business Daily, Inc.)";
Desc[9] = "Main Street may not trust Wall Street these days. But still, somebody has to manage all those 401s. That\'s the logic behind Financial Engines\' business model. The company targets a more downscale client base than your average investment manager: some 45% of members have less than $20,000 in their";
Link[9] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/ibd/100315/527335.html?.v=1";
DateN[9] = "20100315214600";

Title[10] = "Colgate-Palmolive CEO gets 31 percent pay boost (AP)";
Desc[10] = "Colgate-Palmolive Co.\'s CEO Ian M. Cook\'s compensation rose 31 percent last year to $14.4 million, as the company\'s profit rose amid flat sales of its name-brand toothpastes and soaps, according to an Associated Press analysis of regulatory filings.";
Link[10] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/ap/100315/us_colgate_palmolive_executive_compensation.html?.v=4";
DateN[10] = "20100315195221";

Title[11] = "Owner of defunct Colo. company sued over 401(k) (AP)";
Desc[11] = "The U.S. Department of Labor has filed a civil lawsuit accusing the former owner of a Fruita company of abandoning the company\'s 401 plan as its trustee.";
Link[11] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/ap/100315/us_ixp_lawsuit_colorado.html?.v=1";
DateN[11] = "20100315154343";

Title[12] = "Virginia Assembly OKs 2-year, $70 billion budget (AP)";
Desc[12] = "The Virginia General Assembly on Sunday overwhelmingly passed a new two-year budget that makes unprecedented cuts to state services and programs but includes no tax increase.";
Link[12] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/ap/100315/us_virginia_budget.html?.v=1";
DateN[12] = "20100315145711";

Title[13] = "The Error-Proof Portfolio: What Not to Put in Your IRA (Morningstar.com)";
Desc[13] = "How to narrow down the list of prospective investments.";
Link[13] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/ms/100315/329429.html?.v=1";
DateN[13] = "20100315110000";

Title[14] = "Name, ID number must match on taxes (Bankrate.com)";
Desc[14] = "Nonmatching name and Social Security number on a tax return could mean costly problems.";
Link[14] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/brn/100315/8119538.html?.v=1";
DateN[14] = "20100315100000";

Title[15] = "Hot trends in retirement plans (Bankrate.com)";
Desc[15] = "New products and policies will give workers more tools and opportunities to feather their nest eggs.";
Link[15] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/brn/100315/8142633.html?.v=1";
DateN[15] = "20100315100000";

Title[16] = "With Time, Portfolios Can Mend (Investor\'s Business Daily, Inc.)";
Desc[16] = "Tick ... tock ... tick ... tock! Capt. Hook knew what the ominous sound of a clock meant  that hungry crocodile who always seemed to be closing in. These days, a lot of Americans feel the same about retirement.";
Link[16] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/ibd/100312/527172.html?.v=1";
DateN[16] = "20100312231700";

Title[17] = "Americans Now Repose Near Home (Investor\'s Business Daily, Inc.)";
Desc[17] = "Most Americans don\'t head to the Sun Belt at retirement age. They stick near home on staycation, by family and friends. Those who move choose where based on what they like and know and what they can afford.";
Link[17] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/ibd/100312/527169.html?.v=1";
DateN[17] = "20100312225700";

Title[18] = "Stretch Run Is Riddled With Bumps (Investor\'s Business Daily, Inc.)";
Desc[18] = "Building a retirement nest egg has never been more challenging. Many investors are still licking their wounds from the crummy stock market of 2007-early 2009. Now comes a barrage of tax hikes.";
Link[18] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/ibd/100312/527168.html?.v=1";
DateN[18] = "20100312225700";

Title[19] = "L.L. Bean sales fall in 2009 (AP)";
Desc[19] = "Sales dipped for L.L. Bean for the second consecutive year in 2009 but the outdoors clothing retailer managed to beat its own projections, the company said Friday. The company also reported that online sales outpaced catalog orders for the entire year for the first time.";
Link[19] = "http://us.rd.yahoo.com/finance/news/rss/story/*http://biz.yahoo.com/ap/100312/us_ll_bean.html?.v=7";
DateN[19] = "20100312215259";

} // end with block
