var body = "";
var headlines = new Array();
var page = 1;
var pages = 1;
var pagesize = 20;
var total = 20;
page = 1;
pages = 12;
total = 235;
headlines.push({"dateTime":"Jul 29, 2010 18:45 EDT",
"headline":"Microsoft shows off new Windows smartphones", "article":"urn:newsml:reuters.com:20100729:nN29243449:8"});
headlines.push({"dateTime":"Jul 29, 2010 18:25 EDT",
"headline":"UPDATE 3-Clearwire, Best Buy in wireless partnership", "article":"urn:newsml:reuters.com:20100729:nN29221695:5"});
headlines.push({"dateTime":"Jul 29, 2010 10:47 EDT",
"headline":"RPT-Infineon, Intel in talks on wireless sale-sources", "article":"urn:newsml:reuters.com:20100729:nLDE66S1XZ:2"});
headlines.push({"dateTime":"Jul 29, 2010 10:42 EDT",
"headline":"Infineon, Intel in talks on wireless sale-sources", "article":"urn:newsml:reuters.com:20100729:nWEA2054:5"});
headlines.push({"dateTime":"Jul 29, 2010 10:40 EDT",
"headline":"Entropic shares jump on strong Q2 results, Q3 rev view", "article":"urn:newsml:reuters.com:20100729:nSGE66S0M0:2"});
headlines.push({"dateTime":"Jul 28, 2010 18:21 EDT",
"headline":"UPDATE 2-Lam Research Q4 results, Q1 view beat; shares up", "article":"urn:newsml:reuters.com:20100728:nSGE66R0ML:2"});
headlines.push({"dateTime":"Jul 28, 2010 17:36 EDT",
"headline":"UPDATE 1-LogMeIn says Intel may end services deal; shares fall", "article":"urn:newsml:reuters.com:20100728:nSGE66R0MH:2"});
headlines.push({"dateTime":"Jul 28, 2010 17:03 EDT",
"headline":"UPDATE 5-Sprint customer growth beats Street", "article":"urn:newsml:reuters.com:20100728:nN28190638:4"});
headlines.push({"dateTime":"Jul 28, 2010 06:38 EDT",
"headline":"UPDATE 2-Infineon Q3 beats estimates, raises outlook again", "article":"urn:newsml:reuters.com:20100728:nLDE66Q1HP:2"});
headlines.push({"dateTime":"Jul 27, 2010 22:57 EDT",
"headline":"Asian Forum on CSR 2010 Moves to Kuala Lumpur 4335.HK INTC.O ", "article":"urn:newsml:reuters.com:20100728:nACN4431a:2"});
headlines.push({"dateTime":"Jul 27, 2010 19:49 EDT",
"headline":"UPDATE 1-Galleon's Rajaratnam urges judge to scrap wiretaps", "article":"urn:newsml:reuters.com:20100727:nN27124780:2"});
headlines.push({"dateTime":"Jul 27, 2010 17:58 EDT",
"headline":"Galleon's Rajaratnam urges judge to scrap wiretaps", "article":"urn:newsml:reuters.com:20100727:nN27107069:2"});
headlines.push({"dateTime":"Jul 28, 2010 00:51 EDT",
"headline":"Intel Milestone Confirms Light Beams Can Replace Electronic Signals for Future Computers INTC.O ", "article":"urn:newsml:reuters.com:20100727:nBw275721a:4"});
headlines.push({"dateTime":"Jul 27, 2010 20:33 EDT",
"headline":"Volterra's in-line Q2 rev, Q3 outlook disappoint investors", "article":"urn:newsml:reuters.com:20100727:nSGE66Q0L8:3"});
headlines.push({"dateTime":"Jul 27, 2010 11:50 EDT",
"headline":"UPDATE 1-Apple refreshes Mac desktops", "article":"urn:newsml:reuters.com:20100727:nN27273623:2"});
headlines.push({"dateTime":"Jul 26, 2010 17:13 EDT",
"headline":"FACTBOX-Biggest changes in Nasdaq short interest", "article":"urn:newsml:reuters.com:20100726:nN2645992:2"});
headlines.push({"dateTime":"Jul 26, 2010 16:35 EDT",
"headline":"BRIEF-AMD announces pricing of private offering of $500 mln of senior notes", "article":"urn:newsml:reuters.com:20100726:nASA00K4L:5"});
headlines.push({"dateTime":"Jul 23, 2010 14:32 EDT",
"headline":"TAKE A LOOK-TECH-EARNS-Verizon profit margins up, Ericsson lags", "article":"urn:newsml:reuters.com:20100723:nN15272312:8"});
headlines.push({"dateTime":"Jul 25, 2010 07:30 EDT",
"headline":"Condoms, car parts, oilfields spice up UK M&A", "article":"urn:newsml:reuters.com:20100723:nLDE66M1JA:5"});
headlines.push({"dateTime":"Jul 25, 2010 00:31 EDT",
"headline":"UPDATE 1-Judge OKs Intel antitrust accord with shareholders", "article":"urn:newsml:reuters.com:20100723:nN23271282:5"});
$(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 + "
";
}