function checkMenuItem (page){ document.getElementById(page).style.backgroundImage="url('img/selected_menu.gif')"; document.getElementById(page).style.color="#14343F"; } function checkMenuItem1 (page){ document.getElementById(page).style.backgroundImage="url('img/selected_menu1.gif')"; document.getElementById(page).style.color="#000000"; } function calcola_risparmio(){ var I3 =50; var I4 =4; var I5 =2; var I6 =1; var F2 = 50; var F3 = document.getElementById("F3").value; var F4 = document.getElementById("F4").value; var F5 = document.getElementById("F5").value; var F6 = document.getElementById("F6").value; var F11 = document.getElementById("F11").value; var F12 = document.getElementById("F12").value; var F13 = document.getElementById("F13").value; var F14 = document.getElementById("F14").value; var F15 = document.getElementById("F15").value; var F16 = document.getElementById("F16").value; //var F17 = document.getElementById("F17").value; var F18 = document.getElementById("F18").value; var G11 = document.getElementById("G11").value; var G12 = document.getElementById("G12").value; var G13 = document.getElementById("G13").value; var G14 = document.getElementById("G14").value; var G15 = document.getElementById("G15").value; var G16 = document.getElementById("G16").value; //var G17 = document.getElementById("G17").value; var G18 = document.getElementById("G18").value; F11=1*I3/100*F5*F4*F6/100*20; F12=I4/100*F5*F4*20; F13=I5*F5*F4*20/100; F14=I6*F5*F4*20/100; F15=F11+F12+F13+F14; F16=45; //F17=40; //F18=F15-F16-F17; F18=F15-F16; F18=(F18<0)?0:F18; G11=F11*F3; G12=F12*F3; G13=F13*F3; G14=F14*F3; G15=F15*F3; G16=F16*F3; //G17=F17*F3; G18=F18*F3; document.getElementById("F11").value=F11; document.getElementById("F12").value=F12; document.getElementById("F13").value=F13; document.getElementById("F14").value=F14; document.getElementById("F15").value=F15; document.getElementById("F16").value=F16; //document.getElementById("F17").value=F17; document.getElementById("F18").value=F18; document.getElementById("G11").value=G11; document.getElementById("G12").value=G12; document.getElementById("G13").value=G13; document.getElementById("G14").value=G14; document.getElementById("G15").value=G15; document.getElementById("G16").value=G16; //document.getElementById("G17").value=G17; document.getElementById("G18").value=G18; } function showToolTip(e,text){ if(document.all)e = event; var obj = document.getElementById('bubble_tooltip'); var obj2 = document.getElementById('bubble_tooltip_content'); obj2.innerHTML = text; obj.style.display = 'block'; var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop); if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0; var leftPos = e.clientX - 100; if(leftPos<0)leftPos = 0; obj.style.left = leftPos + 'px'; obj.style.top = e.clientY - obj.offsetHeight -1 + st + 'px'; } function hideToolTip() { document.getElementById('bubble_tooltip').style.display = 'none'; } function checkAddresses() { if (document.getElementById('phone').value=="" && document.getElementById('email').value=="" && document.getElementById('hometel').value=="" ){ alert('Se non riempi almeno un campo, non ha senso!'); }else{ valid[0].deactivate(); } } function showCoverage(list) { var country = list[list.selectedIndex].value; country = country.replace("&","e1"); var doc = window.document; doc.getElementById('coverage').innerHTML=''; doc.getElementById('coverage').style.visibility='visible'; var myConn = new XHConn(); if (!myConn) alert("XMLHTTP not available. Try a newer/better browser."); var fnWhenDone = function (oXML) { var country_coverage=oXML.responseText; doc.getElementById('coverage').innerHTML= country_coverage; }; myConn.connect("comunicazione-pazienti-internazionale.php", "GET","country="+ country, fnWhenDone); } /** XHConn - Simple XMLHTTP Interface - bfults@gmail.com - 2005-04-08 ** ** Code licensed under Creative Commons Attribution-ShareAlike License ** ** http://creativecommons.org/licenses/by-sa/2.0/ **/ function XHConn() { var xmlhttp, bComplete = false; try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; }}} if (!xmlhttp) return null; this.connect = function(sURL, sMethod, sVars, fnDone) { if (!xmlhttp) return false; bComplete = false; sMethod = sMethod.toUpperCase(); try { if (sMethod == "GET") { xmlhttp.open(sMethod, sURL+"?"+sVars, true); sVars = ""; } else { xmlhttp.open(sMethod, sURL, true); xmlhttp.setRequestHeader("Method", "POST "+sURL+" HTTP/1.1"); xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); } xmlhttp.onreadystatechange = function(){ if (xmlhttp.readyState == 4 && !bComplete) { bComplete = true; fnDone(xmlhttp); }}; xmlhttp.send(sVars); } catch(z) { return false; } return true; }; return this; }