
function prova(anchorname,variabile,dove,pagina) {
	var coordinates;

	if (this.type == "WINDOW") {
		coordinates = getAnchorWindowPosition(anchorname);
		}
	else {
		coordinates = getAnchorPosition(anchorname);
		}
		
	this.x = coordinates.x;
	this.y = coordinates.y;
	

		
			altezza=this.y;
		larghezza=this.x;
		
		//alert (altezza);

			
			document.getElementById(dove).style.top = altezza + "px";
			
			document.getElementById(dove).style.left = larghezza + "px";
			
			
						
			

if (dove != "")
	{		
document.getElementById(dove).style.visibility = "visible";
document.getElementById(dove).style.display = "block";	
Richiesta(variabile,pagina,dove);
}

}


function caricafoto(tabella,valore,nomecampo,div)
{

document.form3.action='up_file.asp?valore='+valore+'&tabella='+tabella+'&nomecampo='+nomecampo+'&div='+div;
document.form3.submit();
}



function chiudi(dove) 


{
			document.getElementById(dove).style.visibility = "hidden";
		
		
		
		
	}









  function cambiaclasse(div,classe,pagina) {
        document.getElementById(id).className=classe;
    }
    
    
  function vediprezzo(variabile) {

        
        
        var z = document.getElementById('tornaprezzo');
        z.innerHTML = "<li class=bianco><a href=javascript:void(0) onclick=tornaprezzi("+variabile+")>Torna indietro</a></div>";
        
        Richiesta (variabile,'destinazione_prezzi.asp','destinazione')

    }   
    
    
      function tornaprezzi(variabile) {

        
        
        var z = document.getElementById('tornaprezzo');
        z.innerHTML = "&nbsp;";
        
        Richiesta (variabile,'tariffe_ajax.asp','destinazione')

    }  

 
   
  function descrizione(variabile) {
  
        document.getElementById('descrizione').className='sposi';
        document.getElementById('listino').className='bianco';
        document.getElementById('offerta').className='bianco';
        document.getElementById('quotazione').className='bianco';
        
        
        //var z = document.getElementById('descrizione');
        //z.innerHTML = "<a href=javascript:void(0) onclick=tornaprezzi("+variabile+")>Torna</a>";
        
        Richiesta (variabile,'destinazione_ajax.asp','destinazione')

    }

 
    



        
    
function afficheVignette(cheminVignette,cheminMaxi)
	{
	document.write('<A HREF="javascript:afficheMaxi(\''+cheminMaxi+'\')"><IMG SRC="'+cheminVignette+'" BORDER=0 ></A>');
	}
	function afficheMaxi(chemin)
	{
	i1 = new Image;
	i1.src = chemin;
	html = '<HTML>\n<HEAD><title>Skorpion Travel</title>\n</HEAD>\n<BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0>\n<CENTER><IMG SRC="'+chemin+'" class=fotosmall BORDER=0 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+14,document.imageTest.height+32)"></CENTER>\n</BODY>\n</HTML>';
	popupImage = window.open('','_blank','width=200,height=200,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0');
	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close()
	}
            
            
            

function accedi(theForm,dove,doves) {


 
     		if ( theForm.email.value == "")
  {
    alert("Inserire l'indirizzo e-mail");
    theForm.email.focus();
    return (false);
  }


    		if ( theForm.password.value == "")
  {
    alert("Inserire la password");
    theForm.password.focus();
    return (false);
  } 
 
 
     Richiesta(theForm.email.value+'||'+theForm.password.value+'||'+doves,'/accesso.asp',dove);


	
}




function reloadPage()
{
window.location.reload();
}




function sendpwd(theForm) {

//alert (theForm)


 
     		if ( theForm.email.value == "")
  {
    alert("Inserire l'indirizzo e-mail");
    theForm.email.focus();
    return (false);
  }
 
 
 
  
Richiesta(theForm.email.value,'/send_password.asp','recupera');

	
}




