function writeTopicHeader(topicID, tabNames, isSubscribed)	{
	document.write('<table width="100%"><tr><td>');
	if (supportsFlash())	{
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" ID=topicTabs WIDTH=250 HEIGHT=20>');
 		document.write('<PARAM NAME=movie VALUE="/includes/flash/tabs250.swf"> <PARAM NAME="flashvars" VALUE="tabs=' + tabNames + '&selected=Topic"> <PARAM NAME=quality VALUE=high >');
		document.write('<PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="/includes/flash/tabs250.swf" FLASHVARS="tabs=' + tabNames + '&selected=Topic" quality=high bgcolor=#FFFFFF  WIDTH=250 HEIGHT=20 name="topicTabs" swLiveConnect="true" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>');
	}
	document.write('</td><td align="right">');
	if (isSubscribed)	{
		document.write('<a href="/topics/unsubscribe.cfm?topicID=' + topicID + '"><strong>Remove from Your Topics</strong>');
	} else {
		document.write('<a href="/topics/subscribe.cfm?topicID=' + topicID + '"><strong>Add To Your Topics</strong>');
	}
	document.write('</td></tr></table>');
}

function setTab(tabName)	{
	document.location.href = '/search/product/listAll.cfm/keyword/'+ keyword;
}

function setKeyword(word)	{
	keyword = word;
}

function deleteTopic(topicID, topicName)	{
	x = confirm('Are you sure you want to delete this topic?');
	if (x)	{
		document.location.href = '/topics/editor.cfc?method=deleteTopic&topicID=' + topicID + '&topicName='+ escape(topicName);
	}
}

function renderPanel(topicID, topicName, isSubscribed, canEdit)	{
	document.write('<div class="portletTitle"><strong>Topic</strong> TASKS</div>');
	/*
	document.write('<a href="/topics/rss.cfm?ID=' + topicID + '" title="RSS Feed">RSS Feed</a> <a href="/topics/rss.cfm?ID=' + topicID + '"><img src="/images/icons/rss.gif" border="0" align="middle"></a><br>');
	if (isSubscribed)	{
		document.write('<a href="/topics/unsubscribe.cfm?topicID=' + topicID + '" title="Remove this from Your Topics">Remove this from Your Topics</a><br>');
	} else {
		document.write('<a href="/topics/subscribe.cfm?topicID=' + topicID + '" title="Add this to Your Topics">Add this to Your Topics</a><br>');
	}
	* */
	if (canEdit)	{
		document.write('<a href="/topics/editTopic.cfm?topicID=' + topicID + '">Edit Topic</a><br>');
		document.write('<a href="javascript:deleteTopic(\'' + topicID + '\',\''+topicName + '\')">Delete Topic</a><br>');
		document.write('<a href="/topics/addRelation.cfm?topicID=' + topicID + '&topicName=' + escape(topicName) + '">Add a Topic Relation</a><br>');
		document.write('<a href="/topics/addLink.cfm?topicID=' + topicID + '">Add a Link/Resource</a><br><br>');
		document.write('<a href="/topics/addTopic.cfm">Add a New Topic</a><br>');
	}
}