Thanks a lot. When i googled up for autocompletion I first encountered a bunch of sites saying its imposible or sugesting visualy improper solutions.

However, I use prototype framework (1.6) to send the data to javascript and the code did not work. All your arrays get filled with functions from prototype.js as objects. I didn't look up where's the object collision, I just replaced all the for(var i in array) with for(i=0; i<array.lenght; i++) in your script and its working fine so far.

Thanks again!