var body = "";
var headlines = new Array();
var page = 1;
var pages = 1;
var pagesize = 20;
var total = 20;
page = 1;
pages = 4;
total = 64;
headlines.push({"dateTime":"Jul 23, 2010 16:57 EDT",
"headline":"UPDATE 4-Magna shareholders OK $1 billion Stronach deal", "article":"urn:newsml:reuters.com:20100723:nN23121319:2"});
headlines.push({"dateTime":"Jul 23, 2010 15:19 EDT",
"headline":"CANADA STOCKS-TSX bounces back up on commodities, earnings", "article":"urn:newsml:reuters.com:20100723:nN23164913:3"});
headlines.push({"dateTime":"Jul 25, 2010 02:52 EDT",
"headline":"BRIEF-Magna International shareholders OK proposal to eliminate dual class share structure", "article":"urn:newsml:reuters.com:20100723:nWNAB8850:11"});
headlines.push({"dateTime":"Jul 23, 2010 06:04 EDT",
"headline":"PRESS DIGEST - Canada - July 23", "article":"urn:newsml:reuters.com:20100723:nSGE66M0E3:2"});
headlines.push({"dateTime":"Jul 21, 2010 08:55 EDT",
"headline":"BRIEF-CPP Investment to continue to oppose Magna transaction", "article":"urn:newsml:reuters.com:20100721:nWNAB7654:5"});
headlines.push({"dateTime":"Jul 20, 2010 06:05 EDT",
"headline":"PRESS DIGEST - Canada - July 20", "article":"urn:newsml:reuters.com:20100720:nSGE66J0DK:2"});
headlines.push({"dateTime":"Jul 19, 2010 20:08 EDT",
"headline":"UPDATE 3-Onex, CPPIB eye $4.5 bln bid for Britain's Tomkins", "article":"urn:newsml:reuters.com:20100719:nLDE66I06K:5"});
headlines.push({"dateTime":"Jul 13, 2010 19:38 EDT",
"headline":"UPDATE 1-Ontario Teachers' to vote against Magna plan", "article":"urn:newsml:reuters.com:20100713:nN13251377:3"});
headlines.push({"dateTime":"Jul 13, 2010 11:22 EDT",
"headline":"BRIEF-Ontario Teachers' Pension Plan comments on Magna's proposed share plan", "article":"urn:newsml:reuters.com:20100713:nWNAB5210:4"});
headlines.push({"dateTime":"Jul 09, 2010 16:16 EDT",
"headline":"Mega Uranium Ltd. Announces Departure of CFO MGA.TO ", "article":"urn:newsml:reuters.com:20100709:nCCNlP8H0a:2"});
headlines.push({"dateTime":"Jul 09, 2010 15:31 EDT",
"headline":"BRIEF-Mega Uranium says CFO Larry Goldberg resigns", "article":"urn:newsml:reuters.com:20100709:nWNAB4528:4"});
headlines.push({"dateTime":"Jul 09, 2010 15:30 EDT",
"headline":" Mega Uranium Ltd. Announces Departure of CFO MGA.TO ", "article":"urn:newsml:reuters.com:20100709:nMKW39570a:2"});
headlines.push({"dateTime":"Jul 09, 2010 15:30 EDT",
"headline":"Mega Uranium Ltd. Announces Departure of CFO MGA.TO ", "article":"urn:newsml:reuters.com:20100709:nCCN182ZTa:2"});
headlines.push({"dateTime":"Jul 09, 2010 12:59 EDT",
"headline":"UPDATE 1-Magna reschedules vote on Stronach deal to July 23", "article":"urn:newsml:reuters.com:20100709:nN0998802:4"});
headlines.push({"dateTime":"Jul 10, 2010 17:51 EDT",
"headline":"Magna vote on Stronach deal to go ahead on July 23", "article":"urn:newsml:reuters.com:20100709:nN09265027:3"});
headlines.push({"dateTime":"Jul 10, 2010 09:50 EDT",
"headline":"BRIEF-Magna International to hold shareholder vote on July 23", "article":"urn:newsml:reuters.com:20100709:nWNAB4408:4"});
headlines.push({"dateTime":"Jul 06, 2010 06:03 EDT",
"headline":"BRIEF-RESEARCH ALERT-Goldman cuts targets on Ford, others", "article":"urn:newsml:reuters.com:20100706:nWNAB3169:14"});
headlines.push({"dateTime":"Jul 05, 2010 19:20 EDT",
"headline":"UPDATE 2-Spyker avoids more debt in final Saab payment", "article":"urn:newsml:reuters.com:20100705:nLDE66403U:3"});
headlines.push({"dateTime":"Jul 02, 2010 13:39 EDT",
"headline":"IPO VIEW-GM is high-stakes bet for fund managers", "article":"urn:newsml:reuters.com:20100702:nN02221166:4"});
headlines.push({"dateTime":"Jun 29, 2010 00:32 EDT",
"headline":"BRIEF-RESEARCH ALERT-Thomas Weisel cuts price target on Bannerman Resources, 5 others", "article":"urn:newsml:reuters.com:20100629:nWNAB1604:8"});
$(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 += ""+
"| Time | "+
" | "+
"News Story | ";
for(var i = 0; i < headlines.length; i++){
out += " | "+
" | "+
"";
var headline = headlines[i];
out += "| "+headlines[i].dateTime+" | "+
" | "+
""+
""+headlines[i].headline+"";
out += " | ";
}
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 + "
";
}