marker popup

I would like open a popup when I click the POI with the style of this example: example: http://openlayers.org/dev/examples/dynamic-text-layer.html

this is my code, I do not know how to change it


<div id="mapdiv"></div>
  <script src="http://www.openlayers.org/api/OpenLayers.js"></script>
  <script>
    map = new OpenLayers.Map("mapdiv",
		{
            controls:[ 
			new OpenLayers.Control.Navigation(),                
            new OpenLayers.Control.ScaleLine() 
			]
		}
	);
    map.addLayer(new OpenLayers.Layer.OSM());
	
	
    var pois = new OpenLayers.Layer.Text( "My Points",
                    { location:"./mypoi.txt",
                      projection: map.displayProjection
                    });
    map.addLayer(pois);
	
 
    //Set start centrepoint and zoom    
    var lonLat = new OpenLayers.LonLat( 9.19, 45.46 )
          .transform(
            new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
            map.getProjectionObject() // to Spherical Mercator Projection
          );
    var zoom=11;
    map.setCenter (lonLat, zoom);  
 
  </script>

Is this example of any help ? http://openlayers.org/dev/examples/getfeatureinfo-popup.html