function confirmDeleteAndGo() { if (confirm("L'operazione di cancellazione è irreversibile. Vuoi continuare?")) { return true; } else { return false; } } function confirmDelete(formName) { if (confirm("L'operazione di cancellazione è irreversibile. Vuoi continuare?")) { window.document.forms[formName].submit(); } } function confirmDeleteMessage(formName, text) { if (confirm(text)) { window.document.forms[formName].submit(); } } function findAndSelect(formName,controlName,table) { var url; url = "/ap/main.php?page=search&target="+table+"&fn="+formName+"&cn="+controlName+"&search=" + window.document.forms[formName].elements[controlName+"_cerca"].value; myWindow = window.open(url, "Elenco","dependent=yes,width=400,height=500,scrollbars=yes"); } function openAndChoose(baseurl,formName,controlName) { var url; url = baseurl+'&formname='+formName+'&controlname='+controlName; myWindow = window.open(url, "Elenco","dependent=yes,width=720,height=600,scrollbars=yes,status=no,location=no"); } function setScelta(formName,selectName,id) { var i = 0; var numoptions = window.opener.document.forms[formName].elements[selectName].length; while (i < numoptions && id!=window.opener.document.forms[formName].elements[selectName].options[i].value) { i++; } if (i < numoptions) { window.opener.document.forms[formName].elements[selectName].options[i].selected = true; } window.close(); } function setValore(formName,textName,val) { window.opener.document.forms[formName].elements[textName].value = val; window.close(); } function setValue(formName,controlName1,value1,controlName2,value2) { window.opener.document.forms[formName].elements[controlName1].value = value1; window.opener.document.forms[formName].elements[controlName2].value = value2; window.close(); } function vai(destination) { //window.document.location.replace(destination); window.document.location = destination; } function openDetail(url) { var nuovaFinestra; nuovaFinestra = window.open(url,'nuovaFinestra'); } function openNew(url) { var nuovaFinestra; nuovaFinestra = window.open(url,'nuovaFinestra', "dependent=yes,width=340,height=276,scrollbars=no,location=no"); } /* chiude la popup e redirige all'indirizzo indicato */ function closeAndGo(url) { window.opener.document.location = url; window.close(); } /* Testa se la lunghezza del testo contenuto sia uguale a quella passata e passa il fuoco all'elemento corrente + offset */ function changeFocusOffset (InputObj, InputLen, offset) { if (InputObj.value.length == InputLen) { var i; for (i = 0; i < InputObj.form.length; i++) if (InputObj.form.elements[i].name == InputObj.name) break; i += offset; if (i < InputObj.form.length) InputObj.form.elements[i].focus(); } } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i"; //""; Split=360/n; HandHeight=ClockHeight/4.5 HandWidth=ClockWidth/4.5 HandY=-7; HandX=-2.5; scrll=0; step=0.06; currStep=0; y=new Array();x=new Array();Y=new Array();X=new Array(); for (i=0; i < n; i++){y[i]=0;x[i]=0;Y[i]=0;X[i]=0} if (ns){ for (i=0; i < n; i++) document.write('
'+props+Face[i]+'
'); for (i=0; i < S.length; i++) document.write('
'+S[i]+'
'); for (i=0; i < M.length; i++) document.write('
'+M[i]+'
'); for (i=0; i < H.length; i++) document.write('
'+H[i]+'
'); } if (ie){ document.write('
'); for (i=0; i < n; i++) document.write('
'+props+Face[i]+'
'); document.write('
'); document.write('
'); for (i=0; i < H.length; i++) document.write('
'+H[i]+'
'); document.write('
'); document.write('
'); for (i=0; i < M.length; i++) document.write('
'+M[i]+'
'); document.write('
') document.write('
'); for (i=0; i < S.length; i++) document.write('
'+S[i]+'
'); document.write('
') } function ClockAndAssign(){ time = new Date (); secs = time.getSeconds(); sec = -1.57 + Math.PI * secs/30; mins = time.getMinutes(); min = -1.57 + Math.PI * mins/30; hr = time.getHours(); hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360; if (ie){ Of.style.top=window.document.body.scrollTop; Oh.style.top=window.document.body.scrollTop; Om.style.top=window.document.body.scrollTop; Os.style.top=window.document.body.scrollTop; } for (i=0; i < n; i++){ var F=(ns)?document.layers['nsFace'+i]:ieFace[i].style; if (active) { F.top=y[i] + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll; F.left=x[i] + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180); } else { F.left=-20; F.top=0; } } for (i=0; i < H.length; i++){ var HL=(ns)?document.layers['nsHours'+i]:ieHours[i].style; if (active) { HL.top=y[i]+HandY+(i*HandHeight)*Math.sin(hrs)+scrll; HL.left=x[i]+HandX+(i*HandWidth)*Math.cos(hrs); } else { HL.left=-20; HL.top=0; } } for (i=0; i < M.length; i++){ var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes[i].style; if (active) { ML.top=y[i]+HandY+(i*HandHeight)*Math.sin(min)+scrll; ML.left=x[i]+HandX+(i*HandWidth)*Math.cos(min); } else { ML.left=-20; ML.top=0; } } for (i=0; i < S.length; i++){ var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds[i].style; if (active) { SL.top=y[i]+HandY+(i*HandHeight)*Math.sin(sec)+scrll; SL.left=x[i]+HandX+(i*HandWidth)*Math.cos(sec); } else { SL.left=-20; SL.top=0; } } currStep-=step; } function Delay(){ scrll=(ns)?window.pageYOffset:0; y[0]=Math.round(Y[0]+=((yyy)-Y[0])*speed); x[0]=Math.round(X[0]+=((winwidth()/2+ClockWidth/2)-X[0])*speed); for (i=1; i < n; i++){ y[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed); x[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed); } ClockAndAssign(); if (active) { setTimeout('Delay()',20); } } function clock() { if (!active) { active = true; yyy = initialY; if (ns||ie) Delay(); } else { active = false; } function doScroll() { yyy = initialY-winOfy(); // window.alert(winOfy()) } window.onscroll = doScroll; } function cercaCollaboratore(formname, fieldcoll, idcoll, fieldprog) { var url; url = "?page=pickcollab&formname="+formname+"&fieldcoll="+fieldcoll+"&idcoll="+idcoll+"&fieldprog="+fieldprog; chooseWindow = window.open(url, "Sceltacollab", "dependent=yes,width=370,height=250,scrollbars=yes,resizable=yes,screenX=240,screenY=40,status=yes,toolbar=no,menubar=no,location=no"); } function setSceltaCollaboratore(formname,fieldcoll,valuecoll,idcoll,idvalue,fieldprog,valueprog) { window.opener.document.forms[formname].elements[fieldcoll].value = valuecoll; window.opener.document.forms[formname].elements[idcoll].value = idvalue; window.opener.document.forms[formname].elements[fieldprog].value = valueprog; window.close(); } function cercaColore(formname, fieldname) { var url; url = "?page=pickcolor&formname="+formname+"&fieldname="+fieldname; chooseWindow = window.open(url, "Sceltacolore", "dependent=yes,width=370,height=250,scrollbars=no,resizable=no,screenX=240,screenY=40,status=yes,toolbar=no,menubar=no,location=no"); } function setSceltaColore(formname,fieldname,colore) { window.opener.document.forms[formname].elements[fieldname].value = colore; window.close(); } function setVisibility(divids) { document.getElementById(divid).style.display = 'none'; } function setContrVisibility() { if(navigator.appName == 'Microsoft Internet Explorer'){ var vis = 'inline'; } else { var vis = 'table-row'; } if(document.forms['utente'].elements['id_tipogruppo_gruppo'].value == ''){ document.getElementById('divclie').style.display = vis; document.getElementById('divtipo').style.display = vis; } else if(document.forms['utente'].elements['id_tipogruppo_gruppo'].value == '1'){ document.getElementById('divclie').style.display = 'none'; document.getElementById('divtipo').style.display = 'none'; } else if(document.forms['utente'].elements['id_tipogruppo_gruppo'].value == '2'){ document.getElementById('divclie').style.display = 'none'; document.getElementById('divtipo').style.display = vis; } else if(document.forms['utente'].elements['id_tipogruppo_gruppo'].value == '3'){ document.getElementById('divclie').style.display = vis; document.getElementById('divtipo').style.display = vis; } } var searchString; function CreaOggetto() { var richiesta; var browser = navigator.appName; if (browser == 'Microsoft Internet Explorer') { richiesta = new ActiveXObject('Microsoft.XMLHTTP'); } else { richiesta = new XMLHttpRequest(); } return richiesta; } var http = CreaOggetto(); function cercaAree(macro) { tipologia = macro; http.open('GET', "/ap/custom/page/searcharea.php?tipologia="+macro, true); http.onreadystatechange = gestisciContenutoAnag; http.send(null); } function gestisciContenutoAnag() { if (http.readyState == 4) { var response = http.responseXML.documentElement; var lista = ''; var items; var index; items = response.getElementsByTagName('item'); if (items.length>0) { // ci sono nomi for(var i = 0; i < items.length; i++) { //index = items[i].attributes['id'].value; !non funzionava su explorer index = items[i].attributes[0].value; lista += 'items[i].firstChild.data'; document.forms['richiesta'].elements['prova'].value += items[i].firstChild.data; //lista += items[i].firstChild.data+'
'; } } else { // nessun riscontro lista = '
  Nessun riscontro per: '+searchString+''; } //document.forms['richiesta'].elements['prova'].value = lista; //writeDiv('lista', lista); } }