var body = ""; var headlines = new Array(); var page = 1; var pages = 1; var pagesize = 20; var total = 20; page = 1; pages = 14; total = 265; headlines.push({"dateTime":"Jul 29, 2010 16:39 EDT", "headline":"UPDATE 1-Ingram Micro beats Q2 estimates", "article":"urn:newsml:reuters.com:20100729:nN2994489:10"}); headlines.push({"dateTime":"Jul 29, 2010 16:25 EDT", "headline":"BRIEF-Sunoco provides operational update", "article":"urn:newsml:reuters.com:20100729:nWNAB1315:4"}); headlines.push({"dateTime":"Jul 29, 2010 16:14 EDT", "headline":"BRIEF-Sunoco reports Q2 results", "article":"urn:newsml:reuters.com:20100729:nASA00L0L:10"}); headlines.push({"dateTime":"Jul 29, 2010 15:45 EDT", "headline":"NYSE ORDER IMBALANCE IBM.N 1188700 SHARES ON SELL SIDE", "article":"urn:newsml:reuters.com:20100729:nHND1961:2"}); headlines.push({"dateTime":"Jul 29, 2010 10:14 EDT", "headline":"IBM and Carnegie Mellon University to Create Smarter Infrastructure Lab IBM.N ", "article":"urn:newsml:reuters.com:20100729:nPnNY42878:2"}); headlines.push({"dateTime":"Jul 29, 2010 09:08 EDT", "headline":"BRIEF-IBM acquires storage company Storwize", "article":"urn:newsml:reuters.com:20100729:nASA00KWN:5"}); headlines.push({"dateTime":"Jul 29, 2010 09:00 EDT", "headline":"IBM Acquires Storage Company Storwize for Data Compression Capabilities IBM.N ", "article":"urn:newsml:reuters.com:20100729:nPnNY42825:2"}); headlines.push({"dateTime":"Jul 29, 2010 08:00 EDT", "headline":"IBM Opens the First Multipurpose Cloud Computing Center in Poland IBM.N ", "article":"urn:newsml:reuters.com:20100729:nPnNY41721:2"}); headlines.push({"dateTime":"Jul 29, 2010 06:53 EDT", "headline":"Europe headed for more decentralised power - study", "article":"urn:newsml:reuters.com:20100729:nLDE66S0O4:2"}); headlines.push({"dateTime":"Jul 29, 2010 06:42 EDT", "headline":"WRAPUP 1-French tech firms up targets; global picture mixed", "article":"urn:newsml:reuters.com:20100729:nLDE66S0CK:4"}); headlines.push({"dateTime":"Jul 29, 2010 01:39 EDT", "headline":"UPDATE 1-Dassault Systemes ups 2010 guidance on weak euro", "article":"urn:newsml:reuters.com:20100729:nLDE66R2IK:2"}); headlines.push({"dateTime":"Jul 28, 2010 15:47 EDT", "headline":"IBM, Honeywell tie up on energy efficient buildings", "article":"urn:newsml:reuters.com:20100728:nN28187661:3"}); headlines.push({"dateTime":"Jul 28, 2010 21:59 EDT", "headline":"IBM and Tridium, Inc. to Develop New Systems for Energy-Efficient Buildings IBM.N ", "article":"urn:newsml:reuters.com:20100728:nPnNY42241:3"}); headlines.push({"dateTime":"Jul 28, 2010 12:41 EDT", "headline":"DEALTALK-Tech giants set sights on Canadian mobile software cos", "article":"urn:newsml:reuters.com:20100728:nSGE66I0J6:6"}); headlines.push({"dateTime":"Jul 28, 2010 11:17 EDT", "headline":"IBM and UPMC Partner to Make 'Smart' Patient Room Even Smarter IBM.N ", "article":"urn:newsml:reuters.com:20100728:nPnNY41990:2"}); headlines.push({"dateTime":"Jul 28, 2010 11:00 EDT", "headline":"INTERVIEW-Languages, alliances key to IBM Egypt BPO offering", "article":"urn:newsml:reuters.com:20100728:nLDE66R0MS:2"}); headlines.push({"dateTime":"Jul 28, 2010 02:26 EDT", "headline":"REG-IBM: Doc re Form 10-Q IBM.N ", "article":"urn:newsml:reuters.com:20100728:nPRrSF9C8a:2"}); headlines.push({"dateTime":"Jul 27, 2010 16:00 EDT", "headline":"NYSE ORDER IMBALANCE IBM.N 70900 SHARES ON SELL SIDE", "article":"urn:newsml:reuters.com:20100727:nHND1592:2"}); headlines.push({"dateTime":"Jul 27, 2010 10:43 EDT", "headline":"REG-Intnl Bus. Mach IBM Board Approves Regular Quarterly Cash Dividend IBM.N ", "article":"urn:newsml:reuters.com:20100727:nBw276435a:2"}); headlines.push({"dateTime":"Jul 27, 2010 10:54 EDT", "headline":"IBM Board Approves Regular Quarterly Cash Dividend IBM.N ", "article":"urn:newsml:reuters.com:20100727:nBw276419a:2"}); $(document).ready(function(){ var out = ""; if(body != null && body.length > 0){ out += body; } var white = true; if(headlines.length > 0){ if(white) color = "ffffff"; else color = "eeeeee"; white = !white; out += getPagination() + ""+ ""+ "
"+ ""; out += ""+ ""+ ""+ ""; for(var i = 0; i < headlines.length; i++){ out += ""+ ""+ ""; var headline = headlines[i]; out += ""+ ""+ ""; } out += "
 Time News Story
 "+headlines[i].dateTime+""+ ""+headlines[i].headline+""; out += "
"; } $('div#news').html(out); }); function getPagination(){ var ret = "
"; for(var i = 1; i < (pages + 1); i++){ var left = (i - 1) * pagesize; var right = left + pagesize; if(right > total) right = total; var label = "["+left+"-"+right+"]"; if(i == page){ ret += ""+label+""; }else{ ret += ""+label+""; } } return ret + "
"; }