function excluirArquivo(name, metodo, div, params) {
	$.ajax({
		type: "POST",
		url: urlController+'/'+metodo,
		data: params,
		success: function(msg){
			$("#"+name).val("");
			$("#"+div).html(msg);
		}
	});
}

function carregarCombo(el, url, params, msg_carregando, msg_padrao, msg_nenhum) {
	removeOptionAll(el);
	if(params.id != '') {
		addOption(el, '', msg_carregando);		
		$.getJSON(url, params, function(json){
			removeOptionAll(el);
			addOption(el, '', msg_padrao);		
			$.each(json.data, function(key, val) {
				addOption(el, key, val);
	        });
		});
	}
	else {
		addOption(el, '', msg_nenhum);
	}
}

function addOption(el, value, text) {
	var elementOption = document.createElement('option');
	elementOption.text = text;
	elementOption.value = value;

	try {
		el.add(elementOption, null); // standards compliant; doesn't work in IE
	}
	catch(ex) {
		el.add(elementOption); // IE only
	}
}

function removeOptionAll(el) {
	for (var i = el.length - 1; i>=0; i--) {
		removeOption(el, i);
	}
}

function removeOption(el, i) {
	el.remove(i);
}

function MM_changeProp(objId,x,theProp,theValue) { //v9.0
  var obj = null; with (document){ if (getElementById)
  obj = getElementById(objId); }
  if (obj){
    if (theValue == true || theValue == false)
      eval("obj.style."+theProp+"="+theValue);
    else eval("obj.style."+theProp+"='"+theValue+"'");
  }
}