var countCurso = 1;

function createCurso() {
	var  div, label, inp, p;
	div = document.getElementById("cursos_aper");
	

	

	
	
	p = document.createElement("br");
	div.appendChild(p);
	
	/*primeiro campo formulario*/
	p = document.createElement("p");
	p.className = 'campo';
	label = document.createElement("label");
	label.setAttribute("for", "curso_aperfeicoamento_"+countCurso);
	label.appendChild(document.createTextNode("Curso:"));
	p.appendChild(label);
	inp = document.createElement("input");
	inp.setAttribute("id", "curso_aperfeicoamento_"+countCurso);
	inp.setAttribute("name", "curso_aperfeicoamento|multiple["+countCurso+"]");
	inp.setAttribute("type", "text");
	inp.setAttribute("size", "20");
	p.appendChild(inp);
	div.appendChild(p);
	
	/*segundo campo formulario*/
	p = document.createElement("p");
	p.className = 'campo';
	label = document.createElement("label");
	label.setAttribute("for", "instituicao_aperfeicoamento_"+countCurso);
	label.appendChild(document.createTextNode("Instituição:"));
	p.appendChild(label);
	inp = document.createElement("input");
	inp.setAttribute("id", "instituicao_aperfeicoamento_"+countCurso);
	inp.setAttribute("name", "instituicao_aperfeicoamento|multiple["+countCurso+"]");
	inp.setAttribute("type", "text");
	inp.setAttribute("size", "20");
	p.appendChild(inp);
	div.appendChild(p);
	
	/*Terceiro campo do formulário*/
	p = document.createElement("p");
	p.className = 'campo';
	label = document.createElement("label");
	label.setAttribute("for", "periodo_aperfeicoamento_"+countCurso);
	label.appendChild(document.createTextNode("Período:"));
	p.appendChild(label);
	inp = document.createElement("input");
	inp.setAttribute("id", "periodo_aperfeicoamento_"+countCurso);
	inp.setAttribute("name", "periodo_aperfeicoamento|multiple["+countCurso+"]");
	inp.setAttribute("type", "text");
	inp.setAttribute("size", "20");
	p.appendChild(inp);
	div.appendChild(p);
	
	/*Quarto campo do formulário*/
	p = document.createElement("p");
	p.className = 'campo';
	label = document.createElement("label");
	label.setAttribute("for", "carga_horaria_"+countCurso);
	label.appendChild(document.createTextNode("Carga Horária:"));
	p.appendChild(label);
	inp = document.createElement("input");
	inp.setAttribute("id", "carga_horaria_"+countCurso);
	inp.setAttribute("name", "carga_horaria|multiple["+countCurso+"]");
	inp.setAttribute("type", "text");
	inp.setAttribute("size", "20");
	p.appendChild(inp);
	div.appendChild(p);

	countCurso++;
}

