function setLabel(){
	
	this.Labels = null; //vetor de Labels
	this.xmlFile = null; 
	this.tagNamesEnabled = ['SPAN', 'INPUT', 'DIV', 'P', 'A', 'LABEL'];
	
	//metodo para leitura do arquivo xml
	this.loadXML = function(){
		var xmlDoc = this.xmlFile;
		if (window.XMLHttpRequest){
			xhttp=new XMLHttpRequest();
			}else{
				xhttp=new ActiveXObject("Msxml2.DOMDocument");
			}
		xhttp.open("GET",xmlDoc,false);
		xhttp.send("");
		xhttp.close
		return xhttp.responseXML;
	},
	
	this.writeLabel = function(){
		
		var xml = this.loadXML();
		var Labels = this.Labels;
		var tagsEmb = this.tagNamesEnabled;
		
		//verifica se a quantidade Labels e a mesma que indices
		if (Labels.length == 2){
			var arrA = Labels[0];
			var arrB = Labels[1];
			//verifica o tamanho dos vetores
			if(arrA.length == arrB.length){
				for(i=0; i<arrA.length; i++){
				
					//percorrer por todas as tags habilitadas
					for (x=0; x<tagsEmb.length; x++){
						//percorre atras da tag...	
						var tags = document.getElementsByTagName(tagsEmb[x]);	
						for(y=0;y<tags.length;y++){
							var elName = tags[y].getAttribute("name");				
							try{
								if(elName==arrA[i]){								
									if(tagsEmb[x]== 'INPUT'){
										tags[y].value = xml.getElementsByTagName('value')[arrB[i]].childNodes[0].nodeValue;
									}else{
										tags[y].innerHTML = xml.getElementsByTagName('value')[arrB[i]].childNodes[0].nodeValue;
									}
								}
							}catch(err){
								return false
							}
						}
					}					
				}
			}else{
				alert('A quantidade de rotulos para valores são diferentes');
				return false;
			}
		}else{
			alert('Rótulos ou valores não definidos');
			return false;
		}
	}
	
}

/*
Tabela de erros

SL#003 = o vetor Labels é > ou < que 2;
SL#004 = numero de indices entre os vetores [0] e [1] são diferentes;
*/
