imgmapCommand_GetState=function() {if (FCK.EditMode!=FCK_EDITMODE_WYSIWYG) return FCK_TRISTATE_DISABLED;var A=FCK.Selection.GetSelectedElement();if (A&&A.tagName=='IMG'){if (!FCK.IsRealImage(A)){return FCK_TRISTATE_DISABLED;};if (A.getAttribute('usemap')) return FCK_TRISTATE_ON;return FCK_TRISTATE_OFF;};return FCK_TRISTATE_DISABLED;};FCKCommands.RegisterCommand('imgmapPopup',new FCKDialogCommand(FCKLang.imgmapDlgName,FCKLang.imgmapDlgTitle,FCKPlugins.Items['imgmap'].Path+'popup.html',750,580,imgmapCommand_GetState));var imgmapButton=new FCKToolbarButton('imgmapPopup',FCKLang.imgmapBtn,null,null,false,true);if (/\/editor\/skins\/(.*)\//.test(FCKConfig.SkinPath)) imgmapButton.IconPath=FCKPlugins.Items['imgmap'].Path+'images/icon_'+RegExp.$1+'.gif';else imgmapButton.IconPath=FCKPlugins.Items['imgmap'].Path+'images/editor_icon.gif';FCKToolbarItems.RegisterItem('imgmapPopup',imgmapButton);FCK.ContextMenu.RegisterListener({AddItems:function(A,B,C) {if (FCK.IsRealImage(B)){A.AddItem('imgmapPopup',FCKLang.imgmapDlgTitle,imgmapButton.IconPath);}}});
