// This is used to hold executing animations so they can be cancelled mid-animation

animTrackerAnims = {};

function trackAnim(theKey, theEffect) {
	untrackAnim(theKey);
	animTrackerAnims[theKey] = theEffect;
}

function untrackAnim(theKey) {
	try { if (theKey in animTrackerAnims && animTrackerAnims[theKey]) animTrackerAnims[theKey].cancel(); } catch(e) { }
}
