filtersDef = Rows("DataSetFilter");

if (filtersDef>0)
{
	ooMap = {};
	maxSite = 0;
	for (k=0; k<filtersDef; k=k+1)
	{
		GetString (fName, DataSetFilter, k);
		ExecuteCommands ("GetDataInfo(ooOrder,"+fName+",1);");
		ooMap[k] = ooOrder;
		for (k2 = Columns(ooOrder)-1; k2>=0;k2=k2-1)
		{
			if (ooOrder[k2]>maxSite)
			{
				maxSite = ooOrder[k2];
			}
		}
	}
	
	maxSite = (1+maxSite)/3;
	
	siteMap = {maxSite,1};
	
	for (k=0; k<maxSite; k=k+1)
	{
		siteMap[k] = -1;
	}


	for (k=0; k<filtersDef; k=k+1)
	{
		ooOrder = ooMap[k];
		for (k2 = Columns(ooOrder)-3; k2>=0;k2=k2-3)
		{
			k3 = ooOrder[k2];
			siteMap[k3/3] = k;
		}
	}
	
	_labels = {{"Site"}};

	OpenWindow (CHARTWINDOW,{{"Site Assignments"}
						   {"_labels"},
						   {"siteMap"},
						   {"Bar Chart"},
						   {"Index"},
						   {"Site"},
						   {""},
						   {""},
						   {""},
						   {"0"}},
						   "SCREEN_WIDTH-60;SCREEN_HEIGHT-50;30;50");
}
					  
