function openPictureWindow_Fever(imageName,imageWidth,imageHeight,alt,posLeft,posTop) {
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",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">'); 
	newWindow.document.write('<img src='+imageName+' width='+imageWidth+' height='+imageHeight+' alt='+alt+'>'); 
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}


function WM_toggle(id){
if (document.all){
if(document.all[id].style.display == 'none'){
document.all[id].style.display = '';
} else {
document.all[id].style.display = 'none';
}
return false;
} else if (document.getElementById){
if(document.getElementById(id).style.display == 'none'){
document.getElementById(id).style.display = 'block';
} else {
document.getElementById(id).style.display = 'none';
}
return false;
}
}

function nascondi(nome){
var stato = document.getElementById("tbl" + nome).style.display;
if (stato != "none"){
// Nascondo la riga
document.getElementById("tbl" + nome).style.display = "none";
}
}
function apri(nome){
var statoapri = document.getElementById("tbl" + nome).style.display;
if (statoapri == "none"){
// Visualizzo la riga
document.getElementById("tbl" + nome).style.display = "";
}
}


// funzione per far comparire il pop-up della privacy
function apriFinestra(page){
var winOpenSquadra;
winOpened = window.open(page,"Squadra","directories=no,status=no,statusbar=no,resizable=no,menubar=no,scrollbars=yes,toolbar=no,width=770,height=530,left=10,top=10");
}



