/******************************************************************************\ |************************** MODULO AGENDA *******************************| |********** SCRIPT REFERENTE A CAIXA DE INCLUSAO DE PARTICIPANTES ************| \******************************************************************************/ // Variaveis Locais var select_in = document.getElementById('user_list'); var select_out = document.getElementById('user_list_in'); var users_out = select_out ? select_out.cloneNode(true) : ''; var finderTimeout = ''; // Funcoes function showExParticipants(el,path){ document.getElementById('tbl_ext_participants').style.display=''; el.style.display='none'; } function hideExParticipants(el,path){ document.getElementById('a_ext_participants').style.display = ''; document.getElementById('tbl_ext_participants').style.display ='none'; } function optionFinderTimeout(obj){ clearTimeout(finderTimeout); var oWait = document.getElementById("wait"); oWait.innerHTML = 'Buscando...'; finderTimeout = setTimeout("optionFinder('"+obj.id+"')",500); } function optionFinder(id) { var oWait = document.getElementById("wait"); var oText = document.getElementById(id); for(var i = 0;i < select_out.options.length; i++) select_out.options[i--] = null; for(i = 0; i < users_out.length; i++){ if(users_out[i].text.substring(0 ,oText.value.length).toUpperCase() == oText.value.toUpperCase()) { sel = select_out.options; option = new Option(users_out[i].text,users_out[i].value); sel[sel.length] = option; } } oWait.innerHTML = ' '; } function rem() { for(var i = 0;i < select_in.options.length; i++) if(select_in.options[i].selected) select_in.options[i--] = null; } function show_disponibility() { participants = ""; combo = document.getElementById('user_list'); if(combo.length==0) { alert('set the participants'); return; } for (i=0;i