Markers markers = new Markers("Markers");
map.addLayer(markers);
Size size = new Size(21,25);
Pixel offset = new Pixel(-(size.getWidth()/2), -size.getHeight());
Icon icon = new Icon("http://www.openlayers.org/dev/img/marker.png",size,offset);
markers.addMarker(new Marker(new LonLat(0,0),icon));
Icon halfIcon = (Icon) icon.clone();
markers.addMarker(new Marker(new LonLat(0,45),halfIcon));
Marker marker = new Marker(new LonLat(90,10), (Icon)icon.clone());
marker.setOpacity(0.2);
// marker.events.register('mousedown', marker, function(evt) { alert(this.icon.url); OpenLayers.Event.stop(evt); });
markers.addMarker(marker);
map.addControl(new LayerSwitcher());
map.zoomToMaxExtent();
halfIcon.setOpacity(0.5);
}