function show_calendar(str_target, lang, str_datetime){
var lang = lang;
if (lang=="en"){
var arr_months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
var week_days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
}
else if (lang=="fr"){
var arr_months = ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"];
var week_days = ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"];
}
else if (lang=="de"){
var arr_months = ["Januar", "Februar", "M&auml;rz", "April", "Mai", "Juni", "Juli", "August", "September", "Okctober", "November", "Dezember"];
var week_days = ["Son", "Mon", "Die", "Mit", "Don", "Fre", "Sam"];
}
else if (lang=="es"){
var arr_months = ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"];
var week_days = ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "S&aacute;b"];
}
else{
var arr_months = ["Gennaio", "Febbario", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"];
var week_days = ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"];
}

var n_weekstart = 0; // day week starts from (normally 0 or 1)
 
var dt_datetime = ((str_datetime == null || str_datetime == "") ? new Date() : str2dt(str_datetime));
 
var dt_prev_month = new Date(dt_datetime);
dt_prev_month.setMonth(dt_datetime.getMonth() - 1);
 
var dt_next_month = new Date(dt_datetime);
dt_next_month.setMonth(dt_datetime.getMonth() + 1);
 
var dt_firstday = new Date(dt_datetime);
dt_firstday.setDate(1);
dt_firstday.setDate(1 - (7 + dt_firstday.getDay() - n_weekstart) % 7);
 
var dt_lastday = new Date(dt_next_month);
dt_lastday.setDate(0);
 
  // html generation (feel free to tune it for your particular application)
  // print calendar header
  var str_buffer = new String("<html>\n" +
                              "<head>\n" +
                              "<title>Calendar</title>\n" +
					"<LINK rel=\"stylesheet\" href=\"font.css\" type=\"text/css\">\n" +
                              "</head>\n" +
                              "<body>\n" +
                              "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">\n<Tbody>\n" +
                              "<tr><td bgcolor=\"#FFFFFF\">\n" +
                              "<table cellspacing=\"1\" cellpadding=\"2\" border=\"0\" width=\"100%\">\n" +
                              "<tr>\n <td bgcolor=\"#000000\"><a href=\"javascript:window.opener.show_calendar('" +
                              str_target +
					"', '"+ lang +"', '" +
                              dt2dtstr(dt_prev_month) +
                              " ' + document.cal.time.value);\">" +
                              "<img src=\"img/freccia_sx2.gif\" width=\"10\" height=\"9\" border=\"0\"" +
                              " alt=\"" +
                              arr_months[dt_datetime.getMonth()-1] +
                              "\"></a></td>\n" +
                              " <td bgcolor=\"#000000\" colspan=\"5\" align=\"center\" valign=\"middle\">" +
                              "<font color=\"#FEF3D3\" class=\"corpo\">" +
                              arr_months[dt_datetime.getMonth()] +
                              " " +
                              dt_datetime.getFullYear() +
                              "</font></td>\n" +
                              " <td bgcolor=\"#000000\" align=\"right\"><a href=\"javascript:window.opener.show_calendar('" +
                              str_target +
					"', '"+ lang +"', '" +
                              dt2dtstr(dt_next_month) +
                              " ' + document.cal.time.value);\">" +
                              "<img src=\"img/freccia_dx2.gif\" width=\"10\" height=\"9\" border=\"0\"" +
                              " alt=\"" +
                              arr_months[dt_datetime.getMonth()+1] +
                              "\"></a></td>\n</tr>\n");
 
  var dt_current_day = new Date(dt_firstday);
 
  // print weekdays titles
  str_buffer += "<tr>\n";
 
  for ( var n = 0 ; n < 7 ; n++)
    str_buffer += " <td bgcolor=\"#CCCCCC\" align=\"center\">" +
    "<font color=\"white\" class=\"corpo\">" +
    week_days[(n_weekstart + n) % 7] +
    "</font></td>\n";
 
  // print calendar table
  str_buffer += "</tr>\n";
  while (dt_current_day.getMonth() == dt_datetime.getMonth() ||
         dt_current_day.getMonth() == dt_firstday.getMonth())
    {
      // print row heder
      str_buffer += "<tr>\n";
 
      for ( var n_current_wday = 0 ; n_current_wday < 7 ; n_current_wday++)
        {
          if (dt_current_day.getDate() == dt_datetime.getDate() &&
              dt_current_day.getMonth() == dt_datetime.getMonth())
              // print current date
              str_buffer += " <td bgcolor=\"#FF0000\" align=\"right\">";
          else if (dt_current_day.getDay() == 0 || dt_current_day.getDay() == 6)
                   // weekend days
                   str_buffer += " <td bgcolor=\"#E0ECE8\" align=\"right\">";
          else // print working days of current month
               str_buffer += " <td bgcolor=\"white\" align=\"right\">";

          if (dt_current_day.getMonth() == dt_datetime.getMonth())
              // print days of current month

              str_buffer += "<a href=\"javascript:window.opener." +
                            str_target +
                            ".value='" + dt2dtstr(dt_current_day) + "'; window.close();\">" +
                            "<font color=\"black\" class=\"corpo\">";
          else // print days of other months
               str_buffer += "<a href=\"javascript:window.opener." +
                             str_target +
                             ".value='" + dt2dtstr(dt_current_day) + "'; window.close();\">" +
                             "<font color=\"gray\" class=\"corpo\">";
 
          str_buffer += dt_current_day.getDate() + "</font></a></td>\n";
          dt_current_day.setDate(dt_current_day.getDate() + 1);
        }
 
      // print row footer
      str_buffer += "</tr>\n";
    }
 
  // print calendar footer
  str_buffer += "<form name=\"cal\" style=\"margin:0px;\">\n<tr bgcolor=\"#000000\" ><td colspan=\"7\" height=\"15\" class=\"corpo2\" align=\"center\" valign=\"middle\">\n" +
                "<input type=\"hidden\" name=\"time\" value=\""+dt2tmstr(dt_datetime) +
                "\"><a href=\"javascript:window.close();\"><font color=\"#ffffff\">Close Window</font></a>\n" +
		    "</td></tr>\n</form>\n" +
                "</Tbody>\n</table>\n" +
                "</td>\n</tr>\n</Tbody>\n</table>\n" +
                "</body>\n" +
                "</html>\n";

 
  var vWinCal = window.open("", "Calendario", "width=250,height=190,status=no,resizable=yes,top=200,left=200");
  vWinCal.opener = self;
  var calc_doc = vWinCal.document;
  calc_doc.write(str_buffer);
  calc_doc.close();
}
 
// datetime parsing and formatting routimes. modify them if you wish other datetime format
function str2dt(str_datetime)
{
  var re_date = /^(\d{1,2})\/(\d{1,2})\/(\d{4})\s+(\d{1,2})\:(\d{1,2})\:(\d{1,2})$/;
 
  if (!re_date.exec(str_datetime)) return(alert("Invalid Datetime format: " + str_datetime));
 
  return(new Date (RegExp.$3, RegExp.$2-1, RegExp.$1, RegExp.$4, RegExp.$5, RegExp.$6));
}

