
/*
 * -------
 * :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-2006 Jupitermedia 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] = "OpenOffice 3.2 Lands Amid Critical Changes";
Desc[0] = "The new OpenOffice.org release offers a handful of tweaks and improvements. But with an independent Sun now largely out of the picture, what&#39;s in store for the project&#39;s future?";
Link[0] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3864821";

Title[1] = "Red Hat, IBM Firmly in KVM Virtualization Camp";
Desc[1] = "Big Blue might have been a prime mover behind the Xen open source hypervisor, but along with Red Hat, it&#39;s now putting its efforts behind its rival technology.";
Link[1] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3864811";

Title[2] = "Red Hat Talks Up Open Source Cloud Plans";
Desc[2] = "Linux vendor details initiatives aimed at expanding infrastructure and applications through cloud-based open source projects at its Open Source Cloud Computing Forum.\n";
Link[2] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3864466";

Title[3] = "ActiveState Debuts Open Source Business Suite";
Desc[3] = "New premium offerings roll out as ActiveState looks to enhance community development efforts.\n";
Link[3] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3863036";

Title[4] = "Salesforce Offers Visual App Builder";
Desc[4] = "Build your apps on Force.com visually by picking just forms and fields with Visual Process Manager.\n";
Link[4] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3862821";

Title[5] = "Codesion Steps Out From CVS&#39;s Shadow";
Desc[5] = "Everyone knows that CVS is a legacy tech for code repositories, right?\n";
Link[5] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3862541";

Title[6] = "Facebook Makes Major PHP Push With HipHop";
Desc[6] = "Social networking giant says new runtime aims to bring open source PHP to scale.\n";
Link[6] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3862506";

Title[7] = "Free Ride Over for Microsoft Azure Users";
Desc[7] = "February 1 was the date the company had named to begin charging for Azure services.\n";
Link[7] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3862166";

Title[8] = "Drupal Opens the Garden to Boost CMS";
Desc[8] = "Open source effort offers users a preview of version 7 with its new Drupal Gardens effort, aimed to simplify implementation of the popular CMS offering.\n";
Link[8] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3861856";

Title[9] = "Oracle Talks Plans for Linux, Solaris";
Desc[9] = "After Sun acquisition, Ellison details vision for how Solaris and Linux can work together.\n";
Link[9] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3861516";

Title[10] = "Azure Makes Cloud Computing Innovation Safe";
Desc[10] = "Azure will allow innovators and developers to off-load a lot of cloud deployment issues to a big partner and provide an environment that won&#146;t give IT conniptions.\n";
Link[10] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3861266";

Title[11] = "Red Hat&#39;s JBoss Looks Ahead";
Desc[11] = "An enhanced user interface -- and just plain enhanced user productivity -- are on the menu for 2010.";
Link[11] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3860486";

Title[12] = "Microsoft Readies Two Windows Phone Systems?";
Desc[12] = "The rumors continue over the software giant&#39;s mobile plans and the unveiling of Windows Phone 7. \n";
Link[12] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3860326";

Title[13] = "Mozilla Firefox Embraces Agile With Lorentz Plan";
Desc[13] = "A new development model will see Firefox releases coming faster and incorporating both bug-fixes and new features in the same update.";
Link[13] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3860246";

Title[14] = "Apps Coming to Amazon Kindle";
Desc[14] = "By taking a page from Apple&#39;s iPhone, App Store, and possibly, the widely expected Apple tablet, Amazon&#39;s move aims to broaden Kindle&#39;s capabilities for e-book publishers.";
Link[14] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3859991";

Title[15] = "Firefox 3.6 Gets Speedier, New Enhancements";
Desc[15] = "Support for HTML 5, performance improvements, and Personas are just the tip of the iceberg for the open source browser&#39;s new capabilities.";
Link[15] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3859926";

Title[16] = "Selenium Web App Testing Goes Commercial";
Desc[16] = "The open source Web application testing plug-in for Firefox gains a backer and new ties to commercial offerings.";
Link[16] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3859791";

Title[17] = "Firefox Gains &#39;Personas&#39; Engine for Customization";
Desc[17] = "Previously a Firefox add-on, Personas will soon become part of the browser. \n";
Link[17] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3859381";

Title[18] = "Adobe Updates BrowserLab";
Desc[18] = "Adobe&#39;s browser testing tool expands with new browser support and features. But it won&#39;t be free forever.\n";
Link[18] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3858861";

Title[19] = "Visual Studio 2010 Ship Date Pushed Back";
Desc[19] = "The launch date gets delayed a few weeks to address some quality issues.\n";
Link[19] = "http://redir.internet.com/rss/click/www.internetnews.com/dev-news/article.php/3858846";

} // end with block
