<!--
var timerID = 0;

function ajax(url,divId) {

clearTimeout(timerID);

    dojo.io.bind({
    url: url,
    handle: function(status, data){
        if(status == "load"){
            myDiv = document.getElementById(divId);
            myDiv.innerHTML = data;
        }else if(status == "error"){
            alert('Erro ao recuperar os resultados');
        }else{
            alert('Tipo de resposta desconhecido: ' + status);
        }       
    },
    mimetype: "text/html",
    ransport: "XMLHTTPTransport"
});
}

function ajup(url,divId) {
	var e = "";
  	var a = document.getElementById("albIDx");
  	var b = document.getElementById("arqIDx");
  	
	e += (a.value == "") ? "Error !\r\n" : "";
	e += (b.value == "") ? "Ao menos um arquivo precisa ser selecionado!\r\n Você pode selecionar mais de um arquivo pressionando a tecla Ctrl!" : "";
	
	var opcoes = "";
	if (e == "") {
		for(i=0; i < b.length; i++){
			if(b.options[i].selected){
				opcoes += b.options[i].value+",";
			}
		}
		ajax('deleteWhichArquivo.do?albID='+a.value+'&arqID='+opcoes,'albArqUp');
	} else {
		window.alert(e);
	}
}

function ajupx(url,divId) {
	var e = "";
  	var a = document.getElementById("midIDx");
  	var b = document.getElementById("arqIDx");
  	
	e += (a.value == "") ? "Error !\r\n" : "";
	e += (b.value == "") ? "Ao menos um arquivo precisa ser selecionado!\r\n Você pode selecionar mais de um arquivo pressionando a tecla Ctrl!" : "";
	
	var opcoes = "";
	if (e == "") {
		for(i=0; i < b.length; i++){
			if(b.options[i].selected){
				opcoes += b.options[i].value+",";
			}
		}
		ajax('deleteWhichArquivoAudio.do?midID='+a.value+'&arqID='+opcoes,'midArqUp');
	} else {
		window.alert(e);
	}
}
//-->
