﻿

// news ticker function

var newslist=new Array();
var cnt=0;			// current news item
var curr = "";
var i=-1;			// current letter being typed

newslist[0]=new Array("Saturday saw the stars of Bollywood grace Londons’ Excel Centre for the Zee Cine Awards 2008. Where Shah Rukh Khan stole the show with the Best Male award and a classic performance alongside Saif Ali Khan and Kareena Kapoor.","")
newslist[1]=new Array("Welcome to the all new Brit-Asian Magazine's website","")
newslist[2]=new Array("Brit-Asian Magazine Issue 9, Out Now!","")


function newsticker()
{
	// next character of current item
	if (i < newslist[cnt][0].length - 1)
	{
		i++;
		temp1 = newslist[cnt][0];	
		temp1 = temp1.split('');	
  		curr = curr+temp1[i];
		temp2 = newslist[cnt][1];	
  		//mtxt.innerHTML = "<small><a href='"+temp2+"'><font color='#ff0000'>"+curr+"_</small></font></a>";
  		mtxt.innerHTML = "<small><font color='#000000'>"+curr+"_</small></font>";  		
  		setTimeout('newsticker()',10)
		return;
	}

	// new item
	i = -1; curr = "";
	if (cnt<newslist.length-1)
		cnt++;
	else
		cnt=0;
	setTimeout('newsticker()',3000)

}
