<!--
function aumenta(prodotto,attiva)
{
	if (document.getElementById(prodotto).value < 999)
	{
	 document.getElementById(prodotto).value++;
	}
	if (document.getElementById(prodotto).value > 1)
	{
	document.getElementById(attiva).disabled=false;
	}
}

function riduci(prodotto,attiva)
{
	if (document.getElementById(prodotto).value > 1)
	{
	 document.getElementById(prodotto).value--;
	}
}

function onlynumber(field) 
{ 
if (isNaN(field.value))
{ 
field.value=field.value.substr(0, field.value.length-1); 
} 
} 

objHTTP = getXMLHttp()

function pausecomp(millis) 
{
var date = new Date();
var curDate = null;

do { curDate = new Date(); } 
while(curDate-date < millis);
} 

function AggCarrello(quantita,idpr)
{
 if (confirm('Aggiungere questo articolo al carrello?')) 
  {

   objHTTP.open("GET", "carrello.asp?metodo=Agg&quantita=" + document.getElementById(quantita).value + "&idpr=" + idpr,true);
   objHTTP.send(null);
   document.getElementById('quanti'+idpr).value = '1';
   //document.getElementById('canc'+idpr).disabled=true;
   alert('Articolo inserito correttamente nel Vostro carrello.');

   //objHTTP2 = getXMLHttp()
   //objHTTP2.open("GET", "inclusi/carrello_view.asp");
   //objHTTP2.onreadystatechange= function() {elaboraRisposta()};
   //objHTTP2.send(null);
   //objHTTP2.Close;
  }
} 
function elaboraRisposta() 
{
 if (objHTTP2.readyState==4) 
  {
   var el=opener.document.getElementById('carrello');
   el.style.display="";

   navigator.userAgent;
   //alert(navigator.appName);
   if (navigator.appName == 'Netscape')
   {
    pausecomp(2000)
   }

   opener.document.getElementById('carrello').innerHTML = objHTTP2.responseText;
  }
}
-->

