mbols[nCntr]))
			SUPPORTED.add(oOption);
		else
			NOT_SUPPORTED.add(oOption);
	}

	SUPPORTED.selectedIndex = 0;
	NOT_SUPPORTED.selectedIndex = 0;
	EnableDisableButtons();

	if (window.external.FindSymbol("COMPOSITE_CONTROL") ||
		window.external.FindSymbol("HTML_CONTROL"))
		Misc.className = "inactivelink";
}

function Next(document, linkto)
{
	window.external.Next(document, linkto);
}

function OnFinish(document)
{
	if (window.external.FindSymbol("SHORT_NAME").length == 0)
	{
		var L_ErrMsg1_Text = "Need to specify a short name.";
		window.external.ReportError(L_ErrMsg1_Text);
		Next(document, "default.htm");
		return;
	}

	OnWizFinish(document);
}

function OnSelectOne(bSelect)
{
	var lstFrom;
	var lstTo;
	if (bSelect)
	{
		lstFrom = NOT_SUPPORTED;
		lstTo = SUPPORTED;
	}
	else
	{
		lstFrom = SUPPORTED;
		lstTo = NOT_SUPPORTED;
	}
	var nSelectedIndex = lstFrom.selectedIndex;

	if (nSelectedIndex < 0)
		return false;

	// check for IPropertyNotifySink
	if (bSelect)
	{
		var strInterface = lstFrom.options[nSelectedIndex].text;
		if (strInterface == "IPropertyNotifySink" && !window.external.FindSymbol("CONNECTION_POINTS"))
		{
			var L_ErrMsg2_Text = "IPropertyNotifySink requires Connection Point support which will now be added. Do you want to continue?";
			if (!window.external.YesNoAlert(L_ErrMsg2_Text))
				return false;
			window.external.AddSymbol("CONNECTION_POINTS", true);
		}
	}

	var oOption = document.createElement("OPTION");
	var strValue = lstFrom.options[nSelectedIndex].value
	oOption.value = strValue;
	oOption.text = lstFrom.options[nSelectedIndex].text;

	//Figure out where to add new item
	for (nCntr = 0; nCntr < lstTo.length; nCntr++)
	{
		if (oOption.text < lstTo.options[nCntr].text)
		{
			lstTo.add(oOption, nCntr);
			break;
		}
	}
	if (nCntr == lstTo.length)
		lstTo.add(oOption);

	window.external.AddSymbol(strValue, bSelect);
	lstFrom.remove(nSelectedIndex);
	lstFrom.selectedIndex = (nSelectedIndex >= lstFrom.length) ? lstFrom.length-1 : nSelectedIndex;

	EnableDisableButtons();
}

function OnSelectAll(bSelect)
{
	NOT_SUPPORTED.length = 0;
	SUPPORTED.length = 0;

	for (var nCntr = 0; nCntr < aryInterfaceSymbols.length; nCntr++)
	{
		var oOption = document.createElement("OPTION");
		oOption.value = aryInterfaceSymbols[nCntr];
		oOption.text = aryInterfaceNames[nCntr];

		if (bSelect)
		{
			if (aryInterfaceNames[nCntr] == "IPropertyNotifySink" && !window.external.FindSymbol("CONNECTION_POINTS"))
			{
				var L_ErrMsg2_Text = "IPropertyNotifySink requires Connection Point support which will now be added. Do you want to continue?";
				if (!window.external.YesNoAlert(L_ErrMsg2_Text))
				{
					NOT_SUPPORTED.add(oOption);
					continue;
				}
				window.external.AddSymbol("CONNECTION_POINTS", true);
			}
			SUPPORTED.add(oOption);
		}
		else
			NOT_SUPPORTED.add(oOption);

		window.external.AddSymbol(aryInterfaceSymbols[nCntr], bSelect);
	}
	EnableDisableButtons();
}	

function EnableDisableButtons()
{
	if (NOT_SUPPORTED.length)
		SELECT_ALL.disabled = false;
	else
		SELECT_ALL.disabled = true;

	if (SUPPORTED.length)
		DESELECT_ALL.disabled = false;
	else
		DESELECT_ALL.disabled = true;

	if (NOT_SUPPORTED.selectedIndex != -1)
		SELECT_ONE.disabled = false;
	else
		SELECT_ONE.disabled = true;

	if (SUPPORTED.selectedIndex != -1)
		DESELECT_ONE.disabled = false;
	else
		DESELECT_ONE.disabled = true;
}

var aryInterfaceSymbols = new Array();
aryInterfaceSymbols[0] = "DATA_OBJECT";
aryInterfaceSymbols[1] = "OBJECT_WITH_SITE";
aryInterfaceSymbols[2] = "OBJECT_SAFETY";
aryInterfaceSymbols[3] = "PERSIST_STORAGE";
aryInterfaceSymbols[4] = "PERSIST_STREAM_INIT";
aryInterfaceSymbols[5] = "PROPERTY_NOTIFY_SINK";
aryInterfaceSymbols[6] = "PROVIDE_CLASS_INFO2";
aryInterfaceSymbols[7] = "QUICK_ACTIVATE";
aryInterfaceSymbols[8] = "SERVICE_PROVIDER";
aryInterfaceSymbols[9] = "SPECIFY_PROPERTY_PAGES";
aryInterfaceSymbols[10] = "SUPPORT_ERROR_INFO";

var aryInterfaceNames = new Array();
aryInterfaceNames[0] = "IDataObject";
aryInterfaceNames[1] = "IObjectWithSite";
aryInterfaceNames[2] = "IObjectSafety";
aryInterfaceNames[3] = "IPersistStorage";
aryInterfaceNames[4] = "IPersistStreamInit";
aryInterfaceNames[5] = "IPropertyNotifySink";
aryInterfaceNames[6] = "IProvideClassInfo2";
aryInterfaceNames[7] = "IQuickActivate";
aryInterfaceNames[8] = "IServiceProvider";
aryInterfaceNames[9] = "ISpecifyPropertyPages";
aryInterfaceNames[10] = "ISupportErrorInfo";

</SCRIPT>
<SCRIPT ID="INCLUDE_SCRIPT" LANGUAGE="JSCRIPT"></SCRIPT>
<SCRIPT ID="INCLUDE_COMMON" LANGUAGE="JSCRIPT"></SCRIPT>
<SCRIPT>
	document.scripts("INCLUDE_SCRIPT").src = window.external.FindSymbol("SCRIPT_COMMON_PATH") + "/Script.js";
	document.scripts("INCLUDE_COMMON").src = window.external.FindSymbol("SCRIPT_COMMON_PATH") + "/Common.js";
</SCRIPT>