function dt2dtstr(dt_datetime){
//var dt = dt_datetime.getDate() + "-";

var day = dt_datetime.getDate();
var month = dt_datetime.getMonth() + 1;
var dt = ((day < 10) ? "0" + day : day) + "/";
dt += ((month < 10) ? "0" + month : month);
dt += "/" + dt_datetime.getFullYear();
return(dt);
}
 
function dt2tmstr(dt_datetime){
var dt = dt_datetime.getHours() + ":";
dt += ((dt_datetime.getMinutes() < 10) ? "0" + dt_datetime.getMinutes() : dt_datetime.getMinutes()) + ":";
dt += ((dt_datetime.getSeconds() < 10) ? "0" + dt_datetime.getSeconds() : dt_datetime.getSeconds());
return(dt);
}


function people(lng,modo){
var colore_normale = "#FFFFFF";
var colore_avviso = "#e0f5e8";
//--Applico il colore base alle text--
document.theform.nome.style.backgroundColor = colore_normale;
document.theform.cognome.style.backgroundColor = colore_normale;
document.theform.indirizzo.style.backgroundColor = colore_normale;
document.theform.citta.style.backgroundColor = colore_normale;
document.theform.telefono.style.backgroundColor = colore_normale;
document.theform.email.style.backgroundColor = colore_normale;
document.theform.arrivo.style.backgroundColor = colore_normale;
document.theform.partenza.style.backgroundColor = colore_normale;
document.theform.ora_arrivo.style.backgroundColor = colore_normale;
document.theform.n_persone.style.backgroundColor = colore_normale;
document.theform.camera1.style.backgroundColor = colore_normale;
document.theform.camera2.style.backgroundColor = colore_normale;
document.theform.camera3.style.backgroundColor = colore_normale;
document.theform.camera4.style.backgroundColor = colore_normale;
document.theform.camera5.style.backgroundColor = colore_normale;

var camera1 = document.theform.camera1.options.selectedIndex;
var camera2 = document.theform.camera2.options.selectedIndex;
var camera3 = document.theform.camera3.options.selectedIndex;
var camera4 = document.theform.camera4.options.selectedIndex;
var camera5 = document.theform.camera5.options.selectedIndex;
var persone = document.theform.n_persone.options.selectedIndex;
var tot_1 = 0;
var tot_2 = 0;
var tot_3 = 0;
var tot_4 = 0;
var tot_5 = 0;
var somma = 0;
tot_1 = parseInt(camera1) * 1;
tot_2 = parseInt(camera2) * 2;
tot_3 = parseInt(camera3) * 2;
tot_4 = parseInt(camera4) * 3;
tot_5 = parseInt(camera5) * 4;

somma = tot_1 + tot_2 + tot_3 + tot_4 + tot_5;

if (lng=="en"){
var err_1 = "Please insert the Surname."
var err_2 = "Please insert the Name."
var err_3 = "Please insert the Town."
var err_4 = "Please insert the Phone Number or Mobile Phone."
var err_5 = "Please insert the Email."
var err_6 = "Attention ! Email wrong."
var err_7 = "Please insert the Arrival Date."
var err_8 = "Please insert the Departure Date."
var err_9 = "Please insert the Arrival Time."
var err_10 = "Attention ! The number of people is greater to the number of selected beds."
var err_11 = "Attention ! The number of people is lower to the number of selected beds."
var err_12 = "Attention ! Choose a type of lodging."
var err_13 = "Please insert the N. of People."
var err_14 = "Attention ! Our property can entertain maximum 20 people."
var err_15 = "Attention ! You must enter all fields of credit card."
var err_16 = "Attention ! The credit card number is not correct."
}
else if (lng=="es"){
var err_1 = "¡Atención! Insertar el Apellido."
var err_2 = "¡Atención! Insertar el Nombre."
var err_3 = "¡Atención! Insertar la Ciudad."
var err_4 = "¡Atención! Insertar el Teléfono o Cell."
var err_5 = "¡Atención! Insertar el Email."
var err_6 = "¡Atención! Insertar el Email corregido."
var err_7 = "¡Atención! Insertar el Día de Llegada."
var err_8 = "¡Atención! Insertar el Día de Salida."
var err_9 = "¡Atención! Insertar el horario de Llegada."
var err_10 = "¡Atención! El número max de personas integradas es superior a los sitios cama seleccionada."
var err_11 = "¡Atención! El número max de personas integradas es inferior a los sitios cama seleccionada."
var err_12 = "¡Atención! Eliges una tipología de habitación."
var err_13 = "¡Atención! Insertar el número de las personas."
var err_14 = "¡Atención! Nuestra estructura puede hospedar un máximo de 20 personas."
var err_15 = "¡Atención! Usted debe entrar en todos los campos de la tarjeta de crédito."
var err_16 = "¡Atención! El número de tarjeta de crédito no es correcto."
}
else if (lng=="fr"){
var err_1 = "Attention! Insérez le Nom."
var err_2 = "Attencion! Insérez le Préom."
var err_3 = "Attencion! Insérez la Ville."
var err_4 = "Attencion! Insérez le Téléphone."
var err_5 = "Attencion! Insérez la Email."
var err_6 = "Attencion! Email incorrect."
var err_7 = "Attencion! Insérez la Date d\'Arrivée."
var err_8 = "Attencion! Insérez la Date de Départ."
var err_9 = "Attencion! Insérez H. d\'Arrivée."
var err_10 = "Attencion! Le nombre de personnes est plus grand pour le nombre de lits sélectionnés."
var err_11 = "Attencion! Le nombre de personnes est inférieur au nombre de lits."
var err_12 = "Attencion! Choisissez un Type de chambres."
var err_13 = "Attencion! Insérez le N. de Personnes."
var err_14 = "Attencion! Notre propriété peut divertir au maximum 20 personnes."
var err_15 = "Attencion! Vous devez saisir tous les champs de carte de crédit."
var err_16 = "Attencion! Le numéro de carte de crédit n\'est pas correct."
}
else if (lng=="de"){
var err_1 = "Achtung! Einlegen der Nachname."
var err_2 = "Achtung! Einlegen der Vorname."
var err_3 = "Achtung! Einlegen der Stadt."
var err_4 = "Achtung! Legen Sie die Telefonnummer."
var err_5 = "Achtung! Legen Sie die E-Mail."
var err_6 = "Achtung! E-Mail falsch."
var err_7 = "Achtung! Legen Sie die Ankunfts Datum."
var err_8 = "Achtung! Legen Sie die Abfahrt Datum."
var err_9 = "Achtung! Einlegen der Ankunft Zeit."
var err_10 = "Achtung! Die Zahl der Menschen größer ist, um die Anzahl der ausgewählten Betten."
var err_11 = "Achtung! Die Zahl der Menschen, ist auf die geringere Zahl der Betten ausgewählt."
var err_12 = "Achtung! Wählen Sie eine Art der Unterkunft."
var err_13 = "Achtung! Legen Sie die Anzahl der Personen."
var err_14 = "Achtung! Unser Eigentum unterhalten können maximal 20 Personen."
var err_15 = "Achtung! Sie müssen in allen Bereichen der Kreditkarte."
var err_16 = "Achtung! Die Kreditkartennummer ist nicht korrekt."
}
else {
var err_1 = "Attenzione ! Inserire il Cognome."
var err_2 = "Attenzione ! Inserire il Nome."
var err_3 = "Attenzione ! Inserire la Città."
var err_4 = "Attenzione ! Inserire il Telefono o Cell."
var err_5 = "Attenzione ! Inserire l\'Email."
var err_6 = "Attenzione ! Inserire l\'E-mail corretta."
var err_7 = "Attenzione ! Inserire il Giorno di Arrivo."
var err_8 = "Attenzione ! Inserire il Giorno di Partenza."
var err_9 = "Attenzione ! Inserire l\'Orario di Arrivo."
var err_10 = "Attenzione ! Il numero max di persone inserite è superiore ai posti letto selezionati."
var err_11 = "Attenzione ! Il numero max di persone inserite è inferiore ai posti letto selezionati."
var err_12 = "Attenzione ! Scegli una tipologia di stanza."
var err_13 = "Attenzione ! Inserire il numero delle persone."
var err_14 = "Attenzione ! La nostra struttura può ospitare un massimo di 20 persone."
var err_15 = "Attenzione ! Devi inserire tutti i dati, richiesti dal form, della tua carta di credito."
var err_16 = "Attenzione ! Il numero della carta di credito non è corretto."

}

if (document.theform.cognome.value==""){
alert(err_1);
document.theform.cognome.focus();
document.theform.cognome.style.backgroundColor = colore_avviso;
return false;
}
if (document.theform.nome.value==""){
alert(err_2);
document.theform.nome.focus();
document.theform.nome.style.backgroundColor = colore_avviso;
return false;
}
if (document.theform.citta.value==""){
alert(err_3);
document.theform.citta.focus();
document.theform.citta.style.backgroundColor = colore_avviso;
return false;
}
if (document.theform.telefono.value==""){
alert(err_4);
document.theform.telefono.focus();
document.theform.telefono.style.backgroundColor = colore_avviso;
return false;
}
if (document.theform.email.value==""){
alert(err_5);
document.theform.email.focus();
document.theform.email.style.backgroundColor = colore_avviso;
return false;
}
var x = document.theform.email.value;
var filter  = /^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i;
if (!(filter.test(x))){
alert(err_6);
document.theform.email.focus();
document.theform.email.style.backgroundColor = colore_avviso;
return false;
}
if (document.theform.arrivo.value==""){
alert(err_7);
document.theform.arrivo.focus();
document.theform.arrivo.style.backgroundColor = colore_avviso;
return false;
}
if (document.theform.partenza.value==""){
alert(err_8);
document.theform.partenza.focus();
document.theform.partenza.style.backgroundColor = colore_avviso;
return false;
}
if (document.theform.ora_arrivo.value=="0"){
alert(err_9);
document.theform.ora_arrivo.focus();
document.theform.ora_arrivo.style.backgroundColor = colore_avviso;
return false;
}
if (somma < persone){
alert(err_10);
document.theform.n_persone.focus();
document.theform.n_persone.style.backgroundColor = colore_avviso;
return false;
}
if (somma > persone){
alert(err_11);
document.theform.n_persone.focus();
document.theform.n_persone.style.backgroundColor = colore_avviso;
return false;
}
if (somma==0){
alert(err_12);
document.theform.camera1.style.backgroundColor = colore_avviso;
document.theform.camera2.style.backgroundColor = colore_avviso;
document.theform.camera3.style.backgroundColor = colore_avviso;
document.theform.camera4.style.backgroundColor = colore_avviso;
document.theform.camera5.style.backgroundColor = colore_avviso;
return false;
}
if (persone==0){
alert(err_13);
document.theform.n_persone.focus();
document.theform.n_persone.style.backgroundColor = colore_avviso;
return false;
}
//if (somma > 20){
//alert(err_14);
//document.theform.camera1.style.backgroundColor = colore_avviso;
//document.theform.camera2.style.backgroundColor = colore_avviso;
//document.theform.camera3.style.backgroundColor = colore_avviso;
//document.theform.camera4.style.backgroundColor = colore_avviso;
//document.theform.camera5.style.backgroundColor = colore_avviso;
//return false;
//}

if (modo==1){
document.theform.creditcard.style.backgroundColor = colore_normale;
document.theform.titolare.style.backgroundColor = colore_normale;
document.theform.numero.style.backgroundColor = colore_normale;
document.theform.ccmese.style.backgroundColor = colore_normale;
document.theform.ccanno.style.backgroundColor = colore_normale;
var cccard = document.theform.creditcard.options[document.theform.creditcard.options.selectedIndex].value;
var titcard = document.theform.titolare.value;
var numcard = document.theform.numero.value;
var mesecard = document.theform.ccmese.options[document.theform.ccmese.options.selectedIndex].value;
var annocard = document.theform.ccanno.options[document.theform.ccanno.options.selectedIndex].value;

if (cccard!="0"){
if (titcard=="" || numcard=="" || mesecard=="0" || annocard=="0"){
alert(err_15);
document.theform.titolare.style.backgroundColor = colore_avviso;
document.theform.numero.style.backgroundColor = colore_avviso;
document.theform.ccmese.style.backgroundColor = colore_avviso;
document.theform.ccanno.style.backgroundColor = colore_avviso;
return false;
}
if (numcard!=""){
if (!Mod10(numcard))  {
alert(err_16);
document.theform.numero.style.backgroundColor = colore_avviso;
return false;
}
}
}
else{
alert(err_15);
document.theform.creditcard.style.backgroundColor = colore_avviso;
return false;
}
}
}



