/************************************************************/
/*                  SCRIPT PROGRAMMA MUTUO                  */
/************************************************************/

function openmutuo(){ //Define arbitrary function to run desired DHTML Window widget codes
ajaxwin=dhtmlwindow.open("mutuo", "iframe", "mutuo.php", "#Studio Menichetti: Calcola Mutuo", "width=710px,height=400px,resize=0,scrolling=1,center=0", "recal")

ajaxwin.onclose=function(){return window.confirm("Chiudere il programma?")} //Run custom code when window is about to be closed
}


/************************************************************/
/*             SCRIPT  PROGRAMMA VALORE NORMALE             */
/************************************************************/

function openvalorenormale(){ //Define arbitrary function to run desired DHTML Window widget codes
ajaxwin1=dhtmlwindow.open("valorenormale", "iframe", "valnormale.php", "#Studio Menichetti: Calcola Valore Normale", "width=710px,height=400px,resize=0,scrolling=1,center=0", "recal")

ajaxwin1.onclose=function(){return window.confirm("Chiudere il programma?")} //Run custom code when window is about to be closed
}


/************************************************************/
/*             SCRIPT  PROGRAMMA CODICE FISCALE             */
/************************************************************/

function opencf(){ //Define arbitrary function to run desired DHTML Window widget codes
ajaxwin2=dhtmlwindow.open("codicefiscale", "iframe", "codfisc.php", "#Studio Menichetti: Calcola Codice Fiscale", "width=710px,height=400px,scrolling=1,center=0", "recal")

ajaxwin2.onclose=function(){return window.confirm("Chiudere il programma?")} //Run custom code when window is about to be closed
}


/************************************************************/
/*                SCRIPT PROGRAMMA ABI E CAB                */
/************************************************************/

function openabicab(){ //Define arbitrary function to run desired DHTML Window widget codes
ajaxwin3=dhtmlwindow.open("abicab", "iframe", "abicab.php", "#Studio Menichetti: Cerca ABI e CAB", "width=710px,height=400px,scrolling=1,center=0", "recal")

ajaxwin3.onclose=function(){return window.confirm("Chiudere il programma?")} //Run custom code when window is about to be closed
}


/************************************************************/
/*               SCRIPT PROGRAMMA PARTITA IVA               */
/************************************************************/

function openpi(){ //Define arbitrary function to run desired DHTML Window widget codes
ajaxwin4=dhtmlwindow.open("PI", "iframe", "verificapi.php", "#Studio Menichetti: Verifica Partita IVA", "width=710px,height=400px,scrolling=1,center=0", "recal")

ajaxwin4.onclose=function(){return window.confirm("Chiudere il programma?")} //Run custom code when window is about to be closed
}

/************************************************************/
/*               SCRIPT  PROGRAMMA BOLLO AUTO               */
/************************************************************/

function openbollo(){ //Define arbitrary function to run desired DHTML Window widget codes
ajaxwin5=dhtmlwindow.open("Bollo", "iframe", "bolloauto.php", "#Studio Menichetti: Calcola Bollo on-line", "width=710px,height=400px,scrolling=1,center=0", "recal")

ajaxwin5.onclose=function(){return window.confirm("Chiudere il programma?")} //Run custom code when window is about to be closed
}


/************************************************************/
/*                   SCRIPT  MAPPA GOOGLE                   */
/************************************************************/

//<![CDATA[

    function load() {
      if (GBrowserIsCompatible()) {
            
			// codice di setCenter, ecc.
    
        // Crea un nuovo marker nel punto specificato 
        //   con una descrizione HTML associata
        function createMarker(point, description) {
          var marker = new GMarker(point);
          GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml(description);
          });
          return marker;
        }
			
            // Ottiene l'elemento della pagina chiamato "map" (il DIV) 
            //   e crea la mappa utilizzandolo come contenitore.
            var map = new GMap2(document.getElementById("map"));                
            
            // Aggiunge dei controlli per lo zoom e lo spostamento 
            map.addControl(new GSmallMapControl());	            
            
            // Centra la mappa su Roma, con uno zoom di 5 
            map.setCenter(new GLatLng(43.768126,11.114752), 12);
			
			map.addOverlay(
            createMarker(new GLatLng(43.768126,11.114752), "<div align=\"left\"><font face=\"Verdana\" size=\"2\"><b>Studio Commerciale Menichetti</b><br>Via A. Gramsci, 113-115<br>50055 Lastra a Signa (Firenze)</font></div>")
        );  
			
        }
    }

    //]]>


/************************************************************/
/*                   SCRIPT  SEGNALA SITO                   */
/************************************************************/

var good;
function checkEmailAddress(field) {
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
if (goodEmail){
   good = true
} else {
   alert('Inserire un indirizzo e-mail valido.')
   field.focus();
   field.select();
   good = false;
  }
}

u = window.location;
// u = url;
m = "Ti segnalo questo sito";
function mailThisUrl(){
   good = false
   checkEmailAddress(document.eMailer.address)
   if (good){
      window.location = "mailto:"+document.eMailer.address.value+"?subject="+m+"&body="+document.title+" "+u;
   }
}
// -->
	
/************************************************************/
