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

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



 this.ShortListSize = 10;
 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 \n'; 
          myTmp = myTmp + 'HREF=about' + msgNumber + '.html>\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 \n"; 
            myTmp = myTmp + "HREF=about" + msgNumber + ".html>\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(10);
    }
    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] = "About.com Orthopedics";
MetaKeys[1] = "MetaLink";
MetaVals[1] = "http://orthopedics.about.com/";
MetaKeys[2] = "MetaLinkTitle";
MetaVals[2] = "<A HREF=\"http://orthopedics.about.com/\" CLASS=\"JSMsg\">About.com Orthopedics</A>";
MetaKeys[3] = "MetaUpdateDate";
MetaVals[3] = "20100830203523";
MetaKeys[4] = "MetaDesc";
MetaVals[4] = "Get the latest headlines from the About.com Orthopedics GuideSite.";


/* content vaues:
*/
Title[0] = "Icing After Knee Replacment Doesn\'t Matter";
Desc[0] = "<p>Controlling pain after knee replacement surgery is often a challenge for patients.  The early days after knee replacement can be painful, but many doctors are looking at ways to help relieve pain after knee replacement.  One method has been to prevent and treat the pain from a variety of methods, including oral medications, IV medications, physical therapy, and cryotherapy.</p>...<p><a href=\"http://clk.about.com/?zi=1/1hc&#038;zu=http://orthopedics.about.com/b/2010/09/09/icing-after-knee-replacment-doesnt-matter.htm\">Read Full Post</a></p>";
Link[0] = "http://orthopedics.about.com/b/2010/09/09/icing-after-knee-replacment-doesnt-matter.htm";
Cat[0] = "";
DateN[0] = "20100909103010";

Title[1] = "Star Pitcher May Need Tommy John Surgery";
Desc[1] = "<p><img src=\"http://0.tqn.com/d/orthopedics/1/0/k/6/strasburgdebut.jpg\" alt=\"\" hspace=\"5\" align=\"right\" />Rookie Washington Nationals pitcher <a href=\"http://clk.about.com/?zi=1/1hc&#038;zu=http://baseball.about.com/od/washingtonnationals/p/stephenstrasburgprofile.htm\">Stephen Strasberg</a> is facing a difficult year (or longer) ahead.  The fastball pitcher has apparently sustained a tear of the ulnar collateral ligament to his throwing elbow and no is likely in need of surgical repair.</p>...<p><a href=\"http://clk.about.com/?zi=1/1hc&#038;zu=http://orthopedics.about.com/b/2010/08/30/star-pitcher-may-need-tommy-john-surgery.htm\">Read Full Post</a></p>";
Link[1] = "http://orthopedics.about.com/b/2010/08/30/star-pitcher-may-need-tommy-john-surgery.htm";
Cat[1] = "";
DateN[1] = "20100830203523";

Title[2] = "Glucosamine Not Effective for Back Pain";
Desc[2] = "<p>Glucosamine has been used for the treatment of joint pain symptoms.  Designed to treated arthritis, glucoasmine is an over-the-counter supplement that contains some of the building blocks of normal cartilage.  The hope is, that by consuming the glucosamine, cartilage health may improve.</p>...<p><a href=\"http://clk.about.com/?zi=1/1hc&#038;zu=http://orthopedics.about.com/b/2010/08/23/glucosamine-not-effective-for-back-pain.htm\">Read Full Post</a></p>";
Link[2] = "http://orthopedics.about.com/b/2010/08/23/glucosamine-not-effective-for-back-pain.htm";
Cat[2] = "";
DateN[2] = "20100823114238";

Title[3] = "Toning Shoes: Do They Work?";
Desc[3] = "<p><img src=\"http://0.tqn.com/d/orthopedics/1/0/j/6/toning.jpg\" alt=\"\" hspace=\"5\" align=\"right\" />One of the most popular and fastest-growing types of footwear are so-called \'toning shoes.\'  These shoes come with claims they will help you slim your waistline, all while walking through your normal daily activities.  Costing over $100, the question is are they worth it?  Or could they be causing more harm than good?</p>...<p><a href=\"http://clk.about.com/?zi=1/1hc&#038;zu=http://orthopedics.about.com/b/2010/08/20/toning-shoes-do-they-work.htm\">Read Full Post</a></p>";
Link[3] = "http://orthopedics.about.com/b/2010/08/20/toning-shoes-do-they-work.htm";
Cat[3] = "";
DateN[3] = "20100820091403";

Title[4] = " Hyaluronic Acid Successful In Treatment of Ankle Arthritis";
Desc[4] = "<p><img src=\"http://0.tqn.com/d/orthopedics/1/G/F/2/needle.jpg\" alt=\"\" hspace=\"5\" align=\"left\" /><br /><a href=\"http://clk.about.com/?zi=1/1hc&#038;zu=http://orthopedics.about.com/cs/treatment/a/synvisc.htm\">Hyaluronic acid</a>, a treatment often used for knee arthritis, has shown successful results when applied to patients with <a href=\"http://clk.about.com/?zi=1/1hc&#038;zu=http://orthopedics.about.com/od/footanklearthritis/a/anklearthritis.htm\">ankle arthritis</a>.  Hyaluronic acid (HA) is often used under the trade names Synvisc, Orthovisc, Euflexxa, etc., and is an injected placed directly into an arthritic joint.  Currently, the only FDA approved use of HA in the United States is for knee arthritis.\n\n<p>\n\nA recent study from Israel investigated the use of HA in patients with ankle arthritis.  The study followed patients for 7 months after their injections and found most patients had less pain and better <a href=\"\">ankle motion</a> following the treatment.  The study was very small, but nonetheless encouraging.  Patients with ankle arthritis have many fewer options for treatment than someone with knee arthritis.  Therefore, finding new treatment options is important in helping these patients with their condition.\n\n\n\n<p>\n\n<sub>Sources: JMei-Dan O. J Am Podiatr Med Assoc. 2010;100(2): 93-100.</sub>\n\n</p>\n\n<p><small><br />\n\n Photo © www.iStockPhoto.com<br />\n\n </small></p>";
Link[4] = "http://orthopedics.about.com/b/2010/08/12/hyaluronic-acid-successful-in-treatment-of-ankle-arthritis.htm";
Cat[4] = "";
DateN[4] = "20100812095357";

