function handle_event(forAction, el) {
	if ($('rta_floating_toolbar') && $('rta_floating_toolbar').className == 'editing') return false;
	switch (forAction) {
	
		// handle asset / lightwindow display
		case 'lightwindowAsset':
			var url = el.href;
			el.blur();

			myLightWindow.activateWindow({
				href: url,
				title: el.getAttribute('title'),
				author: el.getAttribute('author'),
				caption: el.getAttribute('caption'),
				width: (arguments[2]) ? arguments[2] : 640,
				height: (arguments[3]) ? arguments[3] + 15 : 500
			});

			// always return false, because we don't want the anchor to do anything
			return false;
	}
	
	return false;
}

function click_asset(assetId) {
	var asset = $('asset_' + assetId);
	if (asset && asset.onclick && asset.onclick()) {}
}