//funzione che mi controllo la correttezza del numero della carta di credito
function Mod10(numcard) {  // v2.0
var valid = "0123456789"  // Valid digits in a credit card number
var len = numcard.length;  // The length of the submitted cc number
var iCCN = parseInt(numcard);  // integer of ccNumb
var sCCN = numcard.toString();  // string of ccNumb
sCCN = sCCN.replace (/^\s+|\s+$/g,'');  // strip spaces
var iTotal = 0;  // integer total set at zero
var bNum = true;  // by default assume it is a number
var bResult = false;  // by default assume it is NOT a valid cc
var temp;  // temp variable for parsing string
var calc;  // used for calculation of each digit
// Determine if the ccNumb is in fact all numbers
for (var j=0; j<len; j++) {
  temp = "" + sCCN.substring(j, j+1);
  if (valid.indexOf(temp) == "-1"){bNum = false;}
}
// if it is NOT a number, you can either alert to the fact, or just pass a failure
if(!bNum){
//alert("Not a Number"); //bResult = false;
}
// Determine if it is the proper length 
if((len == 0)&&(bResult)){  // nothing, field is blank AND passed above # check
  bResult = false;
} else{  // ccNumb is a number and the proper length - let's see if it is a valid card number
  if(len >= 15){  // 15 or 16 for Amex or V/MC
    for(var i=len;i>0;i--){  // LOOP throught the digits of the card
      calc = parseInt(iCCN) % 10;  // right most digit
      calc = parseInt(calc);  // assure it is an integer
      iTotal += calc;  // running total of the card number as we loop - Do Nothing to first digit
      i--;  // decrement the count - move to the next digit in the card
      iCCN = iCCN / 10;                               // subtracts right most digit from ccNumb
      calc = parseInt(iCCN) % 10 ;    // NEXT right most digit
      calc = calc *2;                                 // multiply the digit by two
    // Instead of some screwy method of converting 16 to a string and then parsing 1 and 6 and then adding them to make 7,
      // I use a simple switch statement to change the value of calc2 to 7 if 16 is the multiple.
      switch(calc){
        case 10: calc = 1; break;       //5*2=10 & 1+0 = 1
        case 12: calc = 3; break;       //6*2=12 & 1+2 = 3
        case 14: calc = 5; break;       //7*2=14 & 1+4 = 5
        case 16: calc = 7; break;       //8*2=16 & 1+6 = 7
        case 18: calc = 9; break;       //9*2=18 & 1+8 = 9
        default: calc = calc;           //4*2= 8 &   8 = 8  -same for all lower numbers
      }
    iCCN = iCCN / 10;  // subtracts right most digit from ccNum
    iTotal += calc;  // running total of the card number as we loop
  }  // END OF LOOP
  if ((iTotal%10)==0){  // check to see if the sum Mod 10 is zero
    bResult = true;  // This IS (or could be) a valid credit card number.
  } else {
    bResult = false;  // This could NOT be a valid credit card number
    }
  }
}
// change alert to on-page display or other indication as needed.
if(bResult) {
//alert("This IS a valid Credit Card Number!");
return true;
}
if(!bResult){
//alert("This is NOT a valid Credit Card Number!");
return false;
}
  return bResult; // Return the results
}







//funzione che mi apre le foto in una pop-up personalizzata
function apripopup(imageName,imageWidth,imageHeight,alt,posLeft,posTop) {
	newpop = window.open("","newpop","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop);
	newpop.document.open();
	newpop.document.write('<html><HEAD><title>' +alt+ '</title><LINK rel="stylesheet" href="font.css" type="text/css"></HEAD><body background='+imageName+'>'); 
	newpop.document.write('<table border="0" cellspacing="0" cellpadding="0" width='+imageWidth+' height='+imageHeight+'><tr><td align="right" valign="bottom"><a href="javascript:window.close();"><font class="corpo1" color="#FFFFFF">x Close Window</font></a></td></tr></table>'); 
	newpop.document.write('</body></html>');
	newpop.document.close();
	newpop.focus();
}