/*v24*/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 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 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 aggiornaFormReportSicNoTarget(){ $('IdForm').target=''; $('cambioTipoPeriodo').value=false; document.IdForm.dispatch.value='aggiornaForm';document.IdForm.submit(); } function aggiornaFormReportSitaNoTarget(){ $('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){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!')},onComplete:function(request){hideProgress()}}); } /* 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!');hideProgressWithDelay(100);},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;else return false}; function numberInputFilterWithSlash(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 numberInputFilterWithComma(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); hideProgress(); } } 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); hideProgress(); } } function reportSicSelezionaImpresa(impresa,formId){ try{ document.forms[formId].action='reportEstSic.htmx'; document.forms[formId].outMediaType.value=0; document.forms[formId].idreport.value = 140; 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); hideProgress(); } } function ritornaSicRiepilogoImprese(formId){ try{ //alert('ritornaConcardRiepilogoImprese'); document.forms[formId].action='reportEstSicImp.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){ hideProgress(); 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 evidenziaRigaTabellaAlPassaggioReportIVASS(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: '#e9edf8' }); }else{ item.setStyle({backgroundColor: '#FFFFFF' }); } }); }); } function modificaHeader(idTabella){ if(document.getElementById(idTabella)==undefined){ return } var dimBordoGrosso='2px'; var idTabellath='#'+idTabella+' th'; var numeroColonne=0; $$(idTabellath).each(function(item, index) { numeroColonne=index; }); $$(idTabellath).each(function(item, index) { for(j=0;j<9;j++){ if(index==numeroColonne){ item.setStyle({ backgroundColor: '#e9edf8', borderLeftColor: 'black', borderRightColor: 'black', borderRightWidth:dimBordoGrosso ,borderLeftWidth:dimBordoGrosso}); } if(index==numeroColonne-1 || index==numeroColonne-2 || index==numeroColonne-3){ item.setStyle({ backgroundColor: '#FFFFFF'}); if(index==numeroColonne-3){ item.setStyle({borderLeftColor: 'black',borderLeftWidth:dimBordoGrosso }); } } if(index==numeroColonne-4 || index==numeroColonne-5 || index==numeroColonne-6 || index==numeroColonne-7){ item.setStyle({ backgroundColor: '#e9edf8'}); } if(index==numeroColonne-8 ){ item.setStyle({ backgroundColor: '#FFFFFF',borderLeftColor: 'black', borderRightColor: 'black', borderRightWidth:dimBordoGrosso ,borderLeftWidth:dimBordoGrosso}); } } }); } 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: '#FFFFFF' }); }else{ item.setStyle({backgroundColor: '#e9edf8' }); } }); item.observe('click', function() { tds=$(item).getElementsByTagName('td'); try{ for (i=0;i