var body = "";
var headlines = new Array();
var page = 1;
var pages = 1;
var pagesize = 20;
var total = 20;
page = 1;
pages = 25;
total = 486;
headlines.push({"dateTime":"Feb 08, 2010 20:30 EST",
"headline":"Prinsiri :Audited Yearly F/S And Consolidated F/S (F45-3) PRIN.BK ", "article":"urn:newsml:reuters.com:20100209:nSET290012:2"});
headlines.push({"dateTime":"Feb 08, 2010 20:29 EST",
"headline":"UPDATE 1-Magnitude 5.7 quake rattles southern Mexico", "article":"urn:newsml:reuters.com:20100209:nN08214716:2"});
headlines.push({"dateTime":"Feb 08, 2010 20:29 EST",
"headline":"UK election race tightens to hung parliament-poll", "article":"urn:newsml:reuters.com:20100209:nLDE61800F:2"});
headlines.push({"dateTime":"Feb 08, 2010 20:29 EST",
"headline":"Multi-National Residence Fund :Report NAV as of 31 January 2010 MNRFu.BK ", "article":"urn:newsml:reuters.com:20100209:nSET290011:2"});
headlines.push({"dateTime":"Feb 08, 2010 20:29 EST",
"headline":"Nikkei hits 2-mth low on euro zone worry; Toyota up", "article":"urn:newsml:reuters.com:20100209:nTOE618019:4"});
headlines.push({"dateTime":"Feb 08, 2010 20:29 EST",
"headline":"RPT-Rising ore import costs to lift domestic prices -China's CIS", "article":"urn:newsml:reuters.com:20100209:nBJB003675:3"});
headlines.push({"dateTime":"Feb 08, 2010 20:28 EST",
"headline":"JAPAN OFFERS 0.6 TRLN YEN IN 30-YEAR JGBS WITH 2.20 PCT COUPON", "article":"urn:newsml:reuters.com:20100209:nMOFBI5004:3"});
headlines.push({"dateTime":"Feb 08, 2010 20:29 EST",
"headline":" Pacific Northern Gas Raises Quarterly Dividend 12 Percent on Strength of 13 Percent Gain in Q4 2009 Earnings Per Share PNG.TO ", "article":"urn:newsml:reuters.com:20100209:nMKW85198a:6"});
headlines.push({"dateTime":"Feb 08, 2010 20:28 EST",
"headline":"Pacific Northern Gas Raises Quarterly Dividend 12 Percent on Strength of 13 Percent Gain in Q4 2009 Earnings Per Share PNG.TO PNG_pa.TO ", "article":"urn:newsml:reuters.com:20100209:nCCN45ksXa:4"});
headlines.push({"dateTime":"Feb 08, 2010 20:28 EST",
"headline":"China First Heavy falls 4 pct in Shanghai debut", "article":"urn:newsml:reuters.com:20100209:nBJD003485:3"});
headlines.push({"dateTime":"Feb 08, 2010 20:28 EST",
"headline":"Natural Park :Rights for shareholder to propose 2010 AGM agenda NPAR.BK ", "article":"urn:newsml:reuters.com:20100209:nSET290010:2"});
headlines.push({"dateTime":"Feb 08, 2010 20:27 EST",
"headline":"Rising ore import costs to lift domestic prices -China's CISA", "article":"urn:newsml:reuters.com:20100209:nnBJB00367:2"});
headlines.push({"dateTime":"Feb 08, 2010 20:26 EST",
"headline":"DIARY-Philippines to Feb 25", "article":"urn:newsml:reuters.com:20100209:nSGE61800T:2"});
headlines.push({"dateTime":"Feb 08, 2010 20:25 EST",
"headline":"Sansiri :Additional details related to Terms & Conditions of SIRI-W1 SIRI.BK ", "article":"urn:newsml:reuters.com:20100209:nSET290009:2"});
headlines.push({"dateTime":"Feb 08, 2010 20:25 EST",
"headline":"BRIEF-Vulcan announces fourth quarter results", "article":"urn:newsml:reuters.com:20100209:nWEN9904:8"});
headlines.push({"dateTime":"Feb 08, 2010 20:25 EST",
"headline":"UPDATE 3-Canada's competition czar targets real estate fees", "article":"urn:newsml:reuters.com:20100209:nN08193018:2"});
headlines.push({"dateTime":"Feb 08, 2010 20:25 EST",
"headline":"PRESS DIGEST - China - Feb 9", "article":"urn:newsml:reuters.com:20100209:nTOE61800Y:2"});
headlines.push({"dateTime":"Feb 08, 2010 20:25 EST",
"headline":"Asia Fuel Oil-S.Korea WP seeks 60,000 T for March", "article":"urn:newsml:reuters.com:20100209:nTOE618010:2"});
headlines.push({"dateTime":"Feb 08, 2010 20:24 EST",
"headline":"Muang Thai Insurance :The Resignation of Member of Audit Committee MTI.BK ", "article":"urn:newsml:reuters.com:20100209:nSET290008:2"});
headlines.push({"dateTime":"Feb 08, 2010 20:23 EST",
"headline":"HK stocks may dip on Wall St; eyes on commodities", "article":"urn:newsml:reuters.com:20100209:nTOE61800W: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 += ""+
"| 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 + "
";
}