<!--	
function popup(miofile) {
						var stile = "top=10, left=100, width=630, status=no, menubar=no, toolbar=no";
						window.open (miofile, "", stile);
						}
	

function MakeArray(n) {

	this.length = n

	return this

}

monthNames = new MakeArray(12)

monthNames[1] = "Gennaio"

monthNames[2] = "Febbraio"

monthNames[3] = "Marzo"

monthNames[4] = "Aprile"

monthNames[5] = "Maggio"

monthNames[6] = "Giugno"

monthNames[7] = "Luglio"

monthNames[8] = "Agosto"

monthNames[9] = "Settembre"

monthNames[10] = "Ottobre"

monthNames[11] = "Novembre"

monthNames[12] = "Dicembre"

dayNames = new MakeArray(7)

dayNames[1] = "Domenica"

dayNames[2] = "Lunedì"

dayNames[3] = "Martedì"

dayNames[4] = "Mercoledì"

dayNames[5] = "Giovedì"

dayNames[6] = "Venerdì"

dayNames[7] = "Sabato"



function customDateString() {

	currentDate = new Date()

	var theDay = dayNames[currentDate.getDay() + 1]

	var theMonth = monthNames[currentDate.getMonth() + 1]

	msie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));

	if (msie4) {

	    var theYear = currentDate.getYear()

	}

	else {

	     var theYear = currentDate.getYear() +1900

	}

	return theDay + ", " + theMonth + " " + currentDate.getDate() + ", " + theYear

}

	function apri (miofile) {
						
						window.open (miofile,'Dati', 'width=800,height=400,left=10,top=100,scrollbars=yes');
	}

function nuovo(select) { 
if (select.value!= "new") return; 
var pato = prompt('Inserisci Nuova Voce:',''); 
if (!pato) return; 
var newOption = document.createElement("option"); 
newOption.value = pato; 
newOption.appendChild(document.createTextNode(pato)); 
select.insertBefore(newOption, select.lastChild); 
select.selectedIndex = select.options.length-2; 
} 

function Clicca(select)
   {
   
 if (select.value=="M")  {
 							femmina_1.style.visibility='hidden';
 							femmina_2.style.visibility='hidden';
 							femmina_3.style.visibility='hidden';
 							femmina_4.style.visibility='hidden';
							}
 if (select.value=="F")  {
 							femmina_1.style.visibility='visible';
 							femmina_2.style.visibility='visible';
 							femmina_3.style.visibility='visible';
 							femmina_4.style.visibility='visible';
							}
}

function Clicca_figli(selez,campo)
   {
   
 if (campo.checked==true)  selez.style.visibility='visible';
 if (campo.checked==false)  selez.style.visibility='hidden';

   }


function Clicca_no(selez,campo)
   {
   
 if (campo.checked==true)  selez.style.visibility='hidden';

   }

function clicca_e(select)
   {

 if (select.value=="Si")  eiaculazione_si.style.visibility='visible';
 if (select.value=="Si")  eiaculazione_1.style.visibility='visible';
 if (select.value=="Si")  eiaculazione_2.style.visibility='visible';
 if (select.value=="Si")  causa.style.visibility='hidden';
 if (select.value=="No")  eiaculazione_si.style.visibility='hidden';
 if (select.value=="No")  eiaculazione_1.style.visibility='hidden';
 if (select.value=="No")  eiaculazione_2.style.visibility='hidden';
 if (select.value=="No")  causa.style.visibility='visible';

}

function clicca_1(select,campo1,campo2,campo3,campo4)
   {

 if (select.value=="Si")  campo1.style.visibility='visible';
 if (select.value=="Si")  campo2.style.visibility='visible';
 if (select.value=="Si")  campo3.style.visibility='visible';
 if (select.value=="Si")  campo4.style.visibility='hidden';
 if (select.value=="No")  campo1.style.visibility='hidden';
 if (select.value=="No")  campo2.style.visibility='hidden';
 if (select.value=="No")  campo3.style.visibility='hidden';
 if (select.value=="No")  campo4.style.visibility='visible';

}

function tipo (select,campo) 
{
	if (select.value == "Eiaculazione Retrograda") campo.style.visibility='visible';
	if (select.value != "Eiaculazione Retrograda") campo.style.visibility='hidden';

}

