
//News Bar script- By Premshree Pillai
var barwidth=460 //Enter main bar width in px or %
var setdelay=3000 //Enter delay between arTXT, in mili-seconds
var mouseover_color='#e6e6e6' //Specify highlight color
var mouseout_color='#e6e6e6' //Specify default color
msg_url = new Array();
   for (i=0; i<arURL.length; i++) {
      msg_url[i] = '/' + arURL[i] +'';
    }
var count=0;
var ns6=document.getElementById&&!document.all;
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1;
var ns4Mac=document.layers&&navigator.userAgent.indexOf("Mac")>0;
if (ns4Mac) {
	document.write('<a href="/forms/headlines.html" class="newlinkover">Subscribe to daily e-mail headlines</a>');
}else{
	document.write('<table bgcolor="#e6e6e6" width="'+barwidth+'" border="0" cellspacing="0" cellpadding="0"><form name="news_bar"><tr align="left" height="20" bgcolor="#e6e6e6">');
	if (ie4||ns6){
	document.write('<td bgcolor="#e6e6e6"><input type="input" value="" style="width:0; height:20; border:none" name="prev"><\/td><td bgcolor="#e6e6e6"><input type="button" name="news_bar_but" onclick="goURL();" style="font-weight: bold; font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: #003399; width:'+barwidth+'; height:20; border:none; cursor:hand; background: #e6e6e6;" onmouseover="this.style.background=mouseover_color" onmouseout="this.style.background=mouseout_color"><\/td><td><input type="input" value="" style="width:0; border:none;"><\/td>');
	}
	else{
		if (navigator.userAgent.indexOf("Opera")!=-1)
			document.write('<td valign="center" bgcolor="#e6e6e6"><input type="button" name="news_bar_but" onclick="goURL();" style="width:'+barwidth+'; background: #e6e6e6;" border="0"><\/td>');
		else
			document.write('<td valign="center" bgcolor="#e6e6e6"><input type="button" name="news_bar_but" onclick="goURL();" width="'+barwidth+'; background: #e6e6e6;" border="0"><\/td>');
		}
	function init_news_bar(){
		document.news_bar.news_bar_but.value = arTXT[count].replace("&#151;","--");
	}
	document.write('<\/tr><\/form><\/table>');
	function moveit(how){
	if (how==1){ 						//cycle foward
			if (count < arTXT.length-1)
				count++
			else
			count=0
	}else{ 						//cycle backward
			if (count == 0)
				count=arTXT.length-1
			else
				count--
		}
 	 document.news_bar.news_bar_but.value=arTXT[count].replace("&#151;","--");
	}
	setInterval("moveit(1)",setdelay)
	function goURL(){
		location.href=msg_url[count];
	}
	init_news_bar();
}
