+2  A: 

This is due to closure of variable i.

Introduce another scope like,

(function(i){
marker.events.register('mousedown', marker, function(evt) { 
                    popup = new OpenLayers.Popup.FramedCloud(null, 
                                       lonlat[i], 
                                       null, 
                                       infodiv[i], 
                                       anchor=null,true,null); 

                    map.addPopup(popup); 

                    OpenLayers.Event.stop(evt);  

                });
})(i);
Marimuthu Madasamy
Really Great! Thanks! I've put the function(i) inside the register part (near the function(evt)) and it worked! Thank!!!
Roman
Thank you very much, I had exactly the same problem and I was going crazy. I would have never thought about closure leaks.
ogrisel