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
                   2010-07-22 12:25:12