function DeferredLoader()
{
	// CONSTRUCTOR
}

DeferredLoader.prototype = {
	
	init: function()
	{
		this.trace("starting VE load.");
		try
		{
			if(VEMap != null)
			{
				// we have the map
				this.trace("VE found.");
				window.parent.handleCallBack.veLoadSuccess(self);
			} else {
				this.trace("VE not found");
				window.parent.handleCallBack.veLoadFail();
			}
		} catch (err) {
			this.trace(err.message);
			window.parent.handleCallBack.veLoadFail();
		}
	}, 

	trace: function(str)
	{
		if(window.console) window.console.log("DeferredLoader: " + str);
	}	
}

var deferred_loader = new DeferredLoader();