
/*
 * -------
 * :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 ny_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 = 16;
 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(16);
    }
    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);
    }
 }

     

}

ny = new ny_JSMsg();

/* how slow is the with statement */

with( ny ) {
/* Meta values
*/
MetaKeys[0] = "MetaCopyright";
MetaVals[0] = "Copyright 2010 msnbc.com";
MetaKeys[1] = "MetaTitle";
MetaVals[1] = "msnbc.com: Health";
MetaKeys[2] = "MetaLink";
MetaVals[2] = "http://www.msnbc.msn.com/id/3032076/ns/health/";
MetaKeys[3] = "MetaLinkTitle";
MetaVals[3] = "<A HREF=\"http://www.msnbc.msn.com/id/3032076/ns/health/\" CLASS=\"JSMsg\">msnbc.com: Health</A>";
MetaKeys[4] = "MetaUpdateDate";
MetaVals[4] = "20100903233821";
MetaKeys[5] = "MetaDesc";
MetaVals[5] = "Msnbc.com is a leader in breaking news and original journalism.";


/* content vaues:
*/
Title[0] = "E. coli outbreak puts focus on meat oversight";
Desc[0] = "The first outbreak linked to a rare strain of E. coli in ground beef is prompting a fresh look at tougher regulations to protect the nation\'s meat supply.";
Link[0] = "http://www.msnbc.msn.com/id/38996163/ns/health-food_safety/";
Cat[0] = "Health_Fitness";
DateN[0] = "20100903214629";

Title[1] = "Drugmakers script social media to push meds";
Desc[1] = "<![CDATA[<p><a href=\"http://www.msnbc.msn.com/id/38980515/ns/health-health_care/\"><img align=\"left\" border=\"0\" src=\"http://msnbcmedia.msn.com/j/MSNBC/Components/Photo/_new/100903-fda-hmed-7a.thumb.jpg\" alt=\"Tom Abrams, director of the U.S. Food and Drug Administration\'s Division of Drug Marketing, Advertising, and Communications, talks with co-workers Sheetal Patel (left) and Ernest Voyard (second left) about the FDA\'s enforcement of rules against deceptive pharmaceuticals advertising at FDA headquarters in Silver Spring, Md.\" style=\"margin:0 5px 5px 0\" /></a>It wasn\'t what you would call a casual get-together.  A popular New York blogger attended a brunch with fellow \"frazzled moms.\" They took in tips from a style expert and listened to a nurse extol the virtues of Mirena, a birth control device sold by Bayer Healthcare.  The nurse was on Bayer\'s payroll.</p><br clear=\"all\" />]]>";
Link[1] = "http://www.msnbc.msn.com/id/38980515/ns/health-health_care/";
Cat[1] = "Health_Fitness";
DateN[1] = "20100903134413";

Title[2] = "7 natural strategies to detox your body";
Desc[2] = "<![CDATA[<p><a href=\"http://www.msnbc.msn.com/id/37758450/ns/health-alternative_medicine/\"><img align=\"left\" border=\"0\" src=\"http://msnbcmedia.msn.com/j/ap/food and farm california organics-1575234577_v2.thumb.jpg\" alt=\"Organic farmer Luis Miranda places summer squash out for sale July 7 at a farmer\'s market in Sacramento, Calif. \" style=\"margin:0 5px 5px 0\" /></a>You can\'t avoid all environmental toxins, but you can make it easier for your body to cleanse them.</p><br clear=\"all\" />]]>";
Link[2] = "http://www.msnbc.msn.com/id/37758450/ns/health-alternative_medicine/";
Cat[2] = "Health_Fitness";
DateN[2] = "20100903201210";

Title[3] = "Your hair knows when you\'re going to keel over";
Desc[3] = "<![CDATA[<p><a href=\"http://bodyodd.msnbc.msn.com\"><img align=\"left\" border=\"0\" src=\"http://msnbcmedia.msn.com/j/MSNBC/Components/Photo/_new/g-hlt-100903-screamer-9a.thumb.jpg\" alt=\"So stressed out you feel like pulling out your hair?  Save a few strands for the doctor. It could end up saving your life.\" style=\"margin:0 5px 5px 0\" /></a>So stressed out you feel like pulling out your hair?  Save a few strands for the doctor. It could end up saving your life.</p><br clear=\"all\" />]]>";
Link[3] = "http://bodyodd.msnbc.msn.com";
Cat[3] = "Health_Fitness";
DateN[3] = "20100903162149";

Title[4] = "Hit \'Hoarders\' returns for third season";
Desc[4] = "<![CDATA[<p><a href=\"http://today.msnbc.msn.com/id/38999079/ns/today-entertainment/\"><img align=\"left\" border=\"0\" src=\"http://msnbcmedia.msn.com/j/ap/tv hoarders--1265203588_v2.thumb.jpg\" alt=\"Gordon and his wife live in a home with no running water, and his wife was once trapped in a trash pile and needed help to get out.\" style=\"margin:0 5px 5px 0\" /></a>Show is A&E\'s most popular series among young viewers, something of a surprise given that it\'s about emotionally ill people living amid mounds of garbage.</p><br clear=\"all\" />]]>";
Link[4] = "http://today.msnbc.msn.com/id/38999079/ns/today-entertainment/";
Cat[4] = "Health_Fitness";
DateN[4] = "20100903222206";

Title[5] = "Antidepressant patch doesn\'t help smokers quit";
Desc[5] = "NEW YORK (Reuters Health) - An antidepressant drug delivered through a patch on the skin is no better than placebo for helping smokers kick the habit, new research shows.";
Link[5] = "http://www.msnbc.msn.com/id/38998379/ns/health/";
Cat[5] = "Health_Fitness";
DateN[5] = "20100903212033";

Title[6] = "LA sheriff says almost all pot clinics criminal";
Desc[6] = "The Los Angeles County sheriff has escalated his war of words against California medical marijuana dispensaries, saying as many as 97 percent operate as criminal enterprises.";
Link[6] = "http://www.msnbc.msn.com/id/38997736/ns/us_news/";
Cat[6] = "Health_Fitness";
DateN[6] = "20100903233821";

Title[7] = "Ex-egg farm workers say complaints ignored";
Desc[7] = "<![CDATA[<p><a href=\"http://www.msnbc.msn.com/id/38987945/ns/health-food_safety/\"><img align=\"left\" border=\"0\" src=\"http://msnbcmedia.msn.com/j/ap/tainted eggs inspectors--1868751759_v2.thumb.jpg\" alt=\"Robert Arnold looks on as his wife, Deanna, holds a rooster on their farm, Thursday, in Garrison, Iowa. The couple, former workers at Wright County Egg facilities, say they reported problems such as leaking manure and dead chickens to USDA employees, but were ignored. \" style=\"margin:0 5px 5px 0\" /></a>U.S. Agriculture Department employees worked full-time at two Iowa egg farms at the center of a salmonella outbreak, but two former workers said they ignored complaints about conditions at one site.</p><br clear=\"all\" />]]>";
Link[7] = "http://www.msnbc.msn.com/id/38987945/ns/health-food_safety/";
Cat[7] = "Health_Fitness";
DateN[7] = "20100903133751";

Title[8] = "1 in 7 home kitchens would flunk inspection";
Desc[8] = "<![CDATA[<p><a href=\"http://www.msnbc.msn.com/id/38974766/ns/health-food_safety/\"><img align=\"left\" border=\"0\" src=\"http://msnbcmedia.msn.com/j/MSNBC/Components/Photo/_new/g-hlt-100902-dirty-kitchen-10a.thumb.jpg\" alt=\"Would you pay to eat here?\" style=\"margin:0 5px 5px 0\" /></a>A new study suggests that at least one in seven home kitchens would flunk the kind of health inspection commonly administered to restaurants.</p><br clear=\"all\" />]]>";
Link[8] = "http://www.msnbc.msn.com/id/38974766/ns/health-food_safety/";
Cat[8] = "Health_Fitness";
DateN[8] = "20100902181625";

Title[9] = "Biotech salmon safe for eating: FDA";
Desc[9] = "A biotechnology company\'s genetically engineered salmon are as safe to eat as other Atlantic salmon, U.S. regulators said as they weighed approval of the first DNA-altered animal for Americans\' dinner plates.";
Link[9] = "http://today.msnbc.msn.com/id/38991555/ns/today-entertainment/";
Cat[9] = "Health_Fitness";
DateN[9] = "20100903212237";

Title[10] = "When animal rescuers become animal hoarders";
Desc[10] = "<![CDATA[<p><a href=\"http://www.msnbc.msn.com/id/38978396/ns/health-pet_health/\"><img align=\"left\" border=\"0\" src=\"http://msnbcmedia.msn.com/j/ap/pets hoarding--1073570685_v2.thumb.jpg\" alt=\"Betsey Webster checks on the welfare of the animals and the condition of the emergency shelter set up at Banning Animal Shelter in Banning, Calif. Seized animals from Best Buddies Rescue in Aguanga, Calif., were temporarily housed at Banning Animal Shelter. \" style=\"margin:0 5px 5px 0\" /></a>Linda Bruno called her Pennsylvania cat rescue the land of milk and tuna. It thrived for years as people sent pets they couldn\'t care for from hundreds of miles away — unaware it was a death camp for cats.</p><br clear=\"all\" />]]>";
Link[10] = "http://www.msnbc.msn.com/id/38978396/ns/health-pet_health/";
Cat[10] = "Health_Fitness";
DateN[10] = "20100902204407";

Title[11] = "Osteoporosis drugs may raise throat cancer risk";
Desc[11] = "Researchers say new findings shouldn\'t affect patients taking bisphosphonates, but said the medicines should be watched closely. Other  studies have been divided over whether the risk is real.";
Link[11] = "http://www.msnbc.msn.com/id/38973646/ns/health-cancer/";
Cat[11] = "Health_Fitness";
DateN[11] = "20100902230241";

Title[12] = "Health care credit cards may add to your pain";
Desc[12] = "These days, you may leave your dentist\'s office with more than a toothbrush and dental floss in your bag. Thousands of dentists are offering patients health-care credit cards to cover the work that needs to be done, with seemingly hard-to-resist repayment terms. If you need care and don\'t have insurance to cover it or cash in hand, it\'s tempting to sign up.";
Link[12] = "http://www.msnbc.msn.com/id/38921804/ns/health-health_care/";
Cat[12] = "Health_Fitness";
DateN[12] = "20100902135522";

Title[13] = "No Pampers link to rash cases, safety groups say";
Desc[13] = "Two agencies investigating claims that Procter & Gamble Co\'s Pampers Dry Max gave children severe diaper rash reported Thursday that they have found no specific cause linking the diapers to rashes.";
Link[13] = "http://www.msnbc.msn.com/id/38978644/ns/health-kids_and_parenting/";
Cat[13] = "Health_Fitness";
DateN[13] = "20100902203457";

Title[14] = "Odds of getting new kidney uneven";
Desc[14] = "NEW YORK (Reuters Health) - People with kidney disease are more likely to be added to the waiting list for a kidney transplant if they\'ve had a previous heart, lung or liver transplant, a new study suggests.";
Link[14] = "http://www.msnbc.msn.com/id/38993519/ns/health/";
Cat[14] = "Health_Fitness";
DateN[14] = "20100903171322";

Title[15] = "Text messages little help in remembering the Pill";
Desc[15] = "NEW YORK (Reuters Health) - A cell phone text message -- and the buzz or beep that signals its arrival -- may not help a woman remember to pop her birth control pill, a new study suggests.";
Link[15] = "http://www.msnbc.msn.com/id/38977989/ns/health/";
Cat[15] = "Health_Fitness";
DateN[15] = "20100902193314";

} // end with block
