
/*
 * -------
 * :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([6]);
this.MetaVals = Array([6]);



 this.ShortListSize = 17;
 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(17);
    }
    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 msnbc.com";
MetaKeys[1] = "MetaTitle";
MetaVals[1] = "msnbc.com: Business";
MetaKeys[2] = "MetaLink";
MetaVals[2] = "http://www.msnbc.msn.com/id/3032072/ns/business/";
MetaKeys[3] = "MetaLinkTitle";
MetaVals[3] = "<A HREF=\"http://www.msnbc.msn.com/id/3032072/ns/business/\" CLASS=\"JSMsg\">msnbc.com: Business</A>";
MetaKeys[4] = "MetaUpdateDate";
MetaVals[4] = "20100904183841";
MetaKeys[5] = "MetaDesc";
MetaVals[5] = "Msnbc.com is a leader in breaking news and original journalism.";


/* content vaues:
*/
Title[0] = "Family of copper heiress asks court to protect her";
Desc[0] = "<![CDATA[<p><a href=\"http://www.msnbc.msn.com/id/38994757/ns/business-clark/\"><img align=\"left\" border=\"0\" src=\"http://msnbcmedia.msn.com/j/MSNBC/Components/Photo/_new/huguette.thumb.jpg\" alt=\"Huguette Clark, heiress to a copper fortune, has been secluded for decades. In June she turned 104 in a New York hospital.\" style=\"margin:0 5px 5px 0\" /></a>Several relatives of 104-year-old reclusive heiress Huguette Clark went to court Friday, asking for a guardian to protect her. Msnbc.com\'s Bill Dedman reports.</p><br clear=\"all\" />]]>";
Link[0] = "http://www.msnbc.msn.com/id/38994757/ns/business-clark/";
Cat[0] = "Business";
DateN[0] = "20100904020719";

Title[1] = "Wall Street completes solid week of gains";
Desc[1] = "<![CDATA[<p><a href=\"http://www.msnbc.msn.com/id/38988632/ns/business-eye_on_the_economy/\"><img align=\"left\" border=\"0\" src=\"http://msnbcmedia.msn.com/j/ap/wall street--269949438_v2.thumb.jpg\" alt=\"Traders work the trading floor of the New York Stock Exchange. Wall Street surged Friday after a relatively encouraging report on the jobs market lifted hopes about the pace of economic growth. \" style=\"margin:0 5px 5px 0\" /></a>Stocks ended a three-week losing streak after an encouraging employment report lifted hopes about the pace of economic growth.</p><br clear=\"all\" />]]>";
Link[1] = "http://www.msnbc.msn.com/id/38988632/ns/business-eye_on_the_economy/";
Cat[1] = "Business";
DateN[1] = "20100903233554";

Title[2] = "Employers hire more workers than expected";
Desc[2] = "Private employers hired more workers than expected in August, lifting hopes for the weak U.S. economy, but the nation’s unemployment rate rose for the first time in four months.";
Link[2] = "http://www.msnbc.msn.com/id/38988367/ns/business-eye_on_the_economy/";
Cat[2] = "Business";
DateN[2] = "20100903182046";

Title[3] = "Life Inc.: Government cuts weigh on job market";
Desc[3] = "";
Link[3] = "http://lifeinc.msnbc.msn.com/_news/2010/09/03/5039257-government-cuts-weigh-on-job-market";
Cat[3] = "Business";
DateN[3] = "20100903145932";

Title[4] = "Flirting your way to the corner office";
Desc[4] = "<![CDATA[<p><a href=\"http://www.msnbc.msn.com/id/38943620/ns/business-forbescom/\"><img align=\"left\" border=\"0\" src=\"http://msnbcmedia.msn.com/j/MSNBC/Components/Photo/_new/100831-biz-forbesflirting-435p.thumb.jpg\" alt=\"To critics of office flirting, author Nicole Williams says &quot;It\'s empowering. Flirting is one of many assets that you can work to get ahead.&quot; \" style=\"margin:0 5px 5px 0\" /></a>Flirting, after all, is one of the oldest tricks in the book. But how do you use it to your professional advantage without crossing the line or inviting unwanted advances?</p><br clear=\"all\" />]]>";
Link[4] = "http://www.msnbc.msn.com/id/38943620/ns/business-forbescom/";
Cat[4] = "Business";
DateN[4] = "20100903113957";

