// JavaScript Document
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.Contatto_Nome.value == "")
  {
    alert("Please enter a value for the \"Contatto_Nome\" field.");
    theForm.Contatto_Nome.focus();
    return (false);
  }

  if (theForm.Contatto_Cognome.value == "")
  {
    alert("Please enter a value for the \"Contatto_Cognome\" field.");
    theForm.Contatto_Cognome.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ";
  var checkStr = theForm.Contatto_Cognome.value;
  var allValid = true;
  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;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter characters in the \"Contatto_Cognome\" field.");
    theForm.Contatto_Cognome.focus();
    return (false);
  }

  if (theForm.Contatto_Indirizzo.value == "")
  {
    alert("Please enter a value for the \"Contatto_Indirizzo\" field.");
    theForm.Contatto_Indirizzo.focus();
    return (false);
  }

  if (theForm.Contatto_Citta.value == "")
  {
    alert("Please enter a value for the \"Contatto_Citta\" field.");
    theForm.Contatto_Citta.focus();
    return (false);
  }

  if (theForm.Contatto_Paese.value == "")
  {
    alert("Please enter a value for the \"Contatto_Paese\" field.");
    theForm.Contatto_Paese.focus();
    return (false);
  }

  if (theForm.Contatto_TelefonoAbitazione.value == "")
  {
    alert("Please enter a value for the \"Contatto_TelefonoAbitazione\" field.");
    theForm.Contatto_TelefonoAbitazione.focus();
    return (false);
  }

  if (theForm.Contatto_TelefonoAbitazione.value.length > 25)
  {
    alert("Please enter at most 25 characters in the \"Contatto_TelefonoAbitazione\" field.");
    theForm.Contatto_TelefonoAbitazione.focus();
    return (false);
  }

  if (theForm.From.value == "")
  {
    alert("Please enter a value for the \"From\" field.");
    theForm.From.focus();
    return (false);
  }
  return (true);
}

// ---------------------------------------------------


function CCBox(para) {
	if (para=='it') {
		mess = 'Deve confermare di aver preso visione dell\'informativa per poter inviare i dati!';
	}
		if (para=='fr') {
		mess = 'Il faut confirmer avoir pris connaissance des informations sur la protection des données personnelles avant de valider!';
	}
		if (para=='en') {
		mess = 'You need to confirm that you have seen the information about privacy before send the data!';
	}
		if (para=='de') {
		mess = 'Nachdem Sie Kenntnis über die Datenschutzinformationen genommen haben, bestätigen Sie alle Vorgänge!';
	}
if (document.forms[0].presovisione.checked == false) 
				   //&&
//document.forms[0].CHECKBOX_2.checked == false &&
//document.forms[0].CHECKBOX_3.checked == false)
{
alert (mess);
return false;
}
else
{
return true;
}}


//-------------------------------------------------------
function openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	if (imageType == "swf"){
	newWindow.document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('<param name=movie value=\"'+imageName+'\"><param name=quality value=high>');
	newWindow.document.write('<embed src=\"'+imageName+'\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('</embed></object>');	}else{
	newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">'); 	}
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

