﻿
function AddFav(communityid, url)
{
	var operations=document.getElementById('operations');
	if (operations == null) {
		window.location = url;
		return;
	}
	var topicobject=document.getElementById('hiddentopicid');
	if (topicobject == null)
		document.getElementById('topicid').value=0;
	else
		document.getElementById('topicid').value=topicobject.value;
	document.getElementById('communityid').value=communityid;
	document.getElementById('page').value=1;
	document.getElementById('uk').value='forums';
	
	operations.style.display='none';
	document.frmfav.target="_self";
	document.frmfav.action='/bbs/Favtopic.cfm';
	document.frmfav.submit();
}