Julia: Problem mit "undefiniert"

Beitrag lesen

text = "000120"

function Los(text) {
var t1 = text.charAt(0) + text.charAt(1) ;
var t2 = text.charAt(2) + text.charAt(3) ;
var t3 = text.charAt(4) + text.charAt(5) ;
alert(t1)
window.setTimeout("Count(t1, t2, t3)", 100);
}

Es soll also eine Funktion Count() mit t1, t2 und t3 gestartet werden.

Fehlermedung:

Zeile 1 Zeichen 1
  't1' ist undefiniert

Das komische ist, dass alert 00 ausgibt.

Lösungsversuche:

if (typeof(t1)=="undefined"){t1="0"}
if (t1 == "00") {t1=0}

kann mir bitte jemand helfen?

Danke schon mal im vorraus.