// ------------------------------------------------
// Global.js
// Author:	jpotter@troupscreeksoftware.com
// Date:	Oct 26, 2006
// Desc:	Global Declarations
// Copyright 2006 Troups Creek Software LLC
// ------------------------------------------------
//
// Error trap
window.onerror = TrapAllErrors;
// global objects & data
var gApp = new DirectoryApplication();		// application general manager
var gData = new DataAccessor("_private");	// application data access manager
var gMap = new MapIF();						// application map interface
var gSvc = new ServiceIF();					// application service interface
var gAds = new GeoAdRotator();				// application geo-based ad rotator
var gMsg = new MessageBox();				// application messaging utility
var gConfig = null;							// application config settings
var gXmlHttp = null;						// temporary http web request object
var gTmpDoc = null;							// temporary xml doc object

// ------------------------------------------------
// global error trap
// ------------------------------------------------
function TrapAllErrors(message, url, line)
{
	alert("Script error on line " + line + ": " + message);
	return true;
}

// ------------------------------------------------
// global string trim
// ------------------------------------------------
String.prototype.trimStr=function()
{
	return this.replace(/^\s*|\s*$/g,'');
}




