
/*
 * -------
 * :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-2010 Quin Street 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] = "RIM Earnings Show Heat From iPhone, Android";
Desc[0] = "With Apple and Google bearing down, the early mover in enterprise smartphones has its quarterly numbers fall short.\n";
Link[0] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3889716";

Title[1] = "Say What? The Week&#39;s Top Five IT Quotes";
Desc[1] = "The technology world&#39;s most quotable quips and comments from around the Web.";
Link[1] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3889711";

Title[2] = "Oracle Rides Sun to Big 4Q Earnings";
Desc[2] = "The software and server giant posted a profit of $3 billion for the latest quarter. \n";
Link[2] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3889676";

Title[3] = "Massive Crowds Welcome Apple&#39;s iPhone 4";
Desc[3] = "Despite early leaks and preorder glitches, it&#39;s another blockbuster launch for the closely watched Apple smartphone.";
Link[3] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3889576";

Title[4] = "IBM Rolls Out BI Offerings for Traders";
Desc[4] = "Software package brings business intelligence and speed to the financial services market to find trading triggers among more than 100 different data feeds.\n";
Link[4] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3889481";

Title[5] = "Oracle Earnings Ahead: Signs of a Sun Payoff?";
Desc[5] = "High expectations for some indications of Sun contributing to Oracle&#39;s bottom line.";
Link[5] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3889541";

Title[6] = "Red Hat Earnings Rise on Linux, Middleware Wins";
Desc[6] = "Enterprise Linux vendor turns in a strong first quarter, posting a healthy profit increase over last year thanks to healthy demand in all segments of its portfolio.\n";
Link[6] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3889401";

Title[7] = "Apple iPad Hits 3M Sales Mark in 80 Days";
Desc[7] = "Not even on the market for three months, Apple&#39;s iPad has crossed a significant milestone, with the company announcing that it has sold 3 million units of the red-hot tablet computer.\n";
Link[7] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3889071";

Title[8] = "Intel and FTC Agree to Suspend Antitrust Trial";
Desc[8] = "Chip giant is in talks with authorities at the Federal Trade Commission to reach a settlement in the agency&#39;s antitrust suit, alleging monopolistic and anticompetitive behavior.\n";
Link[8] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3889061";

Title[9] = "After Microsoft Spat, VPN Player Gets Patent OK";
Desc[9] = "VirnetX is given the all-clear from the U.S. Patent and Trademark Office, paving the way to hit up other vendors for licensing fees -- with some potential impact on IT buyers.";
Link[9] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3889311";

Title[10] = "Cloud Services Boom Well Underway";
Desc[10] = "IT research firm Gartner predicts worldwide cloud services revenue will top $63.3 billion this year alone. What&#39;s driving the growth? \n";
Link[10] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3889121";

Title[11] = "Adobe, Jabil, Red Hat Kick Off Big Earnings Week";
Desc[11] = "And Oracle and RIM are right behind.";
Link[11] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3889076";

Title[12] = "Red Hat Earnings Ahead Amid Partner Push";
Desc[12] = "New efforts to expand on its partnership program for the enterprise Linux leader come with client wins.";
Link[12] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3889031";

Title[13] = "Is Verizon Next to Adopt Tiered Data Plans?";
Desc[13] = "Verizon may follow AT&T&#39;s lead in shifting from a one-size-fits-all data plan to multiple price plans for various levels of data consumption.\n";
Link[13] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3888596";

Title[14] = "Solid Growth Seen for Health Care IT Sector";
Desc[14] = "Key contributor to revenue growth will be the government&#39;s push to electronically store patients&#39; medical records.\n";
Link[14] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3888591";

Title[15] = "Tablets Sustaining PC Growth: Forrester";
Desc[15] = "While CEOs at Microsoft and Apple offer opposing views on the future of the PC, Forrester analyst dismisses semantic arguments and sees tablets boosting the sector as a whole.\n";
Link[15] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3888466";

Title[16] = "Microsoft Launches Effort to Fight Cyber Fraud";
Desc[16] = "Software giant teams with National Cyber Forensics and Training Alliance to power  a new reporting system taking aim at Internet fraud and theft.\n";
Link[16] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3888506";

Title[17] = "Google Commerce Search 2.0 Reups e-Tail Play";
Desc[17] = "Search giant refreshes search optimization offering for online retailers with a host of new features to drive e-commerce and compete with heavyweights like Amazon.\n";
Link[17] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3888476";

Title[18] = "Say What? The Week&#39;s Top Five IT Quotes";
Desc[18] = "The technology world&#39;s most quotable quips and comments from around the Web.";
Link[18] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3888501";

Title[19] = "Can the Feds Keep Data Private on the Cloud?";
Desc[19] = "The White House IT team has made its marching orders to the agencies clear: the cloud is the way to go. But with so much data in play, will privacy fall by the wayside?\n";
Link[19] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3888276";

} // end with block

