var sendord = GetXmlHttpObject();
function GetXmlHttpObject()
{
var sendord=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 sendord=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  sendord=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  sendord=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return sendord;
}

			function inviodatiordine() {
				if (sendord.readyState == 4 || sendord.readyState == 0) {
					if(document.getElementById('privacy').checked==true)
					{
					sendord.open("POST", 'addordine.php?insert=1', true);
					sendord.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
					sendord.onreadystatechange = statordine; 
					var param = 'email='+ document.getElementById('email').value;
					param += '&nomec='+ document.getElementById('nomec').value;
					param += '&cognomec='+ document.getElementById('cognomec').value;
					param += '&telefonoc='+ document.getElementById('telefonoc').value;
					param += '&provinciac='+ document.getElementById('provinciac').value;
					param += '&cittac='+ document.getElementById('cittac').value;
					param += '&capc='+ document.getElementById('capc').value;
					param += '&indirizzoc='+ document.getElementById('indirizzoc').value;
					param += '&codfiscale='+ document.getElementById('codfiscale').value;					
					param += '&nomeo='+ document.getElementById('nomeo').value;
					param += '&cognomeo='+ document.getElementById('cognomeo').value;
					param += '&telefonoo='+ document.getElementById('telefonoo').value;
					param += '&provinciao='+ document.getElementById('provinciao').value;
					param += '&cittao='+ document.getElementById('cittao').value;
					param += '&capo='+ document.getElementById('capo').value;
					param += '&indirizzoo='+ document.getElementById('indirizzoo').value;			
					param += '&privacy=1';				
					sendord.send(param);
					}
					else
					{
						document.getElementById('errore').innerHTML='<font size=2 color=#FEDF05>Attenzione: Per effettuare il pagamento devi accetare la PRIVACY...</font>';
					}
				}							
			}
			//When our message has been sent, update our page.
			function statordine() {				
				//document.getElementById('errore').innerHTML='<font size=2 color=#FEDF05>Complimenti: Il suo profilo e stato registrato nei nostri archivi...</font>';
			}
				