function fCreateMap(oMap) {
  function fCreateMarkers() {
   	function fCreateMarker(aMarker) {
   		function fClickFlag() {   			
   			fClickLink();
   			//fPopup(aMarker['href'],700,600);
   			document.location=(aMarker['href']);
   		}
        		
   		function fClickLink() {
   			if(oCurrentMarker) oCurrentMarker.removeAttribute('id');
   			oMarker.setAttribute('id','current');
   			oCurrentMarker=oMarker;
        			
   			if(oCurrentLink) oCurrentLink.removeAttribute('id');
   			oLi.setAttribute('id','current');
   			oCurrentLink=oLi;
   		}
        		
   		var oLi=document.createElement('li');
   		var sClassName=aMarker['group']?'link_'+aMarker['group'].replace(/ /,''):'link';
   		oLi.setAttribute('className',sClassName); // for IE
   		oLi.setAttribute('class',sClassName); // for Firefox   		
   		oLi.appendChild(document.createTextNode(aMarker['caption']));   		
      if(oLi.addEventListener) oLi.addEventListener('mouseover',fClickLink,true); // firefox
      else oLi.attachEvent('onmouseover',fClickLink);  // IE
      
      if(oLi.addEventListener) oLi.addEventListener('click',fClickFlag,true); // firefox
      else oLi.attachEvent('onclick',fClickFlag);  // IE
   		oLinksList.appendChild(oLi);        		
        		
   		var oMarker=document.createElement('div');
   		var sClassName=aMarker['class']?'marker_'+aMarker['class']:'marker';
   		oMarker.setAttribute('className',sClassName); // for IE
   		oMarker.setAttribute('class',sClassName); // for Firefox
   		oMarker.style.bottom=aMarker['y']+'px';
   		oMarker.style.left=aMarker['x']+'px';
   		
   		// needed to switch on an over state in IE6 - changing the class doesn't update the display
   		var oOverDiv=document.createElement('div');
   		oOverDiv.setAttribute('id','overdiv');
   		oMarker.appendChild(oOverDiv);
   		
      var sCaptionText=aMarker['shortcaption']?aMarker['shortcaption']:aMarker['caption'];
      var oCaption=document.createElement('div');
      oCaption.setAttribute('id','caption');
      oCaption.appendChild(document.createTextNode(sCaptionText));
      oMarker.appendChild(oCaption);
      
      if(oMarker.addEventListener) oMarker.addEventListener('mouseover',fClickLink,true); // firefox
      else oMarker.attachEvent('onmouseover',fClickLink); // IE            
      if(oMarker.addEventListener) oMarker.addEventListener('click',fClickFlag,true); // firefox
      else oMarker.attachEvent('onclick',fClickFlag); // IE
            	
      oMap.appendChild(oMarker);
        		
   	} // end of fCreateMarker
   	
   	function fCreateTitle(sCaption) {
   		var oLi=document.createElement('li');
   		oLi.appendChild(document.createTextNode(sCaption));
   		var sClassName='caption_'+sCaption.replace(/ /,'');
   		oLi.setAttribute('className',sClassName); // for IE
   		oLi.setAttribute('class',sClassName); // for Firefox
   		oLinksList.appendChild(oLi);
   		
   		sPreviousGroup=sCaption;
   	}
        			
   	var oLinksList=document.createElement('ul');
   	oLinksList.setAttribute('id','linksList');
   	
   	var sPreviousGroup='';
        	
  	for(var i=0;i<aMarkers.length;i++) {
  		if((aMarkers[i]['group'])&&(aMarkers[i]['group']!=sPreviousGroup)) fCreateTitle(aMarkers[i]['group']);
  		fCreateMarker(aMarkers[i]);
  	}
    
    try {
    	oMap.appendChild(oLinksList);
   	  oMap.removeChild(oBlocker);
   	} catch(E) {
   		// do nothing
   	}
   	       	
  }  // end of fCreateMarkers
        
  function fMarkersToArray(sResponseText,sResponseXML,bResult) {
  	// copy all of the elements out of the XML definition file and turn them into an array of markers
   	try {
     	var aXMLMarkers=sResponseXML.getElementsByTagName('marker'); // definitions of all of the markers
     	for(var i=0; i<aXMLMarkers.length; i++) {
     		var aMarker=new Array();
     		for(var j=0; j<aXMLMarkers[i].childNodes.length; j++) { // for each child node
     			try {
     			  if(aXMLMarkers[i].childNodes[j].nodeType!=1) continue; // in firefox linebreaks can also counted as nodes!  Nodetype 1 is an element node
     			  var sAttribute=aXMLMarkers[i].childNodes[j].tagName; // add its name and value as a key value pair into the array
     			  aMarker[sAttribute]=aXMLMarkers[i].childNodes[j].firstChild.nodeValue;
     			} catch(innerError) {
     				// do nothing
     			}
     		}
     		aMarkers.push(aMarker); // push the marker onto the stack
     	}
    } catch(outerError) {
     	// do nothing
    } finally {
    	fCreateMarkers();
    }
  }        
        
  var oCurrentMarker; 
  var oCurrentLink;
        
  var aMarkers=new Array();        
  var oMarkersRequest=new fHTTPRequest(sMarkerLocation,new Array(),fMarkersToArray);
  
  var oBlocker=document.createElement('div');
  oBlocker.setAttribute('id','blocker');
  oMap.appendChild(oBlocker);
  
  /* switch on to show the mouse coords when you click the stairway
     this is handy to position the markers */
     
  /* function fShowCoords() {
   		var x=window.event.x;
   		var y=oMap.offsetHeight-window.event.y;
   		oMouseCoords.innerHTML='X='+x+'px Y='+y+'px';
   	}
  
  var oMouseCoords=document.createElement('div');
  oMouseCoords.setAttribute('id','mousecoords');
  oMap.appendChild(oMouseCoords);
  if(oMap.attachEvent) oMap.attachEvent('onclick',fShowCoords); // IE only
  
  */

               
}