function dosi(select)
   {
   
 if (select.value=="Caverject")  cav.style.visibility='visible';
 if (select.value=="Caverject")  cav1.style.visibility='visible';
 if (select.value=="Caverject")  cav2.style.visibility='visible';
 if (select.value=="Caverject")  cav3.style.visibility='visible';
 if (select.value=="Caverject")  cav4.style.visibility='visible';
 if (select.value=="Caverject")  cav5.style.visibility='visible';
 if (select.value=="Caverject")  cav6.style.visibility='visible';
 if (select.value=="Caverject")  cav7.style.visibility='visible';
 if (select.value!="Caverject")  cav.style.visibility='hidden';
 if (select.value!="Caverject")  cav1.style.visibility='hidden';
 if (select.value!="Caverject")  cav2.style.visibility='hidden';
 if (select.value!="Caverject")  cav3.style.visibility='hidden';
 if (select.value!="Caverject")  cav4.style.visibility='hidden';
 if (select.value!="Caverject")  cav5.style.visibility='hidden';
 if (select.value!="Caverject")  cav6.style.visibility='hidden';
 if (select.value!="Caverject")  cav7.style.visibility='hidden';

 if (select.value=="Viagra")  viag.style.visibility='visible';
 if (select.value=="Viagra")  viag1.style.visibility='visible';
 if (select.value=="Viagra")  viag2.style.visibility='visible';
 if (select.value=="Viagra")  viag3.style.visibility='visible';
 if (select.value=="Viagra")  viag4.style.visibility='visible';
 if (select.value=="Viagra")  dose.style.visibility='visible';
 if (select.value!="Viagra")  viag.style.visibility='hidden';
 if (select.value!="Viagra")  viag1.style.visibility='hidden';
 if (select.value!="Viagra")  viag2.style.visibility='hidden';
 if (select.value!="Viagra")  viag3.style.visibility='hidden';
 if (select.value!="Viagra")  viag4.style.visibility='hidden';

 if (select.value=="Cialis")  cial.style.visibility='visible';
 if (select.value=="Cialis")  cial1.style.visibility='visible';
 if (select.value=="Cialis")  cial2.style.visibility='visible';
 if (select.value!="Cialis")  cial.style.visibility='hidden';
 if (select.value!="Cialis")  cial1.style.visibility='hidden';
 if (select.value!="Cialis")  cial2.style.visibility='hidden';
 if (select.value=="Cialis")  dose.style.visibility='visible';

 if (select.value=="Levitra")  lev.style.visibility='visible';
 if (select.value=="Levitra")  lev1.style.visibility='visible';
 if (select.value=="Levitra")  lev2.style.visibility='visible';
 if (select.value=="Levitra")  lev3.style.visibility='visible';
 if (select.value!="Levitra")  lev.style.visibility='hidden';
 if (select.value!="Levitra")  lev1.style.visibility='hidden';
 if (select.value!="Levitra")  lev2.style.visibility='hidden';
 if (select.value!="Levitra")  lev3.style.visibility='hidden';
 if (select.value=="Levitra")  dose.style.visibility='visible';

 if (select.value=="Vivanza")  viv.style.visibility='visible';
 if (select.value=="Vivanza")  viv1.style.visibility='visible';
 if (select.value=="Vivanza")  viv2.style.visibility='visible';
 if (select.value=="Vivanza")  viv3.style.visibility='visible';
 if (select.value!="Vivanza")  viv.style.visibility='hidden';
 if (select.value!="Vivanza")  viv1.style.visibility='hidden';
 if (select.value!="Vivanza")  viv2.style.visibility='hidden';
 if (select.value!="Vivanza")  viv3.style.visibility='hidden';
 if (select.value=="Vivanza")  dose.style.visibility='visible';

 if (select.value=="Nessun farmaco")  dose.style.visibility='hidden';
 if (select.value=="Caverject")  dose.style.visibility='hidden';

   }

