/*
 * This file sets up "handler" functions for the
 * onload and onunload functions for a page.
 * 
 * To use this code, add the following to the page:
 * <body onload="bodyOnLoad()" onunload="bodyOnUnload()">
 * 
 * The functions check for the existance of 
 * handleBodyOnLoad(), and handleBodyOnUnload()
 * 
 * IF they exist, then they are called. If they do not
 * exist then nothing happens.
 * 
 * This was originally put in place to support the loading and
 * unloading of google maps. Could not get jQuery to bind the
 * onunload event to the body tag.
 *
 */

function bodyOnLoad() {
	// If the handler function is defined then call it
	if (self.handleBodyOnLoad) { handleBodyOnLoad(); }
}

function bodyOnUnload() {
	// If the handler function is defined then call it
	if (self.handleBodyOnUnload) { handleBodyOnUnload(); }
}

//Track clicks on outbound links with Google Analytics
function recordOutboundLink(category, action) {
	try {
		_gaq.push(['_trackEvent', category, action]);
	}catch(err){}
}
