function searchDb(content,side)
{
var DELIMITER = '|';
var out2 = '';
var printTop = '';
var printBottom = '';
var Connect = '';
for (var count = 0; count < headlines.length; count++)
{
var endHeadline = headlines[count].indexOf(DELIMITER);
var endArticleID = headlines[count].indexOf(DELIMITER, endHeadline + 1);
var endSource = headlines[count].indexOf(DELIMITER, endArticleID + 1);
var printHeadline = headlines[count].substring(0, endHeadline);
var printArticleID = headlines[count].substring(endHeadline + 1, endArticleID);
var printSource = headlines[count].substring(endArticleID + 1, endSource);
var printByline = headlines[count].substring(endSource + 1);
if (content == 'source') {
var printSource = headlines[count].substring(endArticleID + 1, endSource);
var printByline = '';
}
if (content == 'source') {
var printSource = headlines[count].substring(endArticleID + 1, endSource);
var printByline = '';
}
else if (content == 'byline') {
var printSource = '';
var printByline = headlines[count].substring(endSource + 1);
}
else {
var printSource = headlines[count].substring(endArticleID + 1, endSource);
var printByline = '';
}
if (side == 'main') {
out2 += ''+ printHeadline +' '+printSource+' '+printByline+'
';
}
else {
out2 += ' '+ printHeadline +' '+ printSource+' '+printByline+'
';
}
}
document.writeln(out2);
}
var headlines = new Array();
headlines[0 ]="Influence, and Irony, for Sale|http://www.washingtonpost.com/wp-dyn/articles/A10697-2005Apr22.html|(Post, April 24, 2005)|(By Michael Kinsley, Page B07 )";
headlines[1 ]="A Shifting Focus on Terrorism|http://www.washingtonpost.com/wp-dyn/articles/A10695-2005Apr22.html|(Post, April 24, 2005)|(By Jim Hoagland, Page B07 )";
headlines[2 ]="Unread and Unsubscribing|http://www.washingtonpost.com/wp-dyn/articles/A10698-2005Apr22.html|(Post, April 24, 2005)|(By George F. Will, Page B07 )";
headlines[3 ]="A Judicious Compromise: Democrats Should Take the First Step to End the Filibuster Fracas|http://www.washingtonpost.com/wp-dyn/articles/A10692-2005Apr22.html|(Post, April 24, 2005)|(By David S. Broder, Page B07 )";
headlines[4 ]="Blunt but Effective|http://www.washingtonpost.com/wp-dyn/articles/A10694-2005Apr22.html|(Post, April 24, 2005)|(By Lawrence S. Eagleburger, Page B07 )";