function clicca_consenso(select)
   {

 if (select.checked==true)  spontanea_1.style.visibility='visible';
 if (select.checked==true)  spontanea_2.style.visibility='visible';
 if (select.checked==true)  conferma.style.visibility='visible';
 if (select.checked==false)  spontanea_1.style.visibility='hidden';
 if (select.checked==false)  spontanea_2.style.visibility='hidden';
 if (select.checked==false)  portato_1.style.visibility='hidden';
 if (select.checked==false)  note_1.style.visibility='hidden';
 if (select.checked==false)  note_2.style.visibility='hidden';
 if (select.checked==false)  metodi.style.visibility='hidden';
 if (select.checked==false)  pa_prima_1.style.visibility='hidden';
 if (select.checked==false)  pa_prima_2.style.visibility='hidden';
 if (select.checked==false)  pa_dopo_1.style.visibility='hidden';
 if (select.checked==false)  pa_dopo_2.style.visibility='hidden';
 if (select.checked==false)  farmaci_1.style.visibility='hidden';
 if (select.checked==false)  aggiungi_prova_1.style.visibility='hidden';
 if (select.checked==false)  aggiungi_prova_2.style.visibility='hidden';
 if (select.checked==false)  visualizza_prove_1.style.visibility='hidden';
 if (select.checked==false)  visualizza_prove_2.style.visibility='hidden';
 if (select.checked==false)  conferma.style.visibility='hidden';
   
}


function clicca_note(select,campo1,campo2,campo3)
   {

 if (select.value=="Si")  campo1.style.visibility='visible';
 if (select.value=="Si")  campo2.style.visibility='visible';
 if (select.value=="Si")  campo3.style.visibility='visible';
 if (select.value=="Si")  pa_prima_1.style.visibility='visible';
 if (select.value=="Si")  pa_prima_2.style.visibility='visible';
 if (select.value=="Si")  pa_dopo_1.style.visibility='visible';
 if (select.value=="Si")  pa_dopo_2.style.visibility='visible';
 if (select.value=="Si")  farmaci_1.style.visibility='visible';
 if (select.value=="Si")  farmaci_2.style.visibility='visible';
 if (select.value=="Si")  farmaci_3.style.visibility='visible';
 if (select.value=="Si")  metodi.style.visibility='hidden';
 if (select.value=="Si")  aggiungi_prova_1.style.visibility='hidden';
 if (select.value=="Si")  aggiungi_prova_2.style.visibility='hidden';
 if (select.value=="Si")  visualizza_prove_1.style.visibility='hidden';
 if (select.value=="Si")  visualizza_prove_2.style.visibility='hidden';
 if (select.value=="No")  campo1.style.visibility='hidden';
 if (select.value=="No")  campo2.style.visibility='hidden';
 if (select.value=="No")  campo3.style.visibility='hidden';
 if (select.value=="No")  pa_prima_1.style.visibility='hidden';
 if (select.value=="No")  pa_prima_2.style.visibility='hidden';
 if (select.value=="No")  pa_dopo_1.style.visibility='hidden';
 if (select.value=="No")  pa_dopo_2.style.visibility='hidden';
 if (select.value=="No")  metodi.style.visibility='visible';
 if (select.value=="No")  farmaci_1.style.visibility='hidden';
 if (select.value=="No")  farmaci_2.style.visibility='hidden';
 if (select.value=="No")  farmaci_3.style.visibility='hidden';
   
}

function clicca_metodo(select,campo)
   {

 if (select.checked==true)  {
								if (campo == aggiungi_prova_1) aggiungi_prova_2.style.visibility='hidden';
								if (campo == aggiungi_prova_1) visualizza_prove_2.style.visibility='hidden';
								if (campo == aggiungi_prova_1) aggiungi_prova_1.style.visibility='visible';
								if (campo == aggiungi_prova_1) visualizza_prove_1.style.visibility='visible';
								if (campo == aggiungi_prova_2) aggiungi_prova_1.style.visibility='hidden';
								if (campo == aggiungi_prova_2) visualizza_prove_1.style.visibility='hidden';
								if (campo == aggiungi_prova_2) aggiungi_prova_2.style.visibility='visible';
								if (campo == aggiungi_prova_2) visualizza_prove_2.style.visibility='visible';
							}

 if (select.checked==false) 
 							{
								if (campo == aggiungi_prova_1) aggiungi_prova_1.style.visibility='hidden';
								if (campo == aggiungi_prova_1) visualizza_prove_1.style.visibility='hidden';
								if (campo == aggiungi_prova_1) aggiungi_prova_2.style.visibility='visible';
								if (campo == aggiungi_prova_1) visualizza_prove_2.style.visibility='visible';
								if (campo == aggiungi_prova_2) aggiungi_prova_2.style.visibility='hidden';
								if (campo == aggiungi_prova_2) visualizza_prove_2.style.visibility='hidden';
								if (campo == aggiungi_prova_2) aggiungi_prova_1.style.visibility='visible';
								if (campo == aggiungi_prova_2) visualizza_prove_1.style.visibility='visible';
							}


}

