
/*
 * -------
 * :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 inwd_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);
    }
 }

     

}

inwd = new inwd_JSMsg();

/* how slow is the with statement */

with( inwd ) {
/* Meta values
*/
MetaKeys[0] = "MetaCopyright";
MetaVals[0] = "Copyright 1996-2010 Quin Street Corporation";
MetaKeys[1] = "MetaTitle";
MetaVals[1] = "InternetNews.com Developer 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 Developer News</A>";
MetaKeys[4] = "MetaDesc";
MetaVals[4] = "Real time developer news, programming trends, analysis, features and opinion for IT managers.";


/* content vaues:
*/
Title[0] = "Eclipse Helios Update Brings New PHP Tools";
Desc[0] = "Latest PDT release from the Foundation will help improve the PHP development experience for developers.\n";
Link[0] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3889986";

Title[1] = "Internet Explorer 9 Ups Standards Support";
Desc[1] = "Microsoft&#39;s browser adds more HTML5-friendly features.";
Link[1] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3889866";

Title[2] = "JBoss Portal 5 Release Easier to Use";
Desc[2] = "With features that include a revised user interface, the JBoss Portal 5 release is designed to make it easier for users to create, manage and build sites.\n";
Link[2] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3889691";

Title[3] = "Eclipse Helios Drops 39 Open Source Projects";
Desc[3] = "The Eclipse Foundation release train keeps on rolling with Helios project, releasing 39 open source projects totaling more than 33 million lines of code.\n";
Link[3] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3889331";

Title[4] = "Mozilla Firefox 3.6.4 Looks to Cut Crashes";
Desc[4] = "Out-of-process plugin enhancements, plus security fixes, make for a more stable release, Mozilla says.";
Link[4] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3889251";

Title[5] = "Oracle Debuts NetBeans IDE 6.9";
Desc[5] = "Latest upgrade to developer framework adds support for JavaFX Composer and PHP, putting to rest some developers&#39; concerns about the future of the IDE after the Sun acquisition.\n";
Link[5] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3888491";

Title[6] = "Subversion Lightens Developers&#39; Load With Edge";
Desc[6] = "New source code management distribution from Subversion aims to equip developers with an easier path for building and managing code.\n";
Link[6] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3888326";

Title[7] = "Cloud Computing a Focus of New IBM Software Lab";
Desc[7] = "Big Blue&#39;s largest software development facility in North America will focus on cutting edge technologies including cloud computing, mobile and enterprise applications. \n";
Link[7] = "http://redir.internet.com/rss/click/www.internetnews.com/bus-news/article.php/3888086";

Title[8] = "Ruby on Rails 3 Gets Closer to Delivery";
Desc[8] = "A release candidate of Ruby on Rails 3 with several new features is set for delivery this week. \n";
Link[8] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3887891";

Title[9] = "HP Aims to Up Security in Application Development";
Desc[9] = "The focus is on stamping out bugs early in the development process.";
Link[9] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3887141";

Title[10] = "IBM Offers Secure Application Design Tools";
Desc[10] = "New security offerings will deal with security issues during the application development process rather than after the app is done.\n";
Link[10] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3886656";

Title[11] = "Survey Reveals Open Source Developer Trends";
Desc[11] = "Linux is gaining ground on Windows as a development platform, and Eclipse is quite popular for Java developers.\n";
Link[11] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3886456";

Title[12] = "Microsoft Updates Web Design Tools";
Desc[12] = "Expression Studio 4 now available for trial download, sales of the Web site development suite coming later this month and in July.\n";
Link[12] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3886436";

Title[13] = "Windows 7 Service Pack Coming";
Desc[13] = "Microsoft said the first beta Service Packs for Windows 7 and the latest Windows Server release are coming next month. \n";
Link[13] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3886421";

Title[14] = "PHP Still Popular Despite Recent Bugs";
Desc[14] = "More than 60 bugs were uncovered in PHP in the course of one month. Should PHP users and developers be worried?\n";
Link[14] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3885971";

Title[15] = "Will Microsoft Join the iPhone Party at WWDC?";
Desc[15] = "Rumors swirl of several moves Microsoft might make in support of Apple, including announcements at next week&#39;s Worldwide Developer Conference (WWDC). \n";
Link[15] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3885521";

Title[16] = "CouchDB Heads to the Cloud With Couchio";
Desc[16] = "In an effort to accelerate open source CouchDB efforts, Couchio, a commercial entity led by the founder of Apache&#39;s CouchDB project, is rolling out a cloud-hosting initiative.\n";
Link[16] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3884711";

Title[17] = "Open Source Dynamic Languages Draw to Clouds";
Desc[17] = "New study finds creators of dynamic language are increasingly taking a good look at cloud-based deployments.\n";
Link[17] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3884501";

Title[18] = "Google Pushes Chrome Browser for Linux, Mac";
Desc[18] = "The latest version of Google&#39;s Chrome 5 browser has been released for Mac and Linux. Google&#39;s added some useful features as well. \n";
Link[18] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3884436";

Title[19] = "Microsoft Open Sources Outlook Tools";
Desc[19] = "Software giant releases File Format Software Development Kit (SDK) and the PST Data Structure View Tool to allow developers to build applications that run on its Outlook e-mail client.\n";
Link[19] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3884446";

} // end with block
