/*
Typing Scroller
Submitted by bengaliboy00@hotmail.com (hp: http://www.angelfire.com/nt/bengaliboy/)
With modifications by Dynamicdrive.com
For full source code, usage terms, and 100s more scripts, visit http://dynamicdrive.com
*/

//Secify scroller contents
var line=new Array()
line[1]="Sri Mahligai now at FaceBook http://www.facebook.com/pages/Sri-Mahligai/46080486053"
line[2]="Leave us a post at our FaceBook Page for a quotation"
line[3]="Sri Mahligai YouTube channel has amassed over 500,000 video views since Oct 2007"
line[4]="Most advance wedding booking now stands at Apr 2013"

//Specify font size for scoller
var ts_fontsize="8pt"

lines=line.length-1 //--Number of lines

//if IE 4+ or NS6
if (document.all||document.getElementById)
	{
		document.write('<form name="bannerform">')
		document.write('<input type="text" name="banner" size="100%"')
		document.write('  style="background-color: transparent; color: black; font-family: tahoma; font-size: '+ts_fontsize+'; font-weight: bold; border: none" onfocus="blur()">')
		document.write('</form>')
	}

temp=""
nextchar=-1;
nextline=1;
cursor="_"


function animate()
{
	if (temp==line[nextline] & temp.length==line[nextline].length & nextline!=lines)
	{
		nextline++;
		nextchar=-1;
		document.bannerform.banner.value="LATEST : "+temp;
		temp="";
		setTimeout("nextstep()",5000)
	}
	else if (nextline==lines & temp==line[nextline] & temp.length==line[nextline].length)
	{
		nextline=1;
		nextchar=-1;
		document.bannerform.banner.value="LATEST : "+temp;
		temp="";
		setTimeout("nextstep()",5000)
	}
	else
	{
		nextstep()
	}
}


function nextstep()
{


	nextchar++;
	temp+=line[nextline].charAt(nextchar);
	document.bannerform.banner.value="LATEST : "+temp+cursor
	setTimeout("animate()",70)
}


//if IE 4+ or NS6
if (document.all||document.getElementById)
window.onload=animate