function clicca_metodo_1(select,campo)
   {

 if (select.checked==true)  {
								campo.style.visibility='visible';
								if (campo == aggiungi_prova_1) aggiungi_prova_2.style.visibility='hidden';
								if (campo == aggiungi_prova_2) aggiungi_prova_1.style.visibility='hidden';
							}

 if (select.checked==false) 
 							{
								campo.style.visibility='hidden';				
							
							}
}

function clicca_luogo(select)
   {

 if (select.value=="Autoinseminazione")  {
 
								luogo_1.style.visibility='visible';
								luogo_2.style.visibility='visible';
								note_t.style.visibility='hidden';
							}

 if (select.value=="PMA") 
 							{
								luogo_1.style.visibility='hidden';
								luogo_2.style.visibility='hidden';
								note_t.style.visibility='visible';
							
							}
}

function totale_motilita() { 
	with (document.inserisci_analisi) { 

	totale.value=(parseFloat(a.value)+parseFloat(b.value)+parseFloat(c.value)).toString(); 

	} 
} 

function totale_motilita_1() { 
	with (document.modifica_analisi) { 

	totale.value=(parseFloat(a.value)+parseFloat(b.value)+parseFloat(c.value)).toString(); 

	} 
} 

function immobili() {

	with (document.inserisci_analisi) { 

	d.value=(100-parseFloat(totale.value)).toString(); 

	} 
		
}

function immobili_1() {

	with (document.modifica_analisi) { 

	d.value=(100-parseFloat(totale.value)).toString(); 

	} 
		
}

function spermatozoi() {

	with (document.inserisci_analisi) { 

	totale_mobili.value=(parseFloat(volume.value)*parseFloat(concentrazione.value)*parseFloat(totale.value)/100).toString(); 

	} 
		
}

function spermatozoi_1() {

	with (document.modifica_analisi) { 

	totale_mobili.value=(parseFloat(volume.value)*parseFloat(concentrazione.value)*parseFloat(totale.value)/100).toString(); 

	} 
		
}

