var counter = 10;
var links = document.getElementsByTagName("a");
var questions = new Array();
var answers = new Array();
for (var i = 0; i < links.length; i++) {
	if (links[i].getAttribute("class") == "question") {questions[questions.length] = links[i];}
	if (links[i].getAttribute("class") == "answer") {answers[answers.length] = links[i];}
}
for (var i = 0; i < questions.length; i++) {
	counter += 1
	questions[i].setAttribute("href", "#" + (counter/10));
	answers[i].setAttribute("name", (counter/10));
}