/**
 * Control used to display progress on the Map
 */
try
{
    /** Constructor */
	function ProgressControl() {}
	
	/** Extends a GControl */
    ProgressControl.prototype = new GControl();

    /**
     *  Override the initialise function to create a div where we
     *  can display state 
     */
    ProgressControl.prototype.initialize = function(map) 	
    {
        this._container = document.createElement("div");
        this._container.style.fontFamily='Arial';
        this._container.style.backgroundColor="#ffffff";
        this._container.id="mapProgress";
        
        map.getContainer().appendChild(this._container);
        
        return this._container;        
    }
       
    /** 
     * By default placed in the top right of the map 
     */ 
    ProgressControl.prototype.getDefaultPosition = function() 
    {
        return new GControlPosition(G_ANCHOR_TOP_RIGHT);
    }
    
    /**
     * Called by dynamic map to set the text when loading
     */
    ProgressControl.prototype.setText = function(text)
    {
        this._container.innerHTML = text;
    }
}
catch (e)
{
}
