var alphabetList = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'Other'];
document.write("<table width='619' border='0' cellspacing='0' cellpadding='0'><tr><td class='block1'>");

for(var i=0;i<alphabetList.length;i++)
{
	if(exchange=='all')
	{
		var lcCount = eval("lc_ny_name_"+alphabetList[i]+"_count") + eval("lc_ar_name_"+alphabetList[i]+"_count") + eval("lc_eu_name_"+alphabetList[i]+"_count") + eval("lc_al_name_"+alphabetList[i]+"_count");
		var alphabetAllNameLink = "/about/listed/lc_all_name_"+alphabetList[i]+".html";
		if(alphabetList[i]==currentAlphabet)
		{
			document.write("<strong>"+alphabetList[i]+"&nbsp;&nbsp;</strong>");
		}
		else 
		{
			if(lcCount==0)
			{
				document.write("<font color='lightgrey'>"+alphabetList[i]+"</font>&nbsp;&nbsp;");
			}
			else
			{
				document.write("<a href='"+alphabetAllNameLink+"'>"+alphabetList[i]+"</a>&nbsp;&nbsp;");
			}
		}
	}
	else if(exchange=='nyse')
	{
		var alphabetAllNameLink = "";
		var query = window.location.search.substring(1);
		var sListedComp = getQueryVariable("ListedComp", query);
		
		if (sListedComp == null) 
		{
			sListedComp = "All";
		}

		var lcCount = eval("lc_ny_name_"+alphabetList[i]+"_count");
		var lcUSCount = eval("lc_ny_name_"+alphabetList[i]+"_uscount");
		var lcOtherCount = eval("lc_ny_name_"+alphabetList[i]+"_othercount");
		
		if (sLstComp =="All")
			alphabetAllNameLink = "/about/listed/lc_ny_name_"+alphabetList[i]+".html?ListedComp=All";
		
		if (sLstComp =="US")
			alphabetAllNameLink = "/about/listed/lc_ny_name_"+alphabetList[i]+".html?ListedComp=US";

		if (sLstComp =="NONUS")
			alphabetAllNameLink = "/about/listed/lc_ny_name_"+alphabetList[i]+".html?ListedComp=NONUS";
		
		if(alphabetList[i]==currentAlphabet)
		{
			document.write("<strong>"+alphabetList[i]+"&nbsp;&nbsp;</strong>");
		}
		else 
		{
			if (sLstComp =="All")
			{
				if(lcCount == 0)
					document.write("<font color='lightgrey'>"+alphabetList[i]+"</font>&nbsp;&nbsp;");
				else
					document.write("<a href='"+alphabetAllNameLink+"'>"+alphabetList[i]+"</a>&nbsp;&nbsp;");
			}
			else if (sLstComp =="US")
			{
				if(lcUSCount == 0)
					document.write("<font color='lightgrey'>"+alphabetList[i]+"</font>&nbsp;&nbsp;");
				else
					document.write("<a href='"+alphabetAllNameLink+"'>"+alphabetList[i]+"</a>&nbsp;&nbsp;");
			}
			else if (sLstComp =="NONUS")
			{
				if(lcOtherCount == 0)
					document.write("<font color='lightgrey'>"+alphabetList[i]+"</font>&nbsp;&nbsp;");
				else
					document.write("<a href='"+alphabetAllNameLink+"'>"+alphabetList[i]+"</a>&nbsp;&nbsp;");
			}
		}
	}
	else if(exchange=='arca')
	{
		var lcCount = eval("lc_ar_name_"+alphabetList[i]+"_count");
		var alphabetAllNameLink = "/about/listed/lc_ar_name_"+alphabetList[i]+".html";
		if(alphabetList[i]==currentAlphabet)
		{
			document.write("<strong>"+alphabetList[i]+"&nbsp;&nbsp;</strong>");
		}
		else 
		{
			if(lcCount==0)
			{
				document.write("<font color='lightgrey'>"+alphabetList[i]+"</font>&nbsp;&nbsp;");
			}
			else
			{
				document.write("<a href='"+alphabetAllNameLink+"'>"+alphabetList[i]+"</a>&nbsp;&nbsp;");
			}
		}
	}
	else if(exchange=='euro')
	{
		var lcCount = eval("lc_eu_name_"+alphabetList[i]+"_count");
		var alphabetAllNameLink = "/about/listed/lc_eu_name_"+alphabetList[i]+".html";
		if(alphabetList[i]==currentAlphabet)
		{
			document.write("<strong>"+alphabetList[i]+"&nbsp;&nbsp;</strong>");
		}
		else 
		{
			if(lcCount==0)
			{
				document.write("<font color='lightgrey'>"+alphabetList[i]+"</font>&nbsp;&nbsp;");
			}
			else
			{
				document.write("<a href='"+alphabetAllNameLink+"'>"+alphabetList[i]+"</a>&nbsp;&nbsp;");
			}
		}
	}
	else if(exchange=='alter')
	{
		var lcCount = eval("lc_al_name_"+alphabetList[i]+"_count");
		var alphabetAllNameLink = "/about/listed/lc_al_name_"+alphabetList[i]+".html";
		if(alphabetList[i]==currentAlphabet)
		{
			document.write("<strong>"+alphabetList[i]+"&nbsp;&nbsp;</strong>");
		}
		else 
		{
			if(lcCount==0)
			{
				document.write("<font color='lightgrey'>"+alphabetList[i]+"</font>&nbsp;&nbsp;");
			}
			else
			{
				document.write("<a href='"+alphabetAllNameLink+"'>"+alphabetList[i]+"</a>&nbsp;&nbsp;");
			}
		}
	}
}
document.write("</td></tr></table>");
