function invia_dati()
{
	var messaggio="";
	var lingua="ita";
	var _LINGUA=findObj("LINGUA");
	lingua=_LINGUA.value
	
	var PRIVACY=findObj("PRIVACY");
	var NOME=findObj("NOME");
	var COGNOME=findObj("COGNOME");
	var SOCIETA=findObj("SOCIETA");
	var TELEFONO=findObj("TELEFONO");
	var FAX=findObj("FAX");
	var INDIRIZZO=findObj("INDIRIZZO");
	var CITTA=findObj("CITTA");
	var NAZIONE=findObj("NAZIONE");
	var EMAIL=findObj("EMAIL");
	var INTERESSE=findObj("INTERESSE");
	var SENDFORM=findObj("SENDFORM");
	var PRIVACY=findObj("PRIVACY");
	
	if(!(PRIVACY.checked))
	{
			if(lingua=="ita")
			{
				messaggio="Per proseguire Esprimere il consenso al trattamento dei dati.";
			}
			if(lingua=="fra")
			{
				messaggio="Pour continuer à entrer type Privacy.";
			}
			if(lingua=="eng")
			{
				messaggio="Please, confirm the privacy flag.";
			}
			if(lingua=="esp")
			{
				messaggio="Per proseguire Esprimere il consenso al trattamento dei dati.";
			}
	}
	if(INTERESSE.value=="")
	{
			if(lingua=="ita")
			{
				messaggio="Specificare il tipo di informazione richiesta";
			}
			if(lingua=="fra")
			{
				messaggio="Pour continuer à entrer type INTÉRESSÉ PAR";
			}
			if(lingua=="eng")
			{
				messaggio="Please, type your question.";
			}
			if(lingua=="esp")
			{
				messaggio="Specificare il tipo di informazione richiesta";
			}
	}

	if((TELEFONO.value+FAX.value+EMAIL.value)=="")
	{
			if(lingua=="ita")
			{
				messaggio="Specificare il campo Telefono o Fax o Email";
			}
			if(lingua=="fra")
			{
				messaggio="Pour continuer à entrer type TÉLÉPHONE o FAX o EMAIL";
			}
			if(lingua=="eng")
			{
				messaggio="Please, insert Telefono o Fax o Email";
			}
			if(lingua=="esp")
			{
				messaggio="Specificare il campo Telephone or Fax or Email";
			}
	}
	
	if(NAZIONE.value=="")
	{
			if(lingua=="ita")
			{
				messaggio="Specificare il campo Nazione";
			}
			if(lingua=="fra")
			{
				messaggio="Pour continuer à entrer type PAYS  ";
			}
			if(lingua=="eng")
			{
				messaggio="Please, insert Country";
			}
			if(lingua=="esp")
			{
				messaggio="Specificare il campo Nazione";
			}
	}
	
	if(COGNOME.value=="")
	{
			if(lingua=="ita")
			{
				messaggio="Specificare il Cognome";
			}
			if(lingua=="fra")
			{
				messaggio="Pour continuer à entrer type NOM DE FAMILLE  ";
			}
			if(lingua=="eng")
			{
				messaggio="Please, insert Surname";
			}
			if(lingua=="esp")
			{
				messaggio="Specificare il Cognome";
			}
	}
	
	if(NOME.value=="")
	{
		if(lingua=="ita")
		{
			messaggio="Specificare il Nome";
		}
		if(lingua=="fra")
		{
			messaggio="Pour continuer à entrer type PRÉNOM ";
		}
		if(lingua=="eng")
		{
			messaggio="Please, insert  Name";
		}
		if(lingua=="esp")
		{
			messaggio="Specificare il Nome";
		}
	}
	
	if(messaggio!="")
	{
		window.alert(messaggio);
	}
	else
	{
		SENDFORM.submit();
	}
}

// Example: obj = findObj("image1");
function findObj(theObj, theDoc)
{
  var p, i, foundObj;
  
  if(!theDoc) theDoc = document;
  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  {
    theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);
  }
  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  for (i=0; !foundObj && i < theDoc.forms.length; i++) 
    foundObj = theDoc.forms[i][theObj];
  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
    foundObj = findObj(theObj,theDoc.layers[i].document);
  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  
  return foundObj;
}


function show_zoom(foto)
{
	var width=300;
	var height=424;
	var left = (screen.width/2) - width/2;
	var top = (screen.height/2) - height/2;
	var styleStr = 'dialogWidth:'+width+ "px;"+'dialogHeight:'+height+ "px;"+'dialogLeft:'+left+ "px;"+'dialogTop:'+top+ "px;"+'center:yes;status:no;scroll:no; ';
	
	vReturnValue = window.showModalDialog("/zoom.asp?foto="+foto, "", styleStr);
}	


function video(quale)
{
	if(quale=="sorbetteria")
	{
		 var l = Math.floor((screen.width-491)/2);
   var t = Math.floor((screen.height-360)/2);
   window.open("/video/"+quale+".html","f_"+quale,"width=" + 491 + ",height=" + 360 + ",top=" + t + ",left=" + l);
	}
	else
	{
	if(quale=="zero")
	{
		 var l = Math.floor((screen.width-640)/2);
   var t = Math.floor((screen.height-400)/2);
   window.open("/video/"+quale+".html","f_"+quale,"width=" + 640 + ",height=" + 400 + ",top=" + t + ",left=" + l);
	}
	else
	{
   var l = Math.floor((screen.width-320)/2);
   var t = Math.floor((screen.height-290)/2);
   window.open("/video/"+quale+".html","f_"+quale,"width=" + 320 + ",height=" + 290 + ",top=" + t + ",left=" + l);
}
}
}

