Hello,

is my first post here and maybe is a silly question but im starting webdeveloping so here it goes.

Code:
        var size;
	var countdown_number;
	var name;
	var div;
	var working;

        function load()
		{			
			name = "xxx xxx xxxxxxx";
			div = "nome";
			size = name.length;			
			countdown_number=-1;
			countdown_trigger();
		}
		
		function countdown_trigger() {
			if(countdown_number < size-1) {				
				countdown_number++;
				if (name[countdown_number]==" ") {
					document.getElementById(div).innerHTML = document.getElementById(div).innerText + "&nbsp";
				} else {
					document.getElementById(div).innerHTML = document.getElementById(div).innerText + name[countdown_number];
				}
				if(countdown_number < size) {					
					countdown = setTimeout('countdown_trigger()', 200);
				}
			} 
		}
i want to write the string one char each time... is working on Chrome but it isnt working on Firefox.
Another problem that i have is if i wanna call countdown_trigger() function again it doesn't work, or better it works only for my last call writing the first char of whatever i called for before. so i thought:

Code:
        var size;
	var countdown_number;
	var name;
	var div;
	var working;
        
        function load()
		{
			
			
			working = true;
			name = "09 / 07 / 1985";
			div = "data_nascimento";
			size = name.length;
			
			countdown_number=-1;
			countdown_trigger();
			while (working) {
			}
			working = true;
			name = "xxx xxx xxxxx xxx";
			div = "nome";
			size = name.length;			
			countdown_number=-1;
			countdown_trigger();
		}
		
		function countdown_trigger() {
			if(countdown_number < size-1) {				
				countdown_number++;
				if (name[countdown_number]==" ") {
					document.getElementById(div).innerHTML = document.getElementById(div).innerText + "&nbsp";
				} else {
					document.getElementById(div).innerHTML = document.getElementById(div).innerText + name[countdown_number];
				}
				if(countdown_number < size) {					
					countdown = setTimeout('countdown_trigger()', 200);
				}
			} else {
				working = false;
			}
		}
it enters in cicle without stoping... i wanna to right the first sentence on his div and the other on other div...

Anybody can help me? Thank you!