var body = "";
var headlines = new Array();
var page = 1;
var pages = 1;
var pagesize = 20;
var total = 20;
page = 1;
pages = 20;
total = 388;
headlines.push({"dateTime":"Nov 20, 2009 12:16 EST",
"headline":"STOCKS NEWS US-BMO starts semi sector at "market perform"", "article":"urn:newsml:reuters.com:20091120:nN20233755:2"});
headlines.push({"dateTime":"Nov 20, 2009 11:57 EST",
"headline":"UPDATE 1-BMO starts US semiconductor sector with market perform", "article":"urn:newsml:reuters.com:20091120:nBNG520191:2"});
headlines.push({"dateTime":"Nov 20, 2009 10:59 EST",
"headline":"Chinese Developer of Biodegradable Bone Screw Technology Wins Silicon Valley Entrepreneurial Award INTC.O ", "article":"urn:newsml:reuters.com:20091120:nBw205170a:2"});
headlines.push({"dateTime":"Nov 20, 2009 10:59 EST",
"headline":"Mass Animation's Ground-Breaking 'Live Music' Animated Short Film Released Today with TriStar Pictures' 'Planet 51' INTC.O ", "article":"urn:newsml:reuters.com:20091120:nBw205067a:3"});
headlines.push({"dateTime":"Nov 20, 2009 09:59 EST",
"headline":"NI Technology Updates Outlooks for OmniVision Technologies, Intel, ARM Holdings, Qualcomm and Apple", "article":"urn:newsml:reuters.com:20091120:nPnPH15151:2"});
headlines.push({"dateTime":"Nov 20, 2009 09:04 EST",
"headline":"BRIEF-RESEARCH ALERT-BMO starts U.S. semiconductor sector with market perform rating", "article":"urn:newsml:reuters.com:20091120:nWNAB8528:8"});
headlines.push({"dateTime":"Nov 19, 2009 18:01 EST",
"headline":"BRIEF-North American Oct chip-gear orders rise 3.2 pct - SEMI", "article":"urn:newsml:reuters.com:20091119:nWNAB8302:4"});
headlines.push({"dateTime":"Nov 19, 2009 17:17 EST",
"headline":"US STOCKS-Wall St drops on recovery concerns, tech rout", "article":"urn:newsml:reuters.com:20091119:nN19132735:4"});
headlines.push({"dateTime":"Nov 19, 2009 16:44 EST",
"headline":"U.S. will not oppose unsealing Khan insider record", "article":"urn:newsml:reuters.com:20091119:nN19189479:4"});
headlines.push({"dateTime":"Nov 19, 2009 16:32 EST",
"headline":"US STOCKS-Wall St sinks on tech and recovery concerns", "article":"urn:newsml:reuters.com:20091119:nN19192057:4"});
headlines.push({"dateTime":"Nov 19, 2009 15:29 EST",
"headline":"US RESEARCH SUMMARY-S&P 500 Nov 19 2030 GMT", "article":"urn:newsml:reuters.com:20091119:nBNG491758:2"});
headlines.push({"dateTime":"Nov 20, 2009 05:54 EST",
"headline":"GLOBAL MARKETS-Year-end risk aversion hits stocks; dollar gains", "article":"urn:newsml:reuters.com:20091119:nN19175197:9"});
headlines.push({"dateTime":"Nov 20, 2009 05:57 EST",
"headline":"WRAPUP 3-Chip stocks fall on downgrade, CEOs talk recovery", "article":"urn:newsml:reuters.com:20091119:nN19176310:4"});
headlines.push({"dateTime":"Nov 20, 2009 06:17 EST",
"headline":"US STOCKS-Wall St drops as recovery fears curb risk appetite", "article":"urn:newsml:reuters.com:20091119:nN19185404:5"});
headlines.push({"dateTime":"Nov 20, 2009 06:19 EST",
"headline":"HEADLINE STOCKS-Some U.S. stocks on the move on Nov. 19", "article":"urn:newsml:reuters.com:20091119:nN19185322:7"});
headlines.push({"dateTime":"Nov 19, 2009 12:10 EST",
"headline":"US STOCKS-Tech, commods lead Wall Street's broad decline", "article":"urn:newsml:reuters.com:20091119:nN19175812:4"});
headlines.push({"dateTime":"Nov 20, 2009 00:57 EST",
"headline":"UPDATE 4-Chip stocks fall on BofA Merrill downgrades", "article":"urn:newsml:reuters.com:20091119:nBNG431820:7"});
headlines.push({"dateTime":"Nov 20, 2009 00:56 EST",
"headline":"HEADLINE STOCKS-Some U.S. stocks on the move on Nov. 19", "article":"urn:newsml:reuters.com:20091119:nN19166606:7"});
headlines.push({"dateTime":"Nov 19, 2009 21:14 EST",
"headline":"US STOCKS-Markets sink on bearish semi note, health insurers", "article":"urn:newsml:reuters.com:20091119:nN19167033:3"});
headlines.push({"dateTime":"Nov 19, 2009 09:22 EST",
"headline":"US STOCKS-Stocks point to lower open on bearish semis note", "article":"urn:newsml:reuters.com:20091119:nN19378890: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 + "
";
}