
/*
 * -------
 * :ATTRIBUTION NOTICE BEGINS
 *
 * The following JSMsg functions are:
 * 
 *    (C) Copyright 2002 - 2004, 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.0e
*/
/* 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 cp_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 = 15;
 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(15);
    }
    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);
    }
 }

     

}

cp = new cp_JSMsg();

/* how slow is the with statement */

with( cp ) {
/* Meta values
*/
MetaKeys[0] = "MetaTitle";
MetaVals[0] = "Google News";
MetaKeys[1] = "MetaLink";
MetaVals[1] = "http://news.google.com/news?hl=en&amp;num=20&amp;edition=us&amp;ie=ISO-8859-1&amp;sa=G&amp;q=asset+protection+news";
MetaKeys[2] = "MetaLinkTitle";
MetaVals[2] = "<A HREF=\"http://news.google.com/news?hl=en&amp;num=20&amp;edition=us&amp;ie=ISO-8859-1&amp;sa=G&amp;q=asset+protection+news\" CLASS=\"JSMsg\">Google News</A>";
MetaKeys[3] = "MetaUpdateDate";
MetaVals[3] = "20070307010006";
MetaKeys[4] = "MetaDesc";
MetaVals[4] = "Google News search by &lt;a href=\"http://www.geckotribe.com/rss/grouper/\"&gt;Grouper&lt;/a&gt;";


/* content vaues:
*/
Title[0] = "Special Bonus Chapter on Asset Protection Written by Attorney ...";
Desc[0] = "Special Bonus Chapter on ASSET PROTECTION written by Attorney Robert  Kaufer! Todd D. Bramson has a specialty financial planning practice devoting his career ...";
Link[0] = "http://home.businesswire.com/portal/site/google/index.jsp?ndmViewId=news_view&newsId=20070302005239&newsLang=en";

Title[1] = "Part 3: Asset Protection: General/Limited Partnership, Corp ...";
Desc[1] = "Mentions Family Limited Partnership advantages in asset protection &amp; reduction of federal estate  taxes. Notable example of Breach of Fiduciary Duty of ...";
Link[1] = "http://www.businessportal24.com/en/Part_Asset_Protection_General_Limited_139475.html";

Title[2] = "Asset Protection for Surgeons and Physicians";
Desc[2] = "Los Angeles, CA (FV Newswire) - Asset protection for plastic surgeons and other physicians is the topic of the latest article from the asset protection guru ...";
Link[2] = "http://www.financevisor.com/market/news_detail.aspx?rid=54315";

Title[3] = "Part 1: Asset protection with Joint Tenancy, Tenancy in Common ...";
Desc[3] = "Loss of step-up in basis upon the death of the first Tenant; loss of estate tax protection; possible exposure of the assets; Joint Tenancy disinherits all ...";
Link[3] = "http://www.businessportal24.com/en/Part_Asset_Joint_Tenancy_Tenancy_139473.html";

Title[4] = "Asset Protection - Highest Success Rate press release";
Desc[4] = "Asset protection law firm, Boldra, Klueger &amp; Stein, LLP released its asset protection statistics for 2006. The firm represented hundreds of clients seeking ...";
Link[4] = "http://legal-law.press-world.com/v/77204.html";

Title[5] = "Asset Protection for Surgeons and Physicians";
Desc[5] = "Asset protection for plastic surgeons and other physicians is the topic of the latest article from the asset protection guru, attorney Jacob Stein. ...";
Link[5] = "http://www.emediawire.com/releases/2007/2/emw506265.htm";

Title[6] = "Senior Protection Officers";
Desc[6] = "Command of Arabic, French, Spanish or Russian would be an asset. Selected candidates will be offered a 12-month contract with competitive compensation and ...";
Link[6] = "http://www.alertnet.org/thepeople/jobs/117317424212.htm";

Title[7] = "BAE Systems displays deployable surveillance unit for border and ...";
Desc[7] = "At IDEX, the DSU will be operating as a stand alone C2 and sensor system demonstrating the protection of a high value asset.  Sensors will include the ...";
Link[7] = "http://www.ameinfo.com/110995.html";

Title[8] = "Lenovo Embeds Support for Computrace in New 3000 Notebook Series";
Desc[8] = "For more information on Absolute Software and its range of Computer Theft Recovery, Data Protection and Secure Asset  Tracking(TM) solutions, please visit ...";
Link[8] = "http://panasonic.broadcastnewsroom.com/articles/viewarticle.jsp?id=111255";

Title[9] = "Corporate owners hide assets, identities";
Desc[9] = "A USA TODAY computer-aided review shows that the two men and their business, Asset Protection Group, are part of a thriving mini-industry that has ...";
Link[9] = "http://www.kare11.com/money/business_article.aspx?storyid=245239";

Title[10] = "United States: Fashion Law: Why (And How) You Should Copyright ...";
Desc[10] = "Because clothing is considered &quot;inherently functional,&quot; it cannot be given protection, no matter how nonfunctional you may feel four-inch stilettos to be. ...Fashion Law: Why (And How) You Should Copyright Your Work Mondaq News Alerts (subcription)all 2 news articles&nbsp;&raquo;";
Link[10] = "http://www.mondaq.com/article.asp?articleid=46698&searchresults=1";

Title[11] = "Man sentenced for defrauding security guard firm";
Desc[11] = "Between September 2001 and June  2004, Jones was payroll supervisor at Capital Asset Protection of Neville Island and submitted false and fraudulent ...";
Link[11] = "http://www.pennlive.com/newsflash/pa/index.ssf?/base/news-47/1172880575162410.xml&storylist=penn";

Title[12] = "Lenovo Embeds Support for Computrace in New 3000 Notebook Series";
Desc[12] = "... the leading provider of firmware-based, patented Computer Theft Recovery, Data Protection and Secure Asset  Tracking(TM) solutions, announces that all ...";
Link[12] = "http://www.earthtimes.org/articles/show/news_press_release,70031.shtml";

Title[13] = "Southpac Announces Second Annual Offshore Planning Institute at ...";
Desc[13] = "The Institute will feature several of the nation&#39;s preeminent asset protection attorneys addressing asset  protection trusts, offshore business planning, ...";
Link[13] = "http://www.emediawire.com/releases/2007/2/emw507340.htm";

Title[14] = "Perpetual gears up retail investors";
Desc[14] = "... to a range of 14 growth oriented managed funds across a range of asset classes with exposure to investment upside but protection on the down side. ...Perpetual launches structured product Money Managementall 2 news articles&nbsp;&raquo;";
Link[14] = "http://www.financialstandard.com.au/index.php?id=9558";

} // end with block
