Your while loop will always continue because you are using TRUE. clearTimeout makes no difference because the function has already been called and the while loop is processing. You need to use some other comparison; something like this.
var continue = true;
while(continue)
{
if(stop loop)
continue = false;
}