// JavaScript Document


var nbCompetence = 2;

/***************************************/
/*  Ajouter Ligne Tableau compétences  */
/*************************************/

function Ajouter_Competences(){
	
	var ligne = document.createElement ('tr');
	
	//cellule 1
	var cell1 = document.createElement ('td');
	cell1.setAttribute('height','20');
	//cell1.setAttribute('colSpan','2');
	
	var texte = document.createTextNode (' ');
	
	cell1.appendChild (texte);
	
	//cellule 2
	var cell2 = document.createElement ('td');
	cell2.setAttribute('width','208');
	
	var input_texte = document.createElement('INPUT');
	input_texte.setAttribute('type','text');
	input_texte.setAttribute('name','Logiciel'+nbCompetence+'');
	input_texte.setAttribute('id','Logiciel'+nbCompetence+'');
	input_texte.setAttribute('className','');
	input_texte.setAttribute('size','37');
	
	cell2.appendChild (input_texte);
	
	//cellule 3
	var cell3 = document.createElement ('td');
	var texte = document.createTextNode (' ');
	
	cell3.appendChild (texte);
	
	//cellule 4
	var cell4 = document.createElement ('td');
	var texte = document.createTextNode (' ');
	
	cell4.appendChild (texte);
	
	//cellule niveau
	var cellniv = document.createElement ('td');
	var texte = document.createTextNode (' ');
	
	cellniv.appendChild (texte);
	
	
	//cellule 5
	var cell5 = document.createElement ('td');
	
	var input_check1 = document.createElement('INPUT');
	input_check1.setAttribute('type','checkbox');
	input_check1.setAttribute('name','Niv1'+nbCompetence+'');
	input_check1.setAttribute('value','Vrai');
	input_check1.setAttribute('id','Niveau'+nbCompetence+'');
	input_check1.setAttribute('className','radio');//IE
	input_check1.setAttribute('class','radio');
	var texte_input_check1 = document.createTextNode (' 1 ');
	
	var input_check2 = document.createElement('INPUT');
	input_check2.setAttribute('type','checkbox');
	input_check2.setAttribute('name','Niv2'+nbCompetence+'');
	input_check2.setAttribute('value','Vrai');
	input_check2.setAttribute('id','Niveau'+nbCompetence+'');
	input_check2.setAttribute('className','radio');//IE
	input_check2.setAttribute('class','radio');
	var texte_input_check2 = document.createTextNode (' 2 ');
	
	var input_check3 = document.createElement('INPUT');
	input_check3.setAttribute('type','checkbox');
	input_check3.setAttribute('name','Niv3'+nbCompetence+'');
	input_check3.setAttribute('value','Vrai');
	input_check3.setAttribute('id','Niveau'+nbCompetence+'');
	input_check3.setAttribute('className','radio');//IE
	input_check3.setAttribute('class','radio');
	var texte_input_check3 = document.createTextNode (' 3 ');
	
	
	
	cell5.appendChild (input_check1);
	cell5.appendChild (texte_input_check1);
	cell5.appendChild (input_check2);
	cell5.appendChild (texte_input_check2);
	cell5.appendChild (input_check3);
	cell5.appendChild (texte_input_check3);
	
	//cellule 6
	var cell6 = document.createElement ('td');
	var texte = document.createTextNode (' ');
	
	cell6.appendChild (texte);
	
	
	//cellule 7
	var cell7 = document.createElement ('td');
	var input_texte2 = document.createElement('INPUT');
	
	input_texte2.setAttribute('type','text');
	input_texte2.setAttribute('name','Tarif_Jour'+nbCompetence+'');
	input_texte2.setAttribute('id','Tarif_Jour'+nbCompetence+'');
	input_texte2.setAttribute('className','');
	
	cell7.appendChild (input_texte2);
	
	
	
	ligne.appendChild(cell1);
	ligne.appendChild(cell2);
	ligne.appendChild(cell3);
	ligne.appendChild(cell4);
	ligne.appendChild(cellniv);
	ligne.appendChild(cell5);
	ligne.appendChild(cell6);
	ligne.appendChild(cell7);
	
	if(cherche_navigateur()=="IE"){
		document.getElementById ('Competence').lastChild.appendChild (ligne);
	}
	else{
		document.getElementById('Competence').appendChild (ligne); 
	}

	document.getElementById('NB_Competence').value = nbCompetence;
	nbCompetence++;
}
