// text resize
var size = 4;
var testosize = size;
var min = 3;
var max = 8;
var newdim;

function testopiu() {
    if (testosize < max) {
    testosize += 1;
    newdim = document.getElementById('testodim');
    newdim.className = 'dim' + testosize;
    }
}

function testomeno() {
    if (testosize > min) {
    testosize -= 1;
    newdim = document.getElementById('testodim');
    newdim.className = 'dim' + testosize;
    }
}


// more info
function popup_english_driver() {
  alert('Please note that your driver-guide is very expert about the territory and the history of the area and will teach you about all places you will see, but that he is not allowed to enter sites with you.\r\nHe/she will give you running commentaries of what you are seeing and give enough time to visit each site.\r');
}


// form

function popup_privacy() {
  alert('Privacy: \r\nPapillon Service informs you, in conformity with art. 13 of the Code concerning the protection of the personal data, that the data provided by the sender by compiling the electronic fields above described will be dealt with by the Papillon Service, Via Pacinotti, 80, Livorno - Italy, holder of the data processing, in electronic form only in order to forward the message to the respective receiver and, if requested, in order to send the newsletters. The data are also dealt with by the persons in charge and appointed by the general manager to the above described aim. With regard to the data processing, in conformity with art. 7 of the Decree 196/2003 you have the right of obtaining from Papillon Service:\r\n1. the confirmation of the existence or not of your data, their communication in intelligible form and the knowledge of their origin;\r\n2. the cancellation, within reasonable time, of your data, their transformation into an anonym form;\r\n3. the updating of the data, their amendment or, should you want it, their integration. Papillon Service does not assume responsibility for the content of the message formulated by the sender.\r');
}

function popup_ccv() {
  alert('How too locate CCV number\r\nCCV is an anti-fraud security feature to help verify that you are in possession of your credit card.\r\nFor Visa/Mastercard, the three-digit CCV number is printed on the signature panel on the back of the card immediately after the card s account number.\r\nAnyway a 3-digit number on the back of your credit card, usually on the far right hand side.\r\n(Please note, American Express sometimes uses 4 numbers)\r');
}

function noprivacy(){
	alert ("Is required to accept in order to continue");
	document.send_information.ok.checked='true';
	return true
}

function checkEmail(send_information) {
	if ((send_information.email.value != send_information.email2.value)){
          alert('Both e-mail address entries must match.')
		  return false;
   }
    var re = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/
    if (re.test(send_information.email.value))
        return true;
    alert("Please check the email you typed.");
    return false;
}

function checkEmail2(send_information) {
    var re = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/
    if (re.test(send_information.email.value))
        return true;
    alert("Please check the email you typed.");
    return false;
}

//tendine combinate tour
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Kiran Pai | http://www.codecoffee.com/ */

var litours= new Array("Choose your tour", "Florence - Pisa", "Lucca - Pisa", "Cinque Terre", "San Gimignano - Volterra - Siena", "Chianti area wine tasting", "Outlet Mall Florence", "Florence with your personal shopper", "Other (specify in \"special request\" field)");
var sptours = new Array("Choose your tour", "Cinque Terre", "Florence - Pisa", "Portofino", "Florence with your personal shopper", "Other (specify in \"special request\" field)");
var rmtours = new Array("Choose your tour", "Rome", "Other (specify in \"special request\" field)");
var natours = new Array("Choose your tour", "Pompei - Sorrento - Positano", "Other (specify in \"special request\" field)");

function set_tour() {
  var select_port = document.send_information.port;
  var select_tour = document.send_information.tour;
  var selected_port = select_port.options[select_port.selectedIndex].value;

  select_tour.options.length=0;
  if (selected_port == "livorno"){
    for(var i=0; i<litours.length; i++)
    select_tour.options[select_tour.options.length] = new Option(litours[i]);
  }
  if (selected_port == "laspezia"){
    for(var i=0; i<sptours.length; i++)
    select_tour.options[select_tour.options.length] = new Option(sptours[i]);
  }
  if (selected_port == "civitavecchia"){
    for(var i=0; i<rmtours.length; i++)
    select_tour.options[select_tour.options.length] = new Option(rmtours[i]);
  }
  if (selected_port == "naples"){
    for(var i=0; i<natours.length; i++)
    select_tour.options[select_tour.options.length] = new Option(natours[i]);
  }
}

//fine tendine combinate tour



//popup
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}