function confirmDelete(formName) { if (confirm("L'operazione di cancellazione è irreversibile. Vuoi continuare?")) { window.document.forms[formName].submit(); } } function findAndSelect(formName,controlName,table) { var url; url = "/spiritin/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 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'); } /* 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]+=((xxx)-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 = event.y-38; if (ns||ie) Delay(); } else { active = false; } }