// the array global_article is used to allow multiple categories
var global_article = new Array()
var global_article_counter = 0
var article = null
var early_exit = 0
function news(url,headline_text,news, dateTemp)
{
this.url = url
this.headline_text = headline_text
this.news = news
this.dateTemp = dateTemp
}
article = new Array(
new news("http://www.paktribune.com/news/index.php?id=230094","Khyber-Pakhtunkhwa floods toll reaches 408 ...","", "2010-07-31"), new news("http://www.paktribune.com/news/index.php?id=230098","95 victims of plane crash identified, Malik tells Senate ...","", "2010-07-31"), new news("http://www.paktribune.com/news/index.php?id=230103","Cameron’s remarks: ISI team cancels visit to UK ...","", "2010-07-31")
);
// load global_article array with articles from cluster
if (article != null)
{
for (var article_counter = 0; article_counter < article.length; article_counter++)
{
global_article[global_article_counter] = article[article_counter]
global_article[global_article_counter].url += "' TARGET='_blank"
global_article_counter++
}
}
else
{
if (early_exit == 0)
{
document.writeln("
Please reload this page to view the headlines")
early_exit = 1
}
}
if (early_exit == 0)
{
//Variable
var width = "200"
var bgcolor = "#FFFFFF"
var fgcolor = "#00266D"
var numberofarticles = article.length
var item_spacing = "5"
var cell_spacing = "0"
var cell_padding = "1"
var headingBgColor = "#ffffff"
var headingFont = "Verdana,Arial"
var headingFontSize = "1"
var headingFgColor = "#00266D"
var newsFont = "Verdana, Arial,Helvetica, sans-serif"
var newsFontSize = "1"
var newsFgColor = "#00266D"
var newsBgColor = "#FFFFFF"
// Print out the table containing the headlines
document.writeln("")
// document.writeln(" |
")
document.writeln("")
document.writeln("PAKISTAN NEWS TOP STORIES July 31, 2010 | ")
// Start loop for articles
for (var counter=0; counter < numberofarticles; counter++)
{
// Print out the headline
document.writeln("")
document.writeln(" ")
document.writeln(" | ")
document.writeln(""+global_article[counter].headline_text+"")
// document.writeln("("+ global_article[counter].dateTemp + ") ")
document.writeln(" ");
// Print out the news
if (global_article[counter].news.length > 0) {
document.writeln(" | | ")
document.writeln(""+global_article[counter].news+" ")
document.writeln(" | ")
} else {
document.writeln("| ")
document.writeln(" | ")
}
document.writeln(" | ")
} // End of article loop
document.writeln("| powered by PakTribune.com | ")
document.writeln(" |
"); }