checklists = function() {
var text_object = document.getElementsByClassName('checklisttext');
var box_object = document.getElementsByClassName('checklistbox');
var input_object = document.getElementsByClassName('checklistinput');


for (var i = 0; i < text_object.length; ++i) {
	var j = i+1;
	text_object[i].id = "nummer"+j+"text";
	text_object[i].writeAttribute('for', "nummer"+j+"box") ;
	box_object[i].id = "nummer"+j+"box";
	box_object[i].writeAttribute('name', "nummer"+j+"box") ;
	var s=text_object[i].innerHTML;
	input_object[i].writeAttribute('value', s) ;
	input_object[i].writeAttribute('name', "nummer"+j+"input") ;
	input_object[i].id = "nummer"+j+"input";
}

}

Event.observe(window, 'load', checklists, false);
