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

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

     

}

inbus = new inbus_JSMsg();

/* how slow is the with statement */

with( inbus ) {
/* Meta values
*/
MetaKeys[0] = "MetaCopyright";
MetaVals[0] = "Copyright 1996-2006 Jupitermedia Corporation";
MetaKeys[1] = "MetaTitle";
MetaVals[1] = "InternetNews.com Business News";
MetaKeys[2] = "MetaLink";
MetaVals[2] = "http://www.internetnews.com";
MetaKeys[3] = "MetaLinkTitle";
MetaVals[3] = "<A HREF=\"http://www.internetnews.com\" CLASS=\"JSMsg\">InternetNews.com Business News</A>";
MetaKeys[4] = "MetaDesc";
MetaVals[4] = "Real time business news, stock trends, analysis, features and opinion for IT managers.";


/* content vaues:
*/
Title[0] = "Palm, RIM Lead Tech Stocks Higher";
Desc[0] = "Stocks managed to pare their losses Friday despite plenty of bad news.";
Link[0] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3864931";

Title[1] = "Google Goes More Social With Aardvark Buy";
Desc[1] = "In purchasing Aardvark, Google looks to extend its social media reach with a service that taps into the knowledge of the online community for answers. What do competitors say?\n";
Link[1] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3864936";

Title[2] = "HP Expected to Deliver Solid Earnings";
Desc[2] = "Analysts see bellwether computing giant on solid ground as it prepares to report earnings for the first quarter of the fiscal year, an event that promises insight into the state of the larger technology industry.\n";
Link[2] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3864911";

Title[3] = "Strong 4Q Lifts McAfee Shares";
Desc[3] = "The security software vendor hit analysts&#39; targets in its latest quarter and offered a strong outlook for 2010, helping its shares gain ground Friday while most tech stocks retreated.\n";
Link[3] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3864896";

Title[4] = "Motorola to Split Into Two Firms in 2011";
Desc[4] = "The struggling firm said it thinks it will be better able to focus as two companies instead of one.\n";
Link[4] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3864721";

Title[5] = "Sacrilege? Steve Jobs Parody at Macworld Expo";
Desc[5] = "New York Times columnist David Pogue pokes some fun at Apple&#39;s CEO and interviews Star Trek&#39;s (and Mac fan) LeVar Burton. \n";
Link[5] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3864631";

Title[6] = "MySpace CEO Van Natta Steps Down";
Desc[6] = "News Corp.-owned social network undertakes another executive shuffle as it continues to pursue an entertainment strategy.";
Link[6] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3864486";

Title[7] = "Danger Signs for the Silicon Valley";
Desc[7] = "Report warns that the Valley is in an economic downturn that could be very hard to recover from, though signs of hope include a transition to hot new areas like green tech.\n";
Link[7] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3864391";

Title[8] = "Is Research In Motion In Play?";
Desc[8] = "The release of a pair of new security applications for the BlackBerry comes amid rumors that none other than Microsoft could be looking to buy the Canadian smartphone maker.";
Link[8] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3864256";

Title[9] = "Real Networks, MTV to Spin Out Rhapsody";
Desc[9] = "Struggling online music-subscription service set to emerge as an independent at the end of the first quarter, but analysts are mixed in their takes on the prospects for Real after the deal closes.";
Link[9] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3864126";

Title[10] = "ADC Telecom, Baidu Lead Tech Stock Comeback";
Desc[10] = "Stocks managed to regain some lost ground on Tuesday, but skepticism remained.";
Link[10] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3863981";

Title[11] = "Chip Stocks Stabilize as Market Fall Continues";
Desc[11] = "Stocks tried to stabilize on Monday, but only the chip sector succeeded.";
Link[11] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3863676";

Title[12] = "SAP&#39;s CEO Ouster Latest Indication of Troubles";
Desc[12] = "Leo Apotheker is out as the enterprise software giant looks to shore up its lines of business.  Analysts take a look at the impact.";
Link[12] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3863656";

Title[13] = "Investors Unimpressed With NetSuite&#39;s Q4";
Desc[13] = "Shares of the on-demand software company tumbled more than 15 percent Friday, one day after it posted sales and earnings in line with analyst estimates.\n";
Link[13] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3863466";

Title[14] = "Xfinity Name Get Early Thumbs Down: Survey";
Desc[14] = "Naming firm says Comcast and Apple (iPad) could have done a lot better. Thousands of customers and bloggers agree.\n";
Link[14] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3863441";

Title[15] = "Chip Stocks Lead Comeback from Market Plunge";
Desc[15] = "The chip sector gave the stock market a much-needed boost today.";
Link[15] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3863396";

Title[16] = "Former Microsoft Exec Slams Company";
Desc[16] = "In a New York Times op-ed piece, former Microsoft VP Dick Brass ticks off a number of technologies he says the software giant has failed to capitalize on. \n";
Link[16] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3863176";

Title[17] = "Slight Rise in IT Salaries Gives Hope";
Desc[17] = "Computer Economics survey shows companies are starting to renew efforts to keep key staff with modest wage increases.\n";
Link[17] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3863151";

Title[18] = "Cisco Does It Again: A Sign of Recovery?";
Desc[18] = "Strength in switches lead the networking giant to a solid performance in its most recent quarter, while the entire IT space could reap the benefits if the trends continue.";
Link[18] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3863016";

Title[19] = "Comcast Rebrands Its Services as &#39;Xfinity&#39;";
Desc[19] = "Name is meant to reflect the enormous growth in the cable giant&#39;s services. \n";
Link[19] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3862881";

} // end with block
