rem: return ; 
add: return ; 
context: function FCK_ContextMenu_GetListener( listenerName ){	switch ( listenerName )	{		case 'Generic' :			return {			AddItems : function( menu, tag, tagName )			{				menu.AddItem( 'Cut'		, FCKLang.Cut	, 7, FCKCommands.GetCommand( 'Cut' ).GetState() == FCK_TRISTATE_DISABLED ) ;				menu.AddItem( 'Copy'	, FCKLang.Copy	, 8, FCKCommands.GetCommand( 'Copy' ).GetState() == FCK_TRISTATE_DISABLED ) ;				menu.AddItem( 'Paste'	, FCKLang.Paste	, 9, FCKCommands.GetCommand( 'Paste' ).GetState() == FCK_TRISTATE_DISABLED ) ;			}} ;		case 'Table' :			return {			AddItems : function( menu, tag, tagName )			{				var bIsTable	= ( tagName == 'TABLE' ) ;				var bIsCell		= ( !bIsTable && FCKSelection.HasAncestorNode( 'TABLE' ) ) ;								if ( bIsCell )				{					menu.AddSeparator() ;					var oItem = menu.AddItem( 'Cell'	, FCKLang.CellCM ) ;					oItem.AddItem( 'TableInsertCell'	, FCKLang.InsertCell, 58 ) ;					oItem.AddItem( 'TableDeleteCells'	, FCKLang.DeleteCells, 59 ) ;					oItem.AddItem( 'TableMergeCells'	, FCKLang.MergeCells, 60 ) ;					oItem.AddItem( 'TableSplitCell'		, FCKLang.SplitCell, 61 ) ;					oItem.AddSeparator() ;					oItem.AddItem( 'TableCellProp'		, FCKLang.CellProperties, 57 ) ;					menu.AddSeparator() ;					oItem = menu.AddItem( 'Row'			, FCKLang.RowCM ) ;					oItem.AddItem( 'TableInsertRow'		, FCKLang.InsertRow, 62 ) ;					oItem.AddItem( 'TableDeleteRows'	, FCKLang.DeleteRows, 63 ) ;										menu.AddSeparator() ;					oItem = menu.AddItem( 'Column'		, FCKLang.ColumnCM ) ;					oItem.AddItem( 'TableInsertColumn'	, FCKLang.InsertColumn, 64 ) ;					oItem.AddItem( 'TableDeleteColumns'	, FCKLang.DeleteColumns, 65 ) ;				}				if ( bIsTable || bIsCell )				{					menu.AddSeparator() ;					menu.AddItem( 'TableDelete'			, FCKLang.TableDelete ) ;					menu.AddItem( 'TableProp'			, FCKLang.TableProperties, 39 ) ;				}			}} ;		case 'Link' :			return {			AddItems : function( menu, tag, tagName )			{				var bInsideLink = ( tagName == 'A' || FCKSelection.HasAncestorNode( 'A' ) ) ;				if ( bInsideLink || FCK.GetNamedCommandState( 'Unlink' ) != FCK_TRISTATE_DISABLED )				{					// Go up to the anchor to test its properties					var oLink = FCKSelection.MoveToAncestorNode( 'A' ) ; 					var bIsAnchor = ( oLink && oLink.name.length > 0 && oLink.href.length == 0 ) ;					// If it isn't a link then don't add the Link context menu					if ( bIsAnchor )						return ; 					menu.AddSeparator() ;					if ( bInsideLink )						menu.AddItem( 'Link', FCKLang.EditLink		, 34 ) ;					menu.AddItem( 'Unlink'	, FCKLang.RemoveLink	, 35 ) ;				}			}} ;		case 'Image' :			return {			AddItems : function( menu, tag, tagName )			{				if ( tagName == 'IMG' && !tag.getAttribute( '_fckfakelement' ) )				{					menu.AddSeparator() ;					menu.AddItem( 'Image', FCKLang.ImageProperties, 37 ) ;				}			}} ;		case 'Anchor' :			return {			AddItems : function( menu, tag, tagName )			{				// Go up to the anchor to test its properties				var oLink = FCKSelection.MoveToAncestorNode( 'A' ) ; 				var bIsAnchor = ( oLink && oLink.name.length > 0 ) ;				if ( bIsAnchor || ( tagName == 'IMG' && tag.getAttribute( '_fckanchor' ) ) )				{					menu.AddSeparator() ;					menu.AddItem( 'Anchor', FCKLang.AnchorProp, 36 ) ;				}			}} ;		case 'Flash' :			return {			AddItems : function( menu, tag, tagName )			{				if ( tagName == 'IMG' && tag.getAttribute( '_fckflash' ) )				{					menu.AddSeparator() ;					menu.AddItem( 'Flash', FCKLang.FlashProperties, 38 ) ;				}			}} ;		case 'Form' :			return {			AddItems : function( menu, tag, tagName )			{				if ( FCKSelection.HasAncestorNode('FORM') )				{					menu.AddSeparator() ;					menu.AddItem( 'Form', FCKLang.FormProp, 48 ) ;				}			}} ;		case 'Checkbox' :			return {			AddItems : function( menu, tag, tagName )			{				if ( tagName == 'INPUT' && tag.type == 'checkbox' )				{					menu.AddSeparator() ;					menu.AddItem( 'Checkbox', FCKLang.CheckboxProp, 49 ) ;				}			}} ;		case 'Radio' :			return {			AddItems : function( menu, tag, tagName )			{				if ( tagName == 'INPUT' && tag.type == 'radio' )				{					menu.AddSeparator() ;					menu.AddItem( 'Radio', FCKLang.RadioButtonProp, 50 ) ;				}			}} ;		case 'TextField' :			return {			AddItems : function( menu, tag, tagName )			{				if ( tagName == 'INPUT' && ( tag.type == 'text' || tag.type == 'password' ) )				{					menu.AddSeparator() ;					menu.AddItem( 'TextField', FCKLang.TextFieldProp, 51 ) ;				}			}} ;		case 'HiddenField' :			return {			AddItems : function( menu, tag, tagName )			{				if ( tagName == 'INPUT' && tag.type == 'hidden' )				{					menu.AddSeparator() ;					menu.AddItem( 'HiddenField', FCKLang.HiddenFieldProp, 56 ) ;				}			}} ;		case 'ImageButton' :			return {			AddItems : function( menu, tag, tagName )			{				if ( tagName == 'INPUT' && tag.type == 'image' )				{					menu.AddSeparator() ;					menu.AddItem( 'ImageButton', FCKLang.ImageButtonProp, 55 ) ;				}			}} ;		case 'Button' :			return {			AddItems : function( menu, tag, tagName )			{				if ( tagName == 'INPUT' && ( tag.type == 'button' || tag.type == 'submit' || tag.type == 'reset' ) )				{					menu.AddSeparator() ;					menu.AddItem( 'Button', FCKLang.ButtonProp, 54 ) ;				}			}} ;		case 'Select' :			return {			AddItems : function( menu, tag, tagName )			{				if ( tagName == 'SELECT' )				{					menu.AddSeparator() ;					menu.AddItem( 'Select', FCKLang.SelectionFieldProp, 53 ) ;				}			}} ;		case 'Textarea' :			return {			AddItems : function( menu, tag, tagName )			{				if ( tagName == 'TEXTAREA' )				{					menu.AddSeparator() ;					menu.AddItem( 'Textarea', FCKLang.TextareaProp, 52 ) ;				}			}} ;		case 'BulletedList' :			return {			AddItems : function( menu, tag, tagName )			{				if ( FCKSelection.HasAncestorNode('UL') )				{					menu.AddSeparator() ;					menu.AddItem( 'BulletedList', FCKLang.BulletedListProp, 27 ) ;				}			}} ;		case 'NumberedList' :			return {			AddItems : function( menu, tag, tagName )			{				if ( FCKSelection.HasAncestorNode('OL') )				{					menu.AddSeparator() ;					menu.AddItem( 'NumberedList', FCKLang.NumberedListProp, 26 ) ;				}			}} ;	}	return null ;}
meta: 1235	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1235/c3e806dd2e80d30e5028083f65e626da8d5acba4/fck_contextmenu.js/buggy/reference/library/src/webapp/editor/FCKeditor/editor/_source/internals/fck_contextmenu.js