// Calling external map functions and controls
var map;									
function init(){							
map = new OpenLayers.Map('map');
var options = {numZoomLevels: 3};													// Controls how many times a user can zoom in								
var graphic = new OpenLayers.Layer.Image('',						
'img/cu.gif', 																		// Markerless map - Comment this line when in need of updating
//'img/cu_points.gif', 																// Marked up map - Uncomment line when in need of updating
new OpenLayers.Bounds(-40, -88.759, 40, 88.759),									// Width/Height of mapping zone
new OpenLayers.Size(2000, 2000),options);											// Map width/height
map.addLayers([graphic]);	
map.addControl(new OpenLayers.Control.MousePosition()); 							// Comment this line out to turn off mouse position
map.zoomToMaxExtent();													
var newl = new OpenLayers.Layer.GeoRSS( 'CU', 'xml/cu.xml'); 						// XML DBase handles all marker placements and tooltip links	
map.addLayer(newl);
map.events.register("mousemove", map, function(e) {					
var position = this.events.getMousePosition(e);						
OpenLayers.Util.getElement.innerHTML = position;});
}

// Hack for tool tip bubble styling
OpenLayers.Feature.prototype.popupClass = OpenLayers.Popup.FramedCloud;
OpenLayers.Layer.Text.prototype.markerClick = function(evt) {
var sameMarkerClicked = (this == this.layer.selectedFeature);
if (this.popup) {
this.popup.toggle(); 
} else {
this.layer.map.addPopup(this.createPopup(true));
}
this.layer.selectedFeature = (!sameMarkerClicked) ? this :
null;
OpenLayers.Event.stop(evt);        
}
