﻿function newsArray() {
 for (i=0; i<newsArray.arguments.length; i++) {
  this[i] = new Object();
  this[i].href = newsArray.arguments[i];
 }
 this.length = i;
}

function getnewsNum() { 	
 dat = new Date();
 dat = (dat.getTime()+"").charAt(8);
 if (dat.length == 1)
  news_num = dat%news.length;
 else
  news_num = 0;
 return news_num;
}

var news = new newsArray( 
"<I> Lebanon Opportunities has on its cover the first in a series of articles on consumer behavior, based on field studies undertaken by InfoPro Research  </I>", 
"<I> Do we want electricity at any price? الإقتصاد اللبناني والعربي attempts to provide an answer to this highly politicized issue that includes an exclusive interview with Gebran Bassil </I>",
"<I> Zanga! Zanga! has become Oil! Oil! provides a unique insight on the oil sector in Libya after the fall of the Qaddafi regime </I>",
"<I> The InfoPro Center for Economic Information published a study on the national socio-economic challenges and the positions of labor, the private sector, and the government in regards to the 30 most pressing issues. </I>"
);

var news_num = getnewsNum(); 
document.write('<table  height="150" cellpadding="10" cellspacing="0" border="0" width="154" class="BrdrBlack">' +
'<tr><td class="black8pt"><span name="js_news" id="js_news"> ' + news[news_num].href + '</span></td></tr>'+
'</table>');
link_num = document.links.length-1;

function rotateNews() {
  news_num = (news_num+1)%news.length;
  document.all.js_news.innerHTML = news[news_num].href;
   setTimeout("rotateNews()",3500);
}

setTimeout("rotateNews()",3500);

