<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<html>
<head>
<title>Blog Entry Categories</title>

<script language="javascript" src="../../Shared/MM/Scripts/CMN/ccBlogMetaDataStrings.js">

function receiveArguments(newcategory)
{

	// Delete the enclosure meta-tag by inserting a blank value          
        dw.getDocumentDOM().insertBlogMetaTag(TEMPLATE_ENCLOSURE, "");
	//Update the workspace manager UI
	CCWorkspaceManager.getManager(dw.getDocumentDOM()).updateUI();
    	return;
}

function canAcceptCommand()
{
	if((CCWorkspaceManager.getManager(dw.getDocumentDOM()) != null) && 
	   (CCWorkspaceManager.getManager(dw.getDocumentDOM()).isBlogSite()) &&
	   (CCWorkspaceManager.getManager(dw.getDocumentDOM()).getState() == 'edit') &&
	   (CCWorkspaceManager.getManager(dw.getDocumentDOM()).shouldUseDefaultEditor()) )
	{
		// Check if there is an enclosure tag in the document
		// Check if the document contains a value enclosure meta-tag
	        theDom = dw.getDocumentDOM();
	        metatags = theDom.getElementsByTagName("meta");
	        count = metatags.length;
                var enclosureVal;
	        var foundEnclosure = 0;
	        for (i = 0; i < count; i++)
		{ 
			if (metatags[i].name == TEMPLATE_ENCLOSURE)
		        {
		            enclosureVal = metatags[i].content;
		            if(enclosureVal.length > 0)
		                foundEnclosure = 1; // Meta-tag contains content
		            break;
		        }
		}
		if (!foundEnclosure) // No enclosure exists... disable the menu
			return false;
		else // Found enclosure.... enable the menu
			return true;
	}
	else
		return false;
		
}
</script>
</head>

<body>
</body>
</html>


