//If using any portion of this DEMO script,
//one must insert along this notice too:
/***********************************
*   http://news-ticker.vbarsan.com/
*   This notice may not be removed 
***********************************/

var dwidth=900; 
var dheight=20; 
var dspeed=100; //1s=1000; 
var dbcolor="#ffffff";
var expclass='class=leftaln';
var jj=-1;var kk=0;var wds=0; var idx=0;
function iens6exp(idx)
{ iens6id=document.getElementById('expid');
				iens6id.href='/index.php/site/news/recid/'+mesajID[idx];

	jj++;
	if(kk==0&&mesaj[idx].charAt(jj)=="<")
	{
		kk=1;
		wds=0;
	}
	else if(kk==1&&mesaj[idx].charAt(jj)==">")
	{
		kk=0;
		wds=0;
	}
	else if(kk==1)
		wds=0;
		
	if(jj<=110)
		alch.className="leftaln";
	else 
		alch.className="leftaln";
	
	if(kk==0&&mesaj[idx].charAt(jj)!=">"&&jj<=mesaj[idx].length)
	{
		wds=1;
		iens6div.innerHTML=mesaj[idx].substring(0,jj);
	}
	
	if(wds>0&&jj<=mesaj[idx].length)
		setTimeout("iens6exp("+idx+")",dspeed);
	else if(jj<mesaj[idx].length)
	{		

		iens6exp(idx);
	}
	else
	{
		jj=-1;
		idx++;
		if (idx == mesaj.length)
			idx=0;
		setTimeout("iens6exp("+idx+")",5000);
	}
}
function ns4exp(idx)
{
	iens6id=document.getElementById('expid');

	jj++;
	if(kk==0&&mesaj[idx].charAt(jj)=="<"){kk=1;wds=0;}else if(kk==1&&mesaj[idx].charAt(jj)==">"){kk=0;wds=0;}else if(kk==1)wds=0;
	if(jj<=110)expclass='class=centeraln';else expclass='class=leftaln';
	if(kk==0&&mesaj[idx].charAt(jj)!=">"&&jj<=mesaj[idx].length){wds=1;
	ns4div.document.write('<div '+expclass+'>'+mesaj[idx].substring(0,jj)+'</div>');ns4div.document.close();}
	if(wds>0&&jj<=mesaj[idx].length)
		setTimeout("ns4exp("+idx+")",dspeed);
	else if(jj<=mesaj[idx].length){
		ns4exp(idx);
//		iens6id.href='/index.php/site/news/recid/'+mesajID[idx];
	}else
	{
		jj=-1;
		idx++;
		if (idx == 3)
			idx=0;
		setTimeout("ns4exp("+idx+")",5000);
	}
	
}

function startexp()
{
	if(document.getElementById)
	{
		alch=document.getElementById('chthis');
		iens6div=document.getElementById('expdiv');
		iens6div.innerHTML='';
		iens6exp(0);
	}
	else if(document.all)
	{
		alch=chthis;
		iens6div=expdiv;
		iens6div.innerHTML='';
		iens6exp(0);

	}
	else if(document.layers)
	{
		ns4div=document.ns4expb0.document.ns4expb1;
		ns4div.document.write('');
		ns4div.document.close();
		ns4exp(0);
	}
	//setTimeout("startexp()", 2000);
}

document.write('<table border="0" CELLSPACING="0" align="right" CELLPADDING="0" style="margin-right:20px"><tr><td width='+dwidth+'px>');if(document.all||document.getElementById){document.write('<div id="chthis" '+expclass+' style="width:'+dwidth+'px;height:'+dheight+'px;background-color:'+dbcolor+';"><a id="expid"><span id="expdiv"></a></span></div>');}
document.write('<ilayer id="ns4expb0" width=&{'+dwidth+'}; height=&{'+dheight+'}; bgcolor=&{'+dbcolor+'};><layer id="ns4expb1" width=&{'+dwidth+'}; height=&{'+dheight+'};></layer></ilayer></td></tr></table>');