function insert (select,campo) {

			campo.value = campo.value + select.value + ','
	
}

	function apri_figli (miofile) {
						
						var dose;
						dose = "";
				
				if (document.modifica_lesione.farmaco_erezione.value=="Caverject") {		
						for (counter = 0; counter < modifica_lesione.Caverject.length; counter++){
						
							if (modifica_lesione.Caverject[counter].checked)
										{ dose = '&Caverject='+document.modifica_lesione.Caverject[counter].value; }

						}
						if (dose == "") 
										{ dose = '&Caverject='+document.modifica_lesione.altro_cav.value; }
				
				}
				if (document.modifica_lesione.farmaco_erezione.value=="Viagra") {		
						for (counter = 0; counter < modifica_lesione.viagra.length; counter++){
						
							if (modifica_lesione.viagra[counter].checked)
										{ dose = '&viagra='+document.modifica_lesione.viagra[counter].value; }

						}
						if (dose == "") 
										{ dose = '&viagra='+document.modifica_lesione.altro_viag.value; }
						
				}
				if (document.modifica_lesione.farmaco_erezione.value=="Levitra") {		
						for (counter = 0; counter < modifica_lesione.levitra.length; counter++){
						
							if (modifica_lesione.levitra[counter].checked)
										{ dose = '&levitra='+document.modifica_lesione.levitra[counter].value; }

						}
						if (dose == "")
										 { dose = '&levitra='+document.modifica_lesione.altro_lev.value; }
						
				}		
				if (document.modifica_lesione.farmaco_erezione.value=="Cialis") {		
						for (counter = 0; counter < modifica_lesione.cialis.length; counter++){
						
							if (modifica_lesione.cialis[counter].checked)
										{ dose = '&cialis='+document.modifica_lesione.cialis[counter].value; }

						}
						if (dose == "") 
										{ dose = '&cialis='+document.modifica_lesione.altro_cial.value;	}
						
				}		
				if (document.modifica_lesione.farmaco_erezione.value=="Vivanza") {		
						for (counter = 0; counter < modifica_lesione.vivanza.length; counter++){
						
							if (modifica_lesione.vivanza[counter].checked)
										{ dose = '&vivanza='+document.modifica_lesione.vivanza[counter].value; }

						}
						if (dose == "")
										{ dose = '&vivanza='+document.modifica_lesione.altro_viv.value; }
																
			   }
			   
						miofile = miofile + '&giorno=' +document.modifica_lesione.giorno.value+'&farmaco_erezione=' +document.modifica_lesione.farmaco_erezione.value+'&mese='+document.modifica_lesione.mese.value+'&anno='+document.modifica_lesione.anno.value+'&causa='+document.modifica_lesione.causa.value;
						miofile = miofile +'&livello='+document.modifica_lesione.livello.value+'&tipo='+document.modifica_lesione.tipo.value+'&farmaci='+document.modifica_lesione.farmaci.value+'&dose_f_a='+document.modifica_lesione.dose_f_a.value+'&esito_farmaco='+document.modifica_lesione.esito_farmaco.value;
						miofile = miofile +'&collaterali='+document.modifica_lesione.collaterali.value+'&figli_prima='+document.modifica_lesione.figli_prima.value+'&figli_dopo='+document.modifica_lesione.figli_dopo.value;
						miofile = miofile +'&anamnesi='+document.modifica_lesione.anamnesi.value+'&cateterismi='+document.modifica_lesione.cateterismi.value+'&sensibilita='+document.modifica_lesione.sensibilita.value+'&sensitivo='+document.modifica_lesione.sensitivo.value+'&problemi_prima='+document.modifica_lesione.problemi_prima.value;
						miofile = miofile +'&problemi_dopo='+document.modifica_lesione.problemi_dopo.value;
						miofile = miofile + dose;
						//document.write(miofile);
						window.open (miofile,'Dati', 'width=800,height=400,left=40,top=150,scrollbars=yes');
	}

	function apri_f_compagna (miofile) {
						
						var sex;
						sex = "";
						for (counter = 0; counter < modifica_compagno.sesso.length; counter++){
						
							if (modifica_compagno.sesso[counter].checked)
										{ sex = '&sesso='+document.modifica_compagno.sesso[counter].value; }

						}
						
						miofile = miofile + '&giorno=' +document.modifica_compagno.giorno.value+'&cognome=' +document.modifica_compagno.cognome.value+'&mese='+document.modifica_compagno.mese.value+'&anno='+document.modifica_compagno.anno.value+'&nome='+document.modifica_compagno.nome.value;
						miofile = miofile +'&eta='+document.modifica_compagno.eta.value+'&menarca='+document.modifica_compagno.menarca.value+'&data_ultima_mestruazione='+document.modifica_compagno.data_ultima_mestruazione.value+'&durata_mestruazione='+document.modifica_compagno.durata_mestruazione.value;
						miofile = miofile +'&anamnesi='+document.modifica_compagno.anamnesi.value+'&ostetrici='+document.modifica_compagno.ostetrici.value+'&ginecologica='+document.modifica_compagno.ginecologica.value+'&figli='+document.modifica_compagno.figli.value;
						miofile = miofile + sex;
						//document.write(miofile);
						window.open (miofile,'Dati', 'width=800,height=400,left=40,top=150,scrollbars=yes');
	}

function Clicca_p(selez,campo)
   {
   
 if (campo.checked==true)  selez.style.visibility='visible';
 if (campo.checked==false)  selez.style.visibility='hidden';

   }


function Clicca_sesso(select)
   {
   
 if (select.value=="M")  {
 							femmina_1.style.visibility='hidden';
 							femmina_2.style.visibility='hidden';
 							femmina_3.style.visibility='hidden';
 							femmina_4.style.visibility='hidden';
							}
 if (select.value=="F")  {
 							femmina_1.style.visibility='visible';
 							femmina_2.style.visibility='visible';
 							femmina_3.style.visibility='visible';
 							femmina_4.style.visibility='visible';
							}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&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<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//-->
