/*verif  utf-8 : 中文*/
function clNewsTyper(idCalk)
{
	this.obj=idCalk;
	eval("window.nw"+idCalk+" = this");
	this.news = new Array();
	
	this.addItem =
		function clNewsTyper_addItem(date,texte,lien)
		{
			var nb=this.news.length;
			this.news[nb] =  new Array();
			this.news[nb][1] = date;
			this.news[nb][2] = texte;
			this.news[nb][3] = lien;
		}
		
	this.timer = '';
	this.speed = 100;
	this.pause = 3000;
	this.cpt = 0;
	this.cptStr = 0;
	this.showItem =
		function clNewsTyper_showItem()
		{
			if (this.news.length > 0)
			{
				var deb ="";
				//<b class='date'>"+ this.news[this.cpt][1] +"</b><br>";
				deb = (is.ns4 && !is.ns6)? "<table width='450px' border='0' cellspacing='0' cellpadding='0'><tr><td class='news'>" + deb :deb; 
				var dL =(this.news[this.cpt][3] )?"<a href='"+this.news[this.cpt][3]+"' class='nodeco'><b>" :"";
				var Str =this.news[this.cpt][2];
				var lStr = Str.length;
				var fL =(this.news[this.cpt][3])?"</b></a>":"";
				fL += (is.ns4 && !is.ns6)? fL+"</td></tr></table>": fL
				this.typeText(deb,dL,Str,fL,lStr);
			}
		}
	this.typeText = 
		function clNewsTyper_typeText(deb,dL,Str,fL,lStr)
		{
			if(this.cptStr<= lStr)
			{
			
				MM_setTextOfLayer(this.obj,'', deb+dL+Str.substring(0,this.cptStr)+fL)
				this.cptStr++;
				clearTimeout(this.timer);
				this.timer = setTimeout('window.nw'+idCalk+'.typeText("'+deb+'","'+dL+'","'+Str+'","'+fL+'","'+lStr+'")',this.speed)
			}
			else
			{
				this.cptStr = 0;
				this.cpt++;
				if(this.cpt >= this.news.length)
				{
						this.cpt = 0;
				}
				clearTimeout(this.timer);
				this.timer = setTimeout("window.nw"+idCalk+".showItem()",this.pause)
			}
		}
	

}

function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}