Title[5] = "Experts see trouble ahead for developed world";
Desc[5] = "<![CDATA[<p><a href=\"http://www.msnbc.msn.com/id/38994476/ns/business-eye_on_the_economy/\"><img align=\"left\" border=\"0\" src=\"http://msnbcmedia.msn.com/j/ap/italy economic forum--136807159_v2.thumb.jpg\" alt=\"Israeli President Shimon Peres, center, arrives for the ‘Intelligence on the World, Europe, and Italy’ economic forum, at Villa d’Este, in Cernobbio, on Lake Como, Italy, Friday. Experts at the event offered a gloomy outlook — especially for the United States and much of the industrialized world.\" style=\"margin:0 5px 5px 0\" /></a>Experts gathered in Italy Friday offered a generally gloomy outlook — especially for the United States and much of the industrialized world.</p><br clear=\"all\" />]]>";
Link[5] = "http://www.msnbc.msn.com/id/38994476/ns/business-eye_on_the_economy/";
Cat[5] = "Business";
DateN[5] = "20100903191044";

Title[6] = "Great Recession was emotional ‘roller coaster’";
Desc[6] = "More than a quarter of employed U.S. workers suffered a bout of unemployment during the Great Recession that took many of them on an emotional roller coaster ride.";
Link[6] = "http://www.msnbc.msn.com/id/38990964/ns/business-eye_on_the_economy/";
Cat[6] = "Business";
DateN[6] = "20100903144124";

Title[7] = "Strength in temporary jobs a welcome sign";
Desc[7] = "Analysis:  Growing demand for temporary help in the U.S. suggests stronger full-time hiring ahead, and executives say they are seeing a need for staffing greater than reflected in official figures.";
Link[7] = "http://www.msnbc.msn.com/id/38994018/ns/business-eye_on_the_economy/";
Cat[7] = "Business";
DateN[7] = "20100903180811";

Title[8] = "Kodak settles race-based lawsuit";
Desc[8] = "A federal judge has approved Eastman Kodak\'s $21.4 million offer to settle class-action lawsuits by black employees who maintained white counterparts were favored for pay and promotion.";
Link[8] = "http://www.msnbc.msn.com/id/38998074/ns/business-us_business/";
Cat[8] = "Business";
DateN[8] = "20100903213209";

Title[9] = "Kia moves to change its image, hamsters and all";
Desc[9] = "<![CDATA[<p><a href=\"http://www.msnbc.msn.com/id/38956147/ns/business-autos/\"><img align=\"left\" border=\"0\" src=\"http://msnbcmedia.msn.com/j/MSNBC/Components/Photo/_new/100901-kiaoptima-hmed-1039p.thumb.jpg\" alt=\"The 2011 Kia Optima. With a new design director friom Audi, Kia is trying to transform its image from cheap-and-cheerful to trendy.\" style=\"margin:0 5px 5px 0\" /></a>To most Americans, at least to those who are aware of the brand, Kia is still associated with the cheap-and-cheerful products. That\'s an image the automaker is out to transform.</p><br clear=\"all\" />]]>";
Link[9] = "http://www.msnbc.msn.com/id/38956147/ns/business-autos/";
Cat[9] = "Business";
DateN[9] = "20100903154703";

Title[10] = "Kia recalls 56.000 Souls, Sorentos";
Desc[10] = "Kia Motors says it has started a recall of some 56,000 Soul and Sorento vehicles sold in the United States and South Korea due to defective wiring harnesses that could cause fires.";
Link[10] = "http://www.msnbc.msn.com/id/38992031/ns/business-autos/";
Cat[10] = "Business";
DateN[10] = "20100903154950";

