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

this.Title = Array([this.ShortListSize]);
this.Desc = Array([this.ShortListSize]);
this.Link = Array([this.ShortListSize]);
this.DateN = Array([this.ShortListSize]);

this.MetaKeys = Array([6]);
this.MetaVals = Array([6]);



 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 DayN Day2N MonthN Month2N Year2N Year4N YearN Year Time Hour2N Minute2N ") ) {
         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);
    }
 }

     

}

np = new np_JSMsg();

/* how slow is the with statement */

with( np ) {
/* Meta values
*/
MetaKeys[0] = "MetaCopyright";
MetaVals[0] = "Copyright: (C) British Broadcasting Corporation, see http://news.bbc.co.uk/2/hi/help/rss/4498287.stm for terms and conditions of reuse.";
MetaKeys[1] = "MetaTitle";
MetaVals[1] = "BBC News - Politics";
MetaKeys[2] = "MetaLink";
MetaVals[2] = "http://www.bbc.co.uk/go/rss/int/news/-/news/politics/";
MetaKeys[3] = "MetaLinkTitle";
MetaVals[3] = "<A HREF=\"http://www.bbc.co.uk/go/rss/int/news/-/news/politics/\" CLASS=\"JSMsg\">BBC News - Politics</A>";
MetaKeys[4] = "MetaUpdateDate";
MetaVals[4] = "20120202172524";
MetaKeys[5] = "MetaDesc";
MetaVals[5] = "The latest stories from the Politics section of the BBC News web site.";


/* content vaues:
*/
Title[0] = "CPS to announce Huhne decision";
Desc[0] = "The Crown Prosecution Service will announce on Friday whether it will press charges against Chris Huhne over claims his former wife accepted penalty points on his behalf.";
Link[0] = "http://www.bbc.co.uk/go/rss/int/news/-/news/uk-politics-16859101";
DateN[0] = "20120202162502";

Title[1] = "Loans boss \'to pay tax at source\'";
Desc[1] = "The head of the Student Loans Company will have tax and National Insurance payments deducted from his £182,000 pay package in future, ministers say.";
Link[1] = "http://www.bbc.co.uk/go/rss/int/news/-/news/uk-politics-16854187";
DateN[1] = "20120202172502";

Title[2] = "David Miliband urges Labour plan";
Desc[2] = "Labour will not regain power until it \"fully understands\" why it lost support and \"clarifies the kind of future\" it wants to see, David Miliband says.";
Link[2] = "http://www.bbc.co.uk/go/rss/int/news/-/news/uk-politics-16846596";
DateN[2] = "20120202163916";

Title[3] = "Immigrants \'must benefit Britain\'";
Desc[3] = "The UK does not need more \"middle managers\" or unskilled Labour and only the \"brightest and best\" will be welcome to settle, a minister says.";
Link[3] = "http://www.bbc.co.uk/go/rss/int/news/-/news/uk-politics-16850563";
DateN[3] = "20120202123121";

Title[4] = "Watchdog warns over cost cutting";
Desc[4] = "Government departments hit their own cost-cutting targets over the past year but will find it much harder to do so in the future, the spending watchdog says.";
Link[4] = "http://www.bbc.co.uk/go/rss/int/news/-/news/uk-politics-16839214";
DateN[4] = "20120202091534";

Title[5] = "MPs\' bar removes \'Top Totty\' beer";
Desc[5] = "A beer named Top Totty and advertised with a picture of a scantily-clad woman is withdrawn from a Palace of Westminster bar after a Labour MP complained.";
Link[5] = "http://www.bbc.co.uk/go/rss/int/news/-/news/uk-politics-16856309";
DateN[5] = "20120202162739";

Title[6] = "Sports shirts may feature EU flag";
Desc[6] = "The European Parliament votes after a heated debate to back a call for national sports teams to wear the EU flag on their shirts.";
Link[6] = "http://www.bbc.co.uk/go/rss/int/news/-/news/world-europe-16854969";
DateN[6] = "20120202164934";

Title[7] = "Euro MPs reject new food labels";
Desc[7] = "Euro MPs block changes to food labels that would have allowed claims such as \"now contains 15% less sugar\".";
Link[7] = "http://www.bbc.co.uk/go/rss/int/news/-/news/world-europe-16856658";
DateN[7] = "20120202171020";

Title[8] = "UK reveals Afghan withdrawal plan";
Desc[8] = "Afghan forces will take over lead security responsibility in all parts of Afghanistan by the end of next year, Downing Street says.";
Link[8] = "http://www.bbc.co.uk/go/rss/int/news/-/news/uk-16853565";
DateN[8] = "20120202140100";

Title[9] = "Keep calm and log on, MPs argue";
Desc[9] = "The government should not \"scare people\" about the dangers of cybercrime but do more to make people aware of how they can protect themselves online, a group MPs says.";
Link[9] = "http://www.bbc.co.uk/go/rss/int/news/-/news/uk-politics-16839217";
DateN[9] = "20120202011210";

Title[10] = "MPs reverse Lords welfare defeats";
Desc[10] = "MPs overturn a series of defeats inflicted on the government\'s welfare reform bill by peers, voting to reinstate child benefit into the proposed £26,000 total cap on payments.";
Link[10] = "http://www.bbc.co.uk/go/rss/int/news/-/news/uk-politics-16825646";
DateN[10] = "20120201223855";

Title[11] = "UK\'s foreign minister in Somalia";
Desc[11] = "William Hague calls for renewed pressure against Islamist militants, as he becomes the first British foreign secretary to visit Somalia for 20 years.";
Link[11] = "http://www.bbc.co.uk/go/rss/int/news/-/news/world-africa-16851216";
DateN[11] = "20120202121008";

Title[12] = "Government offers NHS concessions";
Desc[12] = "The government promises the health secretary will keep ultimate control over the NHS in England, as it pushes for Parliament to pass the NHS bill.";
Link[12] = "http://www.bbc.co.uk/go/rss/int/news/-/news/uk-politics-16811056";
DateN[12] = "20120201224029";

Title[13] = "MP arrested after assault claim";
Desc[13] = "A West Yorkshire MP is arrested in connection with an alleged assault at a service station.";
Link[13] = "http://www.bbc.co.uk/go/rss/int/news/-/news/uk-england-leeds-16849540";
DateN[13] = "20120202104201";

Title[14] = "VIDEO: House of Commons";
Desc[14] = "MPs are taking part in an adjournment debate on carers\' access to online banking.";
Link[14] = "http://news.bbc.co.uk/go/rss/int/news/-/democracylive/hi/house_of_commons/newsid_9434000/9434799.stm";
DateN[14] = "20110324115418";

Title[15] = "Talks on police station closures";
Desc[15] = "The first in a series of public meetings to discuss the proposed closure of police stations in west Tyrone and Fermanagh is due to take place on Thursday.";
Link[15] = "http://www.bbc.co.uk/go/rss/int/news/-/news/uk-northern-ireland-16844081";
DateN[15] = "20120202060924";

Title[16] = "Introduction";
Desc[16] = "A tour of the Northern Ireland Assembly at Stormont.";
Link[16] = "http://news.bbc.co.uk/go/rss/int/news/-/democracylive/hi/guides/newsid_8107000/8107911.stm";
DateN[16] = "20100720151041";

Title[17] = "Judges reject tobacco firm case";
Desc[17] = "Appeal judges have rejected a bid by a major tobacco firm to challenge Scottish government plans to ban the open display of cigarettes.";
Link[17] = "http://www.bbc.co.uk/go/rss/int/news/-/news/uk-scotland-scotland-politics-16853251";
DateN[17] = "20120202124057";

Title[18] = "Introduction";
Desc[18] = "BBC Democracy Live takes you on a tour of the Scottish Parliament.";
Link[18] = "http://news.bbc.co.uk/go/rss/int/news/-/democracylive/hi/guides/newsid_8136000/8136663.stm";
DateN[18] = "20091028170031";

Title[19] = "Bullying claims at race charity";
Desc[19] = "Staff at Wales\' foremost race equality charity speak out about alleged bullying and harassment.";
Link[19] = "http://www.bbc.co.uk/go/rss/int/news/-/news/uk-wales-16856975";
DateN[19] = "20120202170808";

} // end with block