function sendBabySitter(theForm) {

//alert (theForm)

     		if ( theForm.nome.value == "")
  {
    alert("Inserire il nome");
    theForm.nome.focus();
    return (false);
  }
  
 
     		if ( theForm.email.value == "")
  {
    alert("Inserire l'indirizzo e-mail");
    theForm.email.focus();
    return (false);
  }
 
      		if ( theForm.testo.value == "")
  {
    alert("Inserire il testo della risposta");
    theForm.testo.focus();
    return (false);
  }
 
 
 
  
Richiesta(theForm.id.value+'||'+theForm.nome.value+'||'+theForm.email.value+'||'+theForm.testo.value,'/babysitter/inviarisposta.asp','punti');

	
}








function valida_mammaclub(theForm)
{
 
  if (theForm.nome.value == "")
  {
    alert("Il campo nome č obbligatorio");
    theForm.nome.focus();
    return (false);
  }
 
  if (theForm.cognome.value == "")
  {
    alert("Il campo congnome č obbligatorio");
    theForm.cognome.focus();
    return (false);
  }
 
  if (theForm.giornod.selectedIndex < 0)
  {
    alert("inserire il giorno di nascita");
    theForm.giornod.focus();
    return (false);
  }
 
  if (theForm.giornod.selectedIndex == 0)
  {
    alert("inserire il giorno di nascita");
    theForm.giornod.focus();
    return (false);
  }
 
  if (theForm.mesed.selectedIndex < 0)
  {
    alert("Inserire il mese di nascita");
    theForm.mesed.focus();
    return (false);
  }
 
  if (theForm.mesed.selectedIndex == 0)
  {
    alert("Inserire il mese di nascita");
    theForm.mesed.focus();
    return (false);
  }
 
  if (theForm.annod.selectedIndex < 0)
  {
    alert("Inserire l'anno di nascita");
    theForm.annod.focus();
    return (false);
  }
 
  if (theForm.annod.selectedIndex == 0)
  {
    alert("Inserire l'anno di nascita");
    theForm.annod.focus();
    return (false);
  }
 
  if (theForm.indirizzo.value == "")
  {
    alert("Inserire l'indirizzo");
    theForm.indirizzo.focus();
    return (false);
  }
 
  if (theForm.citta.value == "")
  {
    alert("Inserire la cittā");
    theForm.citta.focus();
    return (false);
  }
 
  if (theForm.cap.value == "")
  {
    alert("Inserire il cap");
    theForm.cap.focus();
    return (false);
  }
 
  if (theForm.cap.value.length < 5)
  {
    alert("Il cap deve essere di 5 caratteri");
    theForm.cap.focus();
    return (false);
  }
 
  if (theForm.cap.value.length > 5)
  {
    alert("Il cap deve essere di 5 caratteri");
    theForm.cap.focus();
    return (false);
  }
 
  var checkOK = "0123456789-";
  var checkStr = theForm.cap.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Il cap deve essere composto da soli numeri");
    theForm.cap.focus();
    return (false);
  }
 
  if (theForm.pv.selectedIndex < 0)
  {
    alert("Inserire la provincia");
    theForm.pv.focus();
    return (false);
  }
 
  if (theForm.pv.selectedIndex == 0)
  {
    alert("Inserire la provincia");
    theForm.pv.focus();
    return (false);
  }
 
  var checkOK = "0123456789-";
  var checkStr = theForm.telefono.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Il telefono deve essere composto da soli numeri");
    theForm.telefono.focus();
    return (false);
  }
 
  if (theForm.cellulare.value == "")
  {
    alert("Il telefono deve essere composto da soli numeri");
    theForm.cellulare.focus();
    return (false);
  }
 
  var checkOK = "0123456789-";
  var checkStr = theForm.cellulare.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Il cellulare deve essere composto da soli numeri");
    theForm.cellulare.focus();
    return (false);
  }
 
  if (theForm.email.value == "")
  {
    alert("Inserire la email.");
    theForm.email.focus();
    return (false);
  }
  return (true);
}