Title[11] = "Continental recalling furloughed pilots";
Desc[11] = "Continental Airlines Inc. is recalling 132 pilots who were furloughed in 2008, saying it needs them to offset retirements and handle an increase in international flying.";
Link[11] = "http://www.msnbc.msn.com/id/38998425/ns/business-us_business/";
Cat[11] = "Business";
DateN[11] = "20100903212315";

Title[12] = "UN calls meeting on rising food prices";
Desc[12] = "A U.N. food agency has called a special meeting on the recent spike in food prices in response to concerns of a repeat of the shortages that led to riots in parts of the world two years ago.";
Link[12] = "http://www.msnbc.msn.com/id/38994474/ns/business-world_business/";
Cat[12] = "Business";
DateN[12] = "20100903201612";

Title[13] = "Service sector grows for eighth straight month";
Desc[13] = "The U.S. service sector, the nation\'s predominant job generator, expanded for the eighth straight month in August although the pace of growth slowed, according to a trade group survey.";
Link[13] = "http://www.msnbc.msn.com/id/38990589/ns/business-eye_on_the_economy/";
Cat[13] = "Business";
DateN[13] = "20100903150931";

Title[14] = "Funk band War tells Pepsi they\'re not friends";
Desc[14] = "<![CDATA[<p><a href=\"http://www.msnbc.msn.com/id/38980387/ns/business-media_biz/\"><img align=\"left\" border=\"0\" src=\"http://msnbcmedia.msn.com/j/MSNBC/Components/Photo/_new/100902-war-hmed-3p.thumb.jpg\" alt=\"The original members of War say they learned the 1975 hit was in the ad for Pepsi MAX only when the commercials launched in July.\" style=\"margin:0 5px 5px 0\" /></a>Members of the band War say they can\'t be friends with Pepsi. The band is suing for more than $10 million, saying it did not negotiate with them to use the song \"Why Can\'t We Be Friends\" in a commercial.</p><br clear=\"all\" />]]>";
Link[14] = "http://www.msnbc.msn.com/id/38980387/ns/business-media_biz/";
Cat[14] = "Business";
DateN[14] = "20100902221001";

Title[15] = "Oh snap! Carrot campaign mimics junk food";
Desc[15] = "<![CDATA[<p><a href=\"http://www.msnbc.msn.com/id/38972945/ns/business-consumer_news/\"><img align=\"left\" border=\"0\" src=\"http://msnbcmedia.msn.com/j/ap/extreme baby carrots--174001013_v2.thumb.jpg\" alt=\"Baby carrot farmers are launching a campaign that pitches the little, orange, crunchy snacks as daring, fun and naughty — just like junk food. \" style=\"margin:0 5px 5px 0\" /></a>Baby carrot farmers are launching a campaign that pitches the little, orange, crunchy snacks as daring, fun and naughty — just like junk food.</p><br clear=\"all\" />]]>";
Link[15] = "http://www.msnbc.msn.com/id/38972945/ns/business-consumer_news/";
Cat[15] = "Business";
DateN[15] = "20100902164124";

Title[16] = "ConsumerMan: Beware of acai berry offers";
Desc[16] = "<![CDATA[<p><a href=\"http://www.msnbc.msn.com/id/38958053/ns/business-consumer_news/\"><img align=\"left\" border=\"0\" src=\"http://msnbcmedia.msn.com/j/MSNBC/Components/Photo/_new/100902-AcaiTease.thumb.jpg\" alt=\"Using bogus claims, fake testimonials and slick marketing tricks, companies have sold hundreds of millions of dollars worth of acai berry supplements. \" style=\"margin:0 5px 5px 0\" /></a>The exotic acai berry has been the superstar in the world of diet supplements. But the federal government is cracking down on false advertising claims and unlawful payment practices.</p><br clear=\"all\" />]]>";
Link[16] = "http://www.msnbc.msn.com/id/38958053/ns/business-consumer_news/";
Cat[16] = "Business";
DateN[16] = "20100902155504";

} // end with block
