var arr = document.anchors;
var ret = "";
for (var i = 0; i < arr.length; i++)
{
	var a = arr[i];
	var name = a.name;
	if (name && name != "")
	{
		ret += "\n" + name;		
		continue;
	}
	var id = a.id;
	if (id && id != "")
	{
		ret += "\n" + id;
	}
}
ret;
