
/*
 * -------
 * :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 cntop_JSMsg() {

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

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



 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 Author 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);
    }
 }

     

}

cntop = new cntop_JSMsg();

/* how slow is the with statement */

with( cntop ) {
/* Meta values
*/
MetaKeys[0] = "MetaCopyright";
MetaVals[0] = "2011 CBS Interactive Inc. All rights reserved";
MetaKeys[1] = "MetaTitle";
MetaVals[1] = "CNET News";
MetaKeys[2] = "MetaLink";
MetaVals[2] = "http://news.cnet.com/";
MetaKeys[3] = "MetaLinkTitle";
MetaVals[3] = "<A HREF=\"http://news.cnet.com/\" CLASS=\"JSMsg\">CNET News</A>";
MetaKeys[4] = "MetaUpdateDate";
MetaVals[4] = "20111111112430";
MetaKeys[5] = "MetaDesc";
MetaVals[5] = "Tech news and business reports by CNET News. Focused on information technology, core topics include computers, hardware, software, networking, and Internet media.";


/* content vaues:
*/
Title[0] = "Another tech blogger joins the startup fray";
Desc[0] = "ReadWriteWeb\'s Marshall Kirkpatrick is launching a business called Plexus Engine to help others scour the Web.<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/SDEGFlu0tJQ\" height=\"1\" width=\"1\"/>";
Author[0] = "Paul Sloan";
Link[0] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/SDEGFlu0tJQ/";
DateN[0] = "20111111110000";

Title[1] = "Audi testing A1 e-tron on Munich streets";
Desc[1] = "Audi began testing 20 examples of its A1 e-tron city car in Munich this week. This trial run for the electric car with range extending gas engine will help Audi evaluate the future usability of the car.<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/SitLFNap-dY\" height=\"1\" width=\"1\"/>";
Author[1] = "Wayne Cunningham";
Link[1] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/SitLFNap-dY/";
DateN[1] = "20111111104038";

Title[2] = "The next social debate: To food post or not to food post?";
Desc[2] = "You either love it or you hate it, but almost everyone has an opinion on the new philosophical war threatening to tear the fabric of social networking: pictures of other people\'s food. Are you a food poster? Stand up and be counted!<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/peZknV4f684\" height=\"1\" width=\"1\"/>";
Author[2] = "Molly Wood";
Link[2] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/peZknV4f684/";
DateN[2] = "20111111094913";

Title[3] = "Steve Jobs prevails over Adobe\'s Flash";
Desc[3] = "<b style=\"color:#900;\">week in review</b> Adobe kills off mobile Flash, while Net neutrality survives vote. Also: iOS 5.0.1 arrives.<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/K4GrpqZLrlk\" height=\"1\" width=\"1\"/>";
Author[3] = "Steven Musil";
Link[3] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/K4GrpqZLrlk/";
DateN[3] = "20111111094337";

Title[4] = "One in five Chinese wants a Mac, Morgan Stanley says";
Desc[4] = "According to new research from Morgan Stanley, a growing number of Chinese consumers can\'t wait to get their hands on a Mac.<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/KWaRr4fkWTw\" height=\"1\" width=\"1\"/>";
Author[4] = "Don Reisinger";
Link[4] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/KWaRr4fkWTw/";
DateN[4] = "20111111090917";

Title[5] = "What does EMI sale mean for digital music fans?";
Desc[5] = "The music company that owns the Beatles collection and is home to such music acts as Katy Perry and Coldplay is being broken into pieces and sold to its biggest competitors. Is this bad news for Web music?<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/JoJXxDZEE88\" height=\"1\" width=\"1\"/>";
Author[5] = "Greg Sandoval";
Link[5] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/JoJXxDZEE88/";
DateN[5] = "20111111085625";

Title[6] = "Man to 911: Hey, my iPhone won\'t work";
Desc[6] = "An Illinois man is arrested after reportedly calling 911 five times to complain of a malfunctioning iPhone. Did he really think the cops are smarter than Genius Bar employees?<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/YvqkONk5uRk\" height=\"1\" width=\"1\"/>";
Author[6] = "Chris Matyszczyk";
Link[6] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/YvqkONk5uRk/";
DateN[6] = "20111111083136";

Title[7] = "Apple selling unlocked, contract-free iPhone 4S";
Desc[7] = "For those who don\'t want to be bound by a single contract or carrier, the new iPhone 4S is now available from Apple as an unlocked phone selling at non-subsidized prices.<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/EKuI67FzbpM\" height=\"1\" width=\"1\"/>";
Author[7] = "Lance Whitney";
Link[7] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/EKuI67FzbpM/";
DateN[7] = "20111111082900";

Title[8] = "So Zynga, ready to go public?";
Desc[8] = "The social-gaming company is trying to maneuver its way through a disconcerting IPO market, but also needs to overcome complaints over its stock \"meritocracy.\"<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/ohHV3cZ6pKA\" height=\"1\" width=\"1\"/>";
Author[8] = "Don Reisinger";
Link[8] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/ohHV3cZ6pKA/";
DateN[8] = "20111111080042";

Title[9] = "iOS 5.0.1 didn\'t fix battery drain bug, say some users";
Desc[9] = "Released yesterday, Apple\'s iOS 5.0.1 was supposed to resolve a battery drain problem introduced with iOS 5, but some early updaters claim they\'re running into the same issue.<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/Q-5oj90-r5Q\" height=\"1\" width=\"1\"/>";
Author[9] = "Lance Whitney";
Link[9] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/Q-5oj90-r5Q/";
DateN[9] = "20111111074541";

Title[10] = "New software could create computerized sportscasters";
Desc[10] = "Algorithms from a Swiss developer could allow computers to track the real-time movements of athletes, making automated sports commentary possible.<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/IRzGABfTFZs\" height=\"1\" width=\"1\"/>";
Author[10] = "John Scott Lewinski";
Link[10] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/IRzGABfTFZs/";
DateN[10] = "20111111073810";

Title[11] = "Sprint locking down iPhone 4S SIMs";
Desc[11] = "Starting today, the carrier will be locking down the SIM, allowing customers to only unlock it for international use.<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/FrUCY8gJCIU\" height=\"1\" width=\"1\"/>";
Author[11] = "Roger Cheng";
Link[11] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/FrUCY8gJCIU/";
DateN[11] = "20111111064717";

Title[12] = "At $400 million, Modern Warfare 3 launch the biggest yet";
Desc[12] = "Activision says the game generated more than $400 million and sold 6.5 million units in its first 24 hours on store shelves, easily beating its predecessors.<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/hfRrPogiXZw\" height=\"1\" width=\"1\"/>";
Author[12] = "Don Reisinger";
Link[12] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/hfRrPogiXZw/";
DateN[12] = "20111111061229";

Title[13] = "Get a Samsung Galaxy Tab 7-inch tablet with 3G for $249.99";
Desc[13] = "Amazingly, this is a new unit, not a refurb. And shipping is on the house. Plus, today only, get a truly killer deal on Laplink PCmover Professional.<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/iSIA8hRr0q4\" height=\"1\" width=\"1\"/>";
Author[13] = "Rick Broida";
Link[13] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/iSIA8hRr0q4/";
DateN[13] = "20111111060115";

Title[14] = "VMware fits work phone into personal phone";
Desc[14] = "The software company is tinkering away with Verizon and Telefonica to help make it easier for you to bring your own smartphone to work.<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/n04qiwBjI7c\" height=\"1\" width=\"1\"/>";
Author[14] = "Rachel King";
Link[14] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/n04qiwBjI7c/";
DateN[14] = "20111111055032";

Title[15] = "Logitech confesses to \'gigantic\' mistake with Google TV";
Desc[15] = "Company pulls the plug on its Revue set-top box for Google TV, saying that the device cost it $100 million in operating profits and that Google TV just isn\'t ready for prime time.<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/lhcKG23dlII\" height=\"1\" width=\"1\"/>";
Author[15] = "Lance Whitney";
Link[15] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/lhcKG23dlII/";
DateN[15] = "20111111053251";

Title[16] = "Sony working on a \'different kind of TV set\'";
Desc[16] = "Sony CEO Howard Stringer says his company is spending boatloads of cash on a television that\'s unlike any other on the market.<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/JRnZ5pJ0ddY\" height=\"1\" width=\"1\"/>";
Author[16] = "Don Reisinger";
Link[16] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/JRnZ5pJ0ddY/";
DateN[16] = "20111111053031";

Title[17] = "When Steve Jobs visited PARC (video)";
Desc[17] = "Hear about Steve Jobs\' long-ago trips to Xerox\'s Palo Alto Research Center, including the one in which he eyed the company\'s GUI prototype--which ended up on Mac OS.<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/tXkJqtzZnMc\" height=\"1\" width=\"1\"/>";
Author[17] = "Rachel King";
Link[17] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/tXkJqtzZnMc/";
DateN[17] = "20111111052117";

Title[18] = "$19 for unlimited cell phone service? Am I dreaming?";
Desc[18] = "This edition of Ask Maggie helps a reader decide if the $19 a month unlimited cell phone service from Republic Wireless is right for him.<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/U1RQCt4GGhc\" height=\"1\" width=\"1\"/>";
Author[18] = "Marguerite Reardon";
Link[18] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/U1RQCt4GGhc/";
DateN[18] = "20111111000000";

Title[19] = "A peek at Intel chip headed to Ultrabooks";
Desc[19] = "Intel\'s \"Haswell\" chip will likely power future MacBooks and Ultrabooks and squeeze in even more performance into sub-one-inch laptops as well as tablets.<img src=\"http://feeds.feedburner.com/~r/cnet/tcoc/~4/wVPYJSGwDI0\" height=\"1\" width=\"1\"/>";
Author[19] = "Brooke Crothers";
Link[19] = "http://feedproxy.google.com/~r/cnet/tcoc/~3/wVPYJSGwDI0/";
DateN[19] = "20111110191401";

} // end with block

