var body = "";
var headlines = new Array();
var page = 1;
var pages = 1;
var pagesize = 20;
var total = 20;
page = 1;
pages = 1;
total = 6;
headlines.push({"dateTime":"Jul 26, 2010 08:12 EDT",
"headline":"BRIEF-K12 announces acquisition of KC Distance Learning", "article":"urn:newsml:reuters.com:20100726:nASA00K0Q:5"});
headlines.push({"dateTime":"Jul 26, 2010 08:03 EDT",
"headline":"K12 INC 8-K", "article":"urn:newsml:reuters.com:20100726:nEOL1gdikd:4"});
headlines.push({"dateTime":"Jul 26, 2010 08:00 EDT",
"headline":"K12 Inc. Announces Acquisition of KC Distance Learning, Inc. LRN.N ", "article":"urn:newsml:reuters.com:20100726:nBw265556a:3"});
headlines.push({"dateTime":"Jun 28, 2010 18:03 EDT",
"headline":"K12 Virtual Schools Graduate Over 1,000 Students LRN.N ", "article":"urn:newsml:reuters.com:20100628:nBw285180a:3"});
headlines.push({"dateTime":"Jun 17, 2010 14:19 EDT",
"headline":"K12 Inc. and Lawrence Public Schools Launch New Virtual High School Program in Kansas LRN.N ", "article":"urn:newsml:reuters.com:20100617:nBw176480a:2"});
headlines.push({"dateTime":"Jun 16, 2010 12:41 EDT",
"headline":"60 Chicago Students Graduate from Youth Connection Charter School Virtual High School, Powered by K12: Chicago's First Online Dropout Recovery Program LRN.N ", "article":"urn:newsml:reuters.com:20100616:nPnDC22117: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 + "
";
}