
hq.loadingMsg = 
{

	count : 0,

	FadeInDt : 100,

	FadeOutDt : 500,

	init : function() {

		$j( '#mapWrapper' ).append( "<div id='loadingMsg'><img src='" + $j('#pluginPath').val() + "/images/loading-spinner.gif' width=32 height=32 /></div>" );
		this.$domObj = $j('#loadingMsg');
		this.$domObj.hide();
	
	},

	show : function() {
		this.$domObj = $j('#loadingMsg');
		if(this.$domObj.is(':hidden')) {
			this.$domObj.fadeIn( this.FadeInDt );
			this.$domObj
			this.count = 1;
		} else {
			this.count++;
		}
	},

	hide : function() {
		this.$domObj = $j('#loadingMsg');
		if(this.$domObj.is(':hidden')) {
                } else {
                        this.count--;
			if(this.count==0)
				this.$domObj.fadeOut( this.FadeOutDt );
                }
	
	}
	
};



$j(document).ready(toolbox.delegate(hq.loadingMsg.init, hq.loadingMsg));
