
/*GMaps extension*/
GMap.prototype.addOverlaysNS=function(a) 
{ 
    var b=this; 
    for (i=0;i<a.length;i++) 
    { 
		try 
		{ 
			this.overlays.push(a[i]); 
			a[i].initialize(this); 
			a[i].redraw(true); 
		} 
        catch(ex) 
        { 
            alert('err: ' + i + ', ' + ex.toString()); 
        } 
    } 
   //this.reOrderOverlaysNS(); 


}; 


/* 
        Partner to the addOverlaysNS that sets the appropriate Zindex for the 
Icons 
        again without sorting them. 
*/ 
GMap.prototype.reOrderOverlaysNS=function() 
{ 
        var a=[]; 
        for(var b=0;b<this.overlays.length;b++) 
        { 
                a[0]=10000+b; 
                a[2]=15000; 
                a[1]=20000+b; 
                a[3]=25000+b; 
                a[5]=30000; 
                a[4]=35000+b; 
                a[6]=45000+b; 
                a[7]=50000+b; 
                this.overlays[b].setZIndex(a); 
         } 

}; 


/* 
   Changes the URL of the Markers IconImage on the Fly. 
   Note: This does not update any other variables of the icon so it 
expects the 
   new image to be same shape etc. as the original 

   Parameters: 
   Index -- The position in the map.overlays array 
   ImageURL -- The url to the new Image 
*/ 
GMap.prototype.changeMarkerImage = function (index, imageURL) 
{ 
   var b = this; 
   //If IE do this 
        if (document.all) 
        { 
           this.overlays[index].images[0].style.filter = 
"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + imageURL + 
"', sizingMethod='crop');"; 
        } 
        // otherwise 
        else 
        { 
           this.overlays[index].images[0].src = imageURL; 
        } 


}; 


GMap.prototype.addMarkerTooltip = function (index, tooltiptext) 
{ 
        var b = this; 
   this.overlays[index].images[0].title = tooltiptext; 

}; 


GMap.prototype.addMarkerMouseover = function (index, mouseoverJS) 
{ 
        var b = this; 
   this.overlays[index].images[0].onmouseover = mouseoverJS; 


}; 