





function prova(anchorname,variabile,dove,pagina,larghezza,altezza) {
	var coordinates;

	if (this.type == "WINDOW") {
		coordinates = getAnchorWindowPosition(anchorname);
		}
	else {
		coordinates = getAnchorPosition(anchorname);
		}
		
	this.x = coordinates.x;
	this.y = coordinates.y;
	

		
			


			
			document.getElementById(dove).style.top =this.y + "px";
			document.getElementById(dove).style.left =this.x + "px";
			document.getElementById(dove).style.width = larghezza + "px";
			document.getElementById(dove).style.height = altezza + "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 chiudiparent(dove) 


{
			parent.document.getElementById(dove).style.visibility = "hidden";
		
		
		
		
	}






  function cambiaclasse(div,classe,classebase,quanti,basediv)   
  {
  
  for (i=0;i<quanti; i++) 
  {
  m=i+1;
   document.getElementById(basediv+m).className=classebase;
  }
  
  document.getElementById(div).className=classe;
    }
    
    
    
    
    function fairicerca(theForm)
{
 
  if (theForm.ricerca.value == "")
  {
    alert("Inserire il codice o modello");
    theForm.ricerca.focus();
    return (false);
  }
 

 
  if (theForm.ricerca.value.length < 4)
  {
    alert("Inserire almeno 4 caratteri");
    theForm.ricerca.focus();
    return (false);
  }
 

 
  return (true);
}



    function cercamodello(theForm)
{
 
  if (theForm.modello.value == "")
  {
    alert("Inserire il modello");
    theForm.modello.focus();
    return (false);
  }
 

 


 
  return (true);
}




    function ricercacap(theForm)
{
 
 
 
  if (theForm.cittacap.value == "")
  {
    alert("Inserire il nome della cittą o il cap");
    theForm.cittacap.focus();
    return (false);
  }

  return (true);
}

