// Unload listener activates when visitor leaves the page
// SpryDOMUtils.js only provides us with a load listener so we create this function

var Spry; if (!Spry) Spry = {}; if (!Spry.Utils) Spry.Utils = {};

Spry.Utils.addUnLoadListener = function(handler /* function */)
{ 
	if (typeof window.addEventListener != 'undefined')
		window.addEventListener('unload', handler, false);
	else if (typeof document.addEventListener != 'undefined')
		document.addEventListener('unload', handler, false);
	else if (typeof window.attachEvent != 'undefined')		
		window.attachEvent('onunload', handler);
};

