/*
Functions.JS
All operational functions and UI events
*/
var isIE = /MSIE (\d+\.\d+);/.test(navigator.userAgent);


/* COMMON */
function popupLink(a) {
	var popup = window.open(a, "popup");
	
	(popup) ? popup.focus() : alert("Pop-up window failed to open - was it blocked by your browser's pop-up blocker?");
	
	return false;
}

function scrollToTop() {
	s  = (isIE) ? document.documentElement.scrollTop : window.pageYOffset;
	
	t1 = new Tween(new Object(), 'y', Tween.strongEaseOut, s, 0, 0.5);
	
	t1.onMotionChanged = function(tween) {
		window.scroll(0, tween.target._pos);
	};

	t1.start();
	
	// cancel browser navigate
	return false;
}

