
var htmlTagsOpen="<p style='text-align:left; width:665px; font-size:13px; color:rgb(194,0,0); font-weight:normal; font-family:comic sans ms, arial, helvetica;'> &nbsp; ";

var htmlTagsClose="</p>" 

var typeText_timeout;
function typeText_ini(whichDoc, whichId){
	myTextO=new myTO(whichDoc, whichId);
	if(navigator.appName=="Netscape") 	window.onresize=reloadFile;//fix NE bug
	typeText_timeout=setTimeout("typeText()", 2000);//setTimeout wg netscape-bug
}
function reloadFile(){
	clearTimeout(typeText_timeout);
	location.reload();
}

var textnr=0;
var charnr=0;
var delTime;


function typeText(){
	var text= htmlTagsOpen + texte[textnr].substring(0, charnr) + htmlTagsClose;
	myTextO.setHTML(text);
	charnr++;
	delTime=50;
	if(charnr==texte[textnr].length+1){
		charnr=0;
		textnr++;
		delTime=2500;
	}
	if(textnr==texte.length) textnr=0;
	//clearTimeout(typeText_timeout);	
	typeText_timeout=setTimeout("typeText()", delTime);
}

function reset_typeText(){
	clearTimeout(typeText_timeout);
	myTextO.setHTML("");
	textnr=0;
	charnr=0;
}
//-----------------------------------------------------------------------------------		
function myTO(whichDoc, whichId){
	var myDoc=(whichDoc=="")? "":"parent."+whichDoc+".";
	if(document.layers){
		this.prop=eval(myDoc+"document."+whichId);
		this.myId=this.prop.name;
		
	}
	if(document.all){
		this.prop=eval(myDoc+"document.all."+whichId);
		this.myId=this.prop.id;
	}	
	this.setHTML=setHTML;
}

function setHTML(hs){	
	if(document.all) this.prop.innerHTML=hs;
	if(document.layers){;
		this.prop.document.open();
		this.prop.document.write(hs);
		this.prop.document.close();
	}
}

//if(document.layers) window.onresize=typeText;