Title[5] = "Speeding Up The Healing Process";
Desc[5] = "<p><img src=\"http://z.about.com/d/orthopedics/1/0/k/4/cast.jpg\" alt=\"\" hspace=\"5\" align=\"right\" /><br />\n\n Healing a broken bone takes time. However, there are a <a href=\"http://clk.about.com/?zi=1/1hc&#038;zu=http://orthopedics.about.com/od/castsfracturetreatments/ht/quickly.htm\">few things you can do</a> too help broken bones heal more quickly. <a href=\"http://clk.about.com/?zi=1/1hc&#038;zu=http://orthopedics.about.com/od/castsfracturetreatments/ht/quickly.htm\">Healing a broken bone</a> is a process related to factors including patient age, overall health, nutrition, blood flow to the bone, and treatment.</p>...<p><a href=\"http://clk.about.com/?zi=1/1hc&#038;zu=http://orthopedics.about.com/b/2010/08/08/speeding-up-the-healing-process.htm\">Read Full Post</a></p>";
Link[5] = "http://orthopedics.about.com/b/2010/08/08/speeding-up-the-healing-process.htm";
Cat[5] = "";
DateN[5] = "20100808091006";

Title[6] = "Cleats and Natural Grass Fields Safest For ACLs";
Desc[6] = "<p><img src=\"http://z.about.com/d/orthopedics/1/0/h/6/cleat.jpg\" alt=\"\" hspace=\"5\" align=\"right\" /><br />\n\n A recent study looked into the effect of shoe type and playing surface on the risk of injury to your ACL.  This so-called \"shoe-surface interface\" has been implicated as a possible contributing factor for an <a href=\"http://clk.about.com/?zi=1/1hc&#038;zu=http://orthopedics.about.com/od/aclinjury/tp/acl.htm\">ACL tear</a>.  The question was, is there more strain placed on the ACL with different combinations of shoe type and playing surface.</p>...<p><a href=\"http://clk.about.com/?zi=1/1hc&#038;zu=http://orthopedics.about.com/b/2010/08/03/cleats-and-natural-grass-fields-safest-for-acls.htm\">Read Full Post</a></p>";
Link[6] = "http://orthopedics.about.com/b/2010/08/03/cleats-and-natural-grass-fields-safest-for-acls.htm";
Cat[6] = "";
DateN[6] = "20100803091357";

Title[7] = "ACL Tears May Not Need Surgery";
Desc[7] = "<p>The anterior cruciate ligament (ACL) is one of four major ligaments that helps to stabilize the knee joint.  When an individual sustains an ACL tear, the knee joint is prone to problems of instability.  This is especially problematic in athletes who participate in sports that can cause the knee to give-out.<br class=\"spacer_\" /></p>...<p><a href=\"http://clk.about.com/?zi=1/1hc&#038;zu=http://orthopedics.about.com/b/2010/07/29/acl-tears-may-not-need-surgery.htm\">Read Full Post</a></p>";
Link[7] = "http://orthopedics.about.com/b/2010/07/29/acl-tears-may-not-need-surgery.htm";
Cat[7] = "";
DateN[7] = "20100729085002";

Title[8] = "When Newer Isn\'t Better";
Desc[8] = "<p>Orthopedic implants and surgical tools are rapidly changing and developing.  From new types of joint replacement materials to arthroscopic instrumentation that allows your surgeon to perform less-invasive surgical techniques, surgical tools and implants are constantly changing.  But is every change an improvement?</p>...<p><a href=\"http://clk.about.com/?zi=1/1hc&#038;zu=http://orthopedics.about.com/b/2010/07/27/when-newer-isnt-better.htm\">Read Full Post</a></p>";
Link[8] = "http://orthopedics.about.com/b/2010/07/27/when-newer-isnt-better.htm";
Cat[8] = "";
DateN[8] = "20100727104027";

Title[9] = "Safety of Donated Tissue Used In Surgery";
Desc[9] = "<p>The safety of cadaver donated tissues for use in surgical procedures is of great concern for many patients.  Tissues used for ACL surgery, cartilage transplants, and other orthopedic procedures may come from donors.  The <a href=\"http://orthopedics.about.com/od/surgicalprocedures/f/donor.htm\" mce_href=\"http://orthopedics.about.com/od/surgicalprocedures/f/donor.htm\">safety of these grafts</a> concerns many patients who undergo these types of surgery.</p>...<p><a href=\"http://clk.about.com/?zi=1/1hc&#038;zu=http://orthopedics.about.com/b/2010/07/23/safety-of-donated-tissue-used-in-surgery.htm\">Read Full Post</a></p>";
Link[9] = "http://orthopedics.about.com/b/2010/07/23/safety-of-donated-tissue-used-in-surgery.htm";
Cat[9] = "";
DateN[9] = "20100723061030";

} // end with block
