/*v12*/ function selezio(){sele_input(document.f.imp_num,document.f.enteSel);}; function seleid(){sele_select(document.f.imp_num,document.f.enteSel);}; function sele_input(obj_input,obj_select){obj_input.value=obj_select[obj_select.selectedIndex].value;}; function sele_select(obj_input,obj_select){no= true;for (var i=0;i < obj_select.length;i++){if (obj_select[i].value == obj_input.value){obj_select[i].selected=true;no=false;}}if (no){obj_input.value="";obj_select[0].selected=true;}}; function controllaCampi(){isCampiOk=true;return isCampiOk;}; function disableSubmit(idButton,idImageWorking){$(idButton).disabled='true';/*new Effect.Puff(idButton);new Effect.Appear(idImageWorking);*//*$(idImageWorking).style.display='block'*/}; function customSubmit(){ try{ if(controllaCampi()){document.f.submit();disableSubmit('BTN_ACCEDI','progressLogin')}; }catch(e){ alert(e.message); } } function busyBox(){document.getElementById('schermata').style.visibility = 'hidden';var prog = document.getElementById('inProgress'); html_code = '


Richiesta in Elaborazione
Attendere prego.

';prog.innerHTML = html_code; if((''+window.location).indexOf('#')==-1){window.location=window.location+'#';}else{window.location=window.location;};document.getElementById('inProgress').style.display = 'block';} function unloadPage(metodo) {/*if (window.event) {if (window.event.clientX < 0 && window.event.clientY < 0) {eval(metodo);}}window.self.close;*/} function commonAction(formName,controllerUrl,dispatchMethod){ document.forms[formName].action = controllerUrl; document.forms[formName].dispatch.value = dispatchMethod; document.forms[formName].submit(); } function commonAction(formId,dispatchMethod){ //alert('commonAction'); document.forms[formId].dispatch.value = dispatchMethod; document.forms[formId].submit(); } function submitForm(formId,submitId,_target,isConfirm,messaggioconferma){ //alert('formId:'+formId); var formCorrente=$(formId); //alert(formCorrente.id); try{ if(isConfirm!=''){ if(confirm(messaggioconferma)){ eval('formCorrente.'+submitId+'.name=_target;'); formCorrente.submit(); } }else{ eval('formCorrente.'+submitId+'.name=_target;'); // alert(eval('formCorrente.'+submitId+'.name')); formCorrente.submit(); } }catch(e){ alert(e.message); } } function eseguiAzione(formId,dispatchMethod,id,valore){ //alert('eseguiAzione: formId:'+formId+'\n'+'dispatchMethod:'+dispatchMethod+'\n'+'id:'+id+'\n'+'valore:'+valore+'\n'); document.getElementById(id).value = valore; document.forms[formId].dispatch.value = dispatchMethod; document.forms[formId].submit(); } function eseguiAzione2(formId,dispatchMethod,id1,valore1,id2,valore2){ //alert('eseguiAzione: formId:'+formId+'\n'+'dispatchMethod:'+dispatchMethod+'\n'+'id1:'+id1+'\n'+'valore1:'+valore1+'\n'+'id2:'+id2+'\n'+'valore2:'+valore2+'\n'); try{ document.getElementById(id1).value = valore1; document.getElementById(id2).value = valore2; document.forms[formId].dispatch.value = dispatchMethod; document.forms[formId].submit(); }catch(e){ alert(e.message); } } function eseguiAzione3(formId,dispatchMethod,id1,valore1,id2,valore2, id3, valore3){ //alert('eseguiAzione: formId:'+formId+'\n'+'dispatchMethod:'+dispatchMethod+'\n'+'id1:'+id1+'\n'+'valore1:'+valore1+'\n'+'id2:'+id2+'\n'+'valore2:'+valore2+'\n'); try{ document.getElementById(id1).value = valore1; document.getElementById(id2).value = valore2; document.getElementById(id3).value = valore3; document.forms[formId].dispatch.value = dispatchMethod; document.forms[formId].submit(); }catch(e){ alert(e.message); } } function eseguiAzione4(formId,dispatchMethod,id1,valore1,id2,valore2, id3, valore3, id4, valore4){ //alert('eseguiAzione: formId:'+formId+'\n'+'dispatchMethod:'+dispatchMethod+'\n'+'id1:'+id1+'\n'+'valore1:'+valore1+'\n'+'id2:'+id2+'\n'+'valore2:'+valore2+'\n'); try{ document.getElementById(id1).value = valore1; document.getElementById(id2).value = valore2; document.getElementById(id3).value = valore3; document.getElementById(id4).value = valore4; document.forms[formId].dispatch.value = dispatchMethod; document.forms[formId].submit(); }catch(e){ alert(e.message); } } function modificaTipologia(formId,id,valore){ //alert('MoficicaTipologia: formId:'+formId+'\n'+'id:'+id+'\n'+'valore:'+valore+'\n'); eseguiAzione(formId,'toModificaTipologia',id,valore); } function modificaCampione(formId,id,valore){ //alert('MoficicaTipologia: formId:'+formId+'\n'+'id:'+id+'\n'+'valore:'+valore+'\n'); eseguiAzione(formId,'toModificaCampione',id,valore); } function modificaQuestionario(formId,id1,valore1,id2,valore2){ eseguiAzione2(formId,'toModificaQuestionario',id1,valore1,id2,valore2); } function modificaRilevazione(formId,id1,valore1,id2,valore2, id3, valore3){ eseguiAzione3(formId,'toModificaRilevazione',id1,valore1,id2,valore2, id3, valore3); } function modificaIndice(formId,id1,valore1,id2,valore2, id3, valore3, id4, valore4){ eseguiAzione4(formId,'toModificaIndice',id1,valore1,id2,valore2, id3, valore3, id4, valore4); } function commonActionNoDispatch(formName,controllerUrl){document.forms[formName].action = controllerUrl;document.forms[formName].submit();} function commonActionWithConfirm(formName,controllerUrl,dispatchMethod,messaggioconferma){ if(confirm(messaggioconferma)){commonAction(formName,controllerUrl,dispatchMethod)}} function commonActionWithConfirm(formName,dispatchMethod,messaggioconferma){ if(confirm(messaggioconferma)){commonAction(formName,dispatchMethod)}} function effettoMenu(idDivMenu){try{new Effect.BlindDown(document.getElementById(idDivMenu), {duration:0.5});}catch(err){/*se nessun gruppo � selezionato*/}} function aggiornaFormReport(){ document.IdForm.dispatch.value='aggiornaForm';document.IdForm.submit(); } function aggiornaFormReportNoTarget(){ $('IdForm').target=''; document.IdForm.dispatch.value='aggiornaForm';document.IdForm.submit(); } function aggiornaFormReportConcardCambioTipoPeriodoNoTarget(){ $('IdForm').target=''; $('cambioTipoPeriodo').value=true; document.IdForm.dispatch.value='aggiornaForm';document.IdForm.submit(); } function redirectSplittingUrl(formName,controllerUrl){ splitUrlInFormInput(controllerUrl,formName); document.forms[formName].method = 'POST'; document.forms[formName].submit(); } function chiamataAsincrona(inUrl,target){ var url = inUrl; alert("url chiamata:"+url); // notice the use of a proxy to circumvent the Same Origin Policy. new Ajax.Updater(target, url, {evalScripts:true,onLoading:function(request){busyBox();},onFailure:function(request){alert('Si � verificato un errore sul server!')},onComplete:function(request){hideProgress()}}); } function selezioneGruppoFunzione(formName,controllerUrl,codGruppo,codFunzione){ document.forms[formName].codGruppo.value=codGruppo;document.forms[formName].codFunzione.value=codFunzione;commonActionNoDispatch(formName,controllerUrl); } function selezioneFunzione(url,formName){ //alert('url:'+url);alert('formName:'+formName); splitUrlInFormInput(url,formName); document.forms[formName].method = 'POST';document.forms[formName].submit(); } function filtraVista(url,formName,dataFiltro){ document.forms[formName].dataFiltro.value=document.forms['formAzione'].dataFiltro.value; splitUrlInFormInput(url,formName); document.forms[formName].method = 'POST'; document.forms[formName].submit(); } /**Parte dal presupposto che il form abbia i parametri di input presenti nella url*/ function splitUrlInFormInput(url,formName){ //alert(url); var debug=''; if (url.indexOf("?")>0){ parts = url.split("?"); var formCorrente=document.getElementById(formName); formCorrente.action=parts[0]; params = parts[1].split("&"); debug=debug+"attributo:controller,valore:"+formCorrente.action+'\n'; for(i = 0; i < params.length; i++){ if(params[i].indexOf("=")>0){p = params[i].split("=");eval('formCorrente.'+p[0]+'.value =p[1]'); //debug=debug+("attributo:"+p[0]+",valore:"+'formCorrente.'+p[0]+'.value+'\n'); //alert(p[0]+":"+eval('formCorrente.'+p[0]+'.value')); } } } //alert(debug); } function makeVisible(element){ document.getElementById(element).style.display = 'block'; } function makeHidden(element){ document.getElementById(element).style.display = 'none'; } /*Navigation*/ function indietro(){history.back();} // Funzionalita di invio alla pagina di inserimento di una nuova eccezione utente function vaiUrl(target, action){ new Ajax.Updater(target, action, {evalScripts:true,onLoading:function(request){busyBox();},onFailure:function(request){alert('Si � verificato un errore sul server!');hideProgressWithDelay(100);},onComplete:function(request){hideProgressWithDelay(100);}}); } /* Submit generico con serializzazione dei parametri del form e scelta del metodo http da utilizzare. target->div che deve ospitare il risultato della elaborazione formId->id del form del quale deve essere eseguito il submit action->azione eseguire (url) httpMethod->metodo http che deve essere usato messageConfirm->messaggio di conferma (se � vacante il messaggio di conferma non viene considerato */ function hideProgress(){document.getElementById('schermata').style.visibility = 'visible';document.getElementById('inProgress').style.display = 'none';} function hideProgressWithDelay(delayMsec){window.setTimeout("hideProgress()", delayMsec);} function hideProgressExport(){window.setTimeout("hideProgress()", 3000);} function submitGenericoFromUrl(target,formId,url,httpMethod){ document.getElementById(formId).method = httpMethod; new Ajax.Updater(target, url, {evalScripts:true, parameters:Form.serialize(document.getElementById(formId)),onLoading:function(request){/*busyBox();*/},onFailure:function(request){alert('Si � verificato un errore sul server!')},onComplete:function(request){hideProgressWithDelay(100)}}); } function submitGenericoFromUrlwithConfirm(target,formId,url,httpMethod,confirmMessage){ if(confirm(confirmMessage)){ submitGenericoFromUrl(target,formId,url,httpMethod); }else{hideProgressWithDelay(50);} } function textCounter(field, countfield, maxlimit) { if (field.value.length > maxlimit) field.value = field.value.substring(0, maxlimit); else countfield.value = maxlimit - field.value.length; } function showDiv(elementIdDaScoprire,elementDaControllare,valoreDiControllo/*valori_separati_virgola*/){ //alert(elementIdDaScoprire +"-"+elementDaControllare.value+"-"+valoreDiControllo); if(elementDaControllare.value == valoreDiControllo){document.getElementById(elementIdDaScoprire).style.display = 'block';}else{document.getElementById(elementIdDaScoprire).style.display = 'none';}; } function hideDiv(elementIdDaScoprire,elementDaControllare,valoreDiControllo/*valori_separati_virgola*/){ //alert(elementIdDaScoprire +"-"+elementDaControllare.value+"-"+valoreDiControllo); if(elementDaControllare.value == valoreDiControllo){document.getElementById(elementIdDaScoprire).style.display = 'none';}else{document.getElementById(elementIdDaScoprire).style.display = 'block';}; } function showDivPiuValori(elementIdDaScoprire,elementDaControllare,valoreDiControllo/*valori_separati_virgola*/){ var valoriControllo=valoreDiControllo.split(','); //alert("valoriControllo:"+valoriControllo); if(valoriControllo.length == undefined){ if(elementDaControllare.value == valoreDiControllo){document.getElementById(elementIdDaScoprire).style.display = 'block';}else{document.getElementById(elementIdDaScoprire).style.display = 'none';}; } else{var isVisible=false; for(var i=0;i -1)) return true; // decimal point // else if ((keychar == ".") && (myfield.value.indexOf(".")==-1)) // return true; else return false; } function numberInputFilterWithComma(myfield, e, dec) { try{ var key; var keychar; if (window.event) key = window.event.keyCode; else if (e) key = e.which; else return true; keychar = String.fromCharCode(key); // control keys if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) ) return true; // numbers else if ((("0123456789-").indexOf(keychar) > -1)) return true; // decimal point else if ((keychar == ",") && (myfield.value.indexOf(",")==-1)) return true; else return false; }catch(e){ alert(e.message); } } function numberInputFilterNoCommaNoSign(myfield, e, dec) { var key; var keychar; if (window.event) key = window.event.keyCode; else if (e) key = e.which; else return true; keychar = String.fromCharCode(key); // control keys if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) ) return true; // numbers else if ((("0123456789").indexOf(keychar) > -1)) return true; // decimal point //else if ((keychar == ",") && (myfield.value.indexOf(",")==-1)) // return true; else return false; } function showAndHide(targetId, parId, parSrcMinus, parSrcPlus) {if (document.getElementById) { target = document.getElementById(targetId); par = document.getElementById(parId); if (target.style.display == "none"){target.style.display = "block"; par.src = parSrcMinus; } else { target.style.display = "none"; par.src = parSrcPlus } } } function resetCalendar(tagId){ tag = document.getElementById(tagId);tag.value = '';} function reportConcardSelezionaImpresa(impresa,formId){ try{ document.forms[formId].action='reportEstConcard.htmx'; document.forms[formId].outMediaType.value=0; document.forms[formId].idreport.value = 130; if(impresa==9999999999){ document.forms[formId].tipoImpresa.value = 0; }else{ document.forms[formId].tipoImpresa.value = 50; } document.forms[formId].impresaSelCodice.value = impresa; //commonAction(formId,'reportEstrazioneConcardImp.htmx','richiamaAltroReport'); document.forms[formId].submit(); hideProgress(); }catch(e){ alert(e.message); } } function ritornaConcardRiepilogoImprese(formId){ try{ //alert('ritornaConcardRiepilogoImprese'); document.forms[formId].action='reportEstrazioneConcardImp.htmx'; document.forms[formId].dispatch.value='reportWindow'; document.forms[formId].method = 'POST'; for(i=0;i<2;i++){ if(document.forms[formId].radioMediaType[i].value == 0){ document.forms[formId].radioMediaType[i].checked=true; } } document.getElementById(formId).target=''; document.forms[formId].submit(); hideProgress(); }catch(e){ alert(e.message); } } function evidenziaRigaTabellaAlPassaggio(idTabella){ if(document.getElementById(idTabella)==undefined){ return } //var idTabellatr="'#"+idTabella+"tr'"; //var idTabellatr='#report tr'; var idTabellatr='#'+idTabella+' tr'; $$(idTabellatr).each(function(item,index) { item.observe('mouseover', function() { item.setStyle({ backgroundColor: '#ffd040' }); }); item.observe('mouseout', function() { if(index%2!=0){ item.setStyle({backgroundColor: '#FFFFFF' }); }else{ item.setStyle({backgroundColor: '#e9edf8' }); } }); }); } function evidenziaRigaTabellaAlPassaggioClickRiga(idTabella){ if(document.getElementById(idTabella)==undefined){ return } //var idTabellatr="'#"+idTabella+"tr'"; //var idTabellatr='#report tr'; var idTabellatr='#'+idTabella+' tr'; $$(idTabellatr).each(function(item,index) { item.observe('mouseover', function() { item.setStyle({ backgroundColor: '#ffd040' , cursor:'hand'}); }); item.observe('mouseout', function() { if(index%2!=0){ item.setStyle({backgroundColor: '#e9edf8' }); }else{ item.setStyle({backgroundColor: '#FFFFFF' }); } }); item.observe('click', function() { tds=$(item).getElementsByTagName('td'); try{ for (i=0;i" + " "+ codice + " " + ragSocShort+"" + "
" + ""; panelEditPartecipe.close(); // Repaint DIV Partecipi // document.getElementById("idPartecipi").style.height="151px"; //document.getElementById("idPartecipi").style.height="150px"; } function in_array (needle, haystack) { var key = '' for (key in haystack) { if (haystack[key] == needle) { return true; } } return false; } function copiaEntiSelezionati(idDaDiv, idADiv){ if(document.getElementById(idDaDiv)==undefined){ alert('Non trovato ' + idDaDiv); return; } if(document.getElementById(idADiv)==undefined){ alert('Non trovato ' + idADiv); return; } numPart = document.getElementById("numeroPartecipi"); conta = parseInt(numPart.value); divDa = document.getElementById(idDaDiv); divA = document.getElementById(idADiv); messaggio = ""; try{ var presenti=new Array(); // Carico l'elenco degli enti gi� presenti for (p=1;p<=conta;p++){ selez = document.getElementById("elencoPartecipiSelezionati"+p); if(selez != null) presenti[p]=selez.value; else presenti[p]="0"; } // Copio gli enti nei partecipi for (i=0;i0){ alert("I seguenti enti non sono stati associati ai partecipi perch� gi� presenti:\n\r\n\r"+messaggio); } } function eliminaSelezionati(idADiv){ if(document.getElementById(idADiv)==undefined){ alert('Non trovato ' + idADiv); return; } numPart = document.getElementById("numeroPartecipi"); conta = parseInt(numPart.value); divA = document.getElementById(idADiv); try{ for (i=0;i return false; }catch(e){ alert(e.message); } } function numericoOnKeyPress(campo,evento){ try{ setStatoModificaQuesito(false); return (numberInputFilterWithComma(campo,evento)); }catch(e){ alert(e.message); } } function showMultiSelection(){ select = document.getElementById('tipoQuesito'); if(select.options[select.selectedIndex].value == "05"){ document.getElementById('multipleFieldDiv').style.display='inline'; }else{ document.getElementById('multipleFieldDiv').style.display='none'; document.getElementById('multiple').style.display='none'; } } function addMultipleSelection(){ number = document.getElementById('multipleField').value; htmlString = 'Valore ' + '' + ' Descrizione ' + '
'; result = ""; for(i = 0; i < number; i++){ result = result + htmlString; } document.getElementById('multiple').style.display='block'; document.getElementById('multiple').innerHTML = result; }