function checkCalendar()
{
 with (document.info)
 {
  if ((rentalbasis.value=='-') && (availability.value=='1'))
  {
   alert("Please select a Rental Basis");
   return(false);
  }
  else if (startdate.selectedIndex==0 || startmonth.selectedIndex==0 || startyear.selectedIndex==0)
  {
   alert("Please a valid From date");
   return(false);
  }
  else if (enddate.selectedIndex==0 || endmonth.selectedIndex==0 || endyear.selectedIndex==0)
  {
   alert("Please a valid End date");
   return(false);
  }
  else if (price.value=='' && availability.value=='1')
  {
   alert("Please enter a Rent amount");
   return(false);
  }  
  else 
  {
	var valid = "0123456789.";
	ok = 1;
	var temp;
	for (var i=0; i<price.value.length; i++)
	{
		temp = "" + price.value.substring(i, i+1);
		if (valid.indexOf(temp) == "-1")
			ok = 0;
	}
	if (ok==0 && price.value.length>0 && price.value!='-')
	{
		alert("Please only enter numbers in the price field.\nPlease note that for the purposes of expressing various terms such as area and price, we use the commonly accepted global method of presentation, which is a “.” rather than a “,”. For instance, 60 metres 50 centimetres is presented as 60.5 m. And 500 Euro is presented as 500.00 Euro, not 500,00 Euro.\n\nMerci de noter que pour toutes notions de chiffres, tels que surfaces et prix, nous utilisons la présentation universelle, c’est-à-dire un « . » plutôt qu’une « , ». Par exemple, 60 mètres 50 centimètres s’écrit 60.5m et 500 Euros s’écrit 500.00 Euros et non 500,00 Euros.");
		return(false);
	}
  }  
 }
}

function decimalOnly(field)
{
	var valid = "0123456789.";
	ok = 1;
	var temp;
	for (var i=0; i<field.value.length; i++)
	{
		temp = "" + field.value.substring(i, i+1);
		if (valid.indexOf(temp) == "-1")
			ok = 0;
	}
	if (ok==0 && field.value.length>0 && field.value!='-')
	{
		alert("Please only enter numbers in this field.\nPlease note that for the purposes of expressing various terms such as area and price, we use the commonly accepted global method of presentation, which is a “.” rather than a “,”. For instance, 60 metres 50 centimetres is presented as 60.5 m. And 500 Euro is presented as 500.00 Euro, not 500,00 Euro.\n\nMerci de noter que pour toutes notions de chiffres, tels que surfaces et prix, nous utilisons la présentation universelle, c’est-à-dire un « . » plutôt qu’une « , ». Par exemple, 60 mètres 50 centimètres s’écrit 60.5m et 500 Euros s’écrit 500.00 Euros et non 500,00 Euros.");
		field.focus();
		field.select();
	}

}

function applyToAllPriceFields()
{
	f=document.info;
        for (var i=1; i<document.info.total.value; i++)
        {
           f['price'+i].value=document.info.price0.value;
        }
}

function checkCountry()
{
 with (document.info)
 {
  if (countryid.value=='0')
  {
   alert("Please select a country\n\nMerci de choisir un pays");
   return(false);
  }
 }
}

function checkRegion()
{
 with (document.info)
 {
  if (regionid.value=='0')
  {
   alert("Please select a region\n\nMerci de choisir une région");
   return(false);
  }
 }
}

function checkArea()
{
 with (document.info)
 {
  if (areaid.value=='0')
  {
   alert("Please select an area\n\nMerci de choisir un territoire");
   return(false);
  }
 }
}

function checkResort()
{
 with (document.info)
 {
  if (resortid.value=='0')
  {
   alert("Please select a resort\n\nMerci de choisir une destination");
   return(false);
  }
 }
}

function checkTown()
{
 with (document.info)
 {
  if (townid.value=='0')
  {
   alert("Please select a town\n\nMerci de choisir une ville");
   return(false);
  }
 }
}


function checkTownForm()
{
  res=checkCountry();
  if (res==false) return(false);
  else
  {
    res=checkRegion();
    if (res==false) return(false);
    else
    {
       res=checkArea();
       if (res==false) return(false);
       else
       {
	  res=checkResort();
	  if (res==false) return(false);
          else
          {
	     res=checkTown();
	     if (res==false) return(false);
          }

       }
    }
  }  
}

function checkOwnerForm()
{
  temp1="";
  for (i=0; i<document.info.language.length; i++)
  {
   if (document.info.language[i].checked==true)
    temp1=temp1+document.info.language[i].value+",";
  }
  document.info.alllanguages.value=temp1.substring(0,temp1.length-1);

  with (document.info)
  {
   if (country.value=='-')
   {
    alert("Please select a country\n\nMerci de choisir un pays");
    return(false);
   }
   else if (fullname.value=='')
   {
    alert("Please enter your full name\n\nMerci d’indiquer vos nom et prénom");
    return(false);
   }
   else if (address.value=='')
   {
    alert("Please enter your address\n\nMerci d’indiquer votre adresse");
    return(false);
   }
   else if (city.value=='')
   {
    alert("Please enter your city\n\nMerci d’indiquer votre ville");
    return(false);
   }
   else if (postcode.value=='')
   {
    alert("Please enter your postcode\n\nMerci d’indiquer votre code postal");
    return(false);
   }
   else if (telephoneam.value=='')
   {
    alert("Please enter your daytime telepone\n\nMerci d’indiquer votre téléphone - journée");
    return(false);
   }
   else if (telephonepm.value=='')
   {
    alert("Please enter your evening telepone\n\nMerci d’indiquer votre téléphone - soirée");
    return(false);
   }
   else if (mobile.value=='')
   {
    alert("Please enter your mobile number\n\nMerci d’indiquer votre téléphone portable");
    return(false);
   }
   else if (alllanguages.value=='')
   {
     alert("Please select your language(s)\n\nMerci d’indiquer les langues parlées");
     return(false);
   }
   else if (password.value=='')
   {
     alert("Please enter your password\n\nMerci d’indiquer votre mot de passe");
     return(false);
   }
   else if (password.value!=password2.value)
   {
     alert("Password mismatch\n\nErreur de mot de passe");
     return(false);
   }
   else if (email.value=='')
   {
    alert("Please enter a valid email address\n\nMerci d’indiquer une adresse email valide");
    return(false);
   }

   if (email.value.indexOf(' ')>-1)
   {
    alert("Please enter your email address with no spaces\n\nMerci d’indiquer votre adresse email sans espace");
    return(false);
   }
   else (email.value!='')
   {
    var str = email.value;
    var supported = 0;
    if (window.RegExp)
    {
     var tempStr = "a";
     var tempReg = new RegExp(tempStr);
     if (tempReg.test(tempStr)) supported = 1;
    }
    if (!supported) 
     return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
    var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
    var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,9}|[0-9]{1,9})(\\]?)$");
    if ((!r1.test(str)==true)&&(r2.test(str)==false))
    {
     alert('Sorry, you must provide a real email address\n\nDésolé, l’adresse email indiquée n’existe pas');
     return(false);
    }
   }
  }
}

function checkextraFieldsfr()
{
  with (document.info)
  {
   if (shortdescription.value=='')
   {
	    alert("Please enter your short property description\n\nMerci de compléter la description générale de la propriété");
	    return(false);
   }
   else if (shortdescription.value.length>2000)
   {
	    alert("Please shorten your short property description to less than 2,000 characters\n\nMerci de limiter la description générale de votre propriété à 2 000 signes");
	    return(false);
   }
   else if (description.value=='')
   {
	    alert("Please enter your full property description\n\nMerci de compléter la description détaillée de la propriété");
	    return(false);
   }
   else if (description.value.length>3000)
   {
	    alert("Please shorten your full property description to less than 3,000 characters\n\nMerci de limiter la description détaillée de votre propriété à 3 000 signes");
	    return(false);
   }
   else if (areadescription.value=='')
   {	
	    alert("Please enter the area description\n\nMerci de compléter la description des environs");
	    return(false);
   }
   else if (areadescription.value.length>2000)
   {
	    alert("Please shorten the area description to less than 2,000 characters\n\nMerci de limiter la description des environs à 2 000 signes");
	    return(false);
   }
  }
}

function checkextraFields()
{
  with (document.info)
  {
   if (shortdescriptionfr.value=='')
   {
	    alert("Please enter your short property description\n\nMerci de compléter la description générale de la propriété");
	    return(false);
   }
   else if (shortdescriptionfr.value.length>2000)
   {
	    alert("Please shorten your short property description to less than 2,000 characters\n\nMerci de limiter la description générale de votre propriété à 2 000 signes");
	    return(false);
   }
   else if (descriptionfr.value=='')
   {
	    alert("Please enter your full property description\n\nMerci de compléter la description détaillée de la propriété");
	    return(false);
   }
   else if (descriptionfr.value.length>3000)
   {
	    alert("Please shorten your full property description to less than 3,000 characters\n\nMerci de limiter la description détaillée de votre propriété à 3 000 signes");
	    return(false);
   }
   else if (areadescriptionfr.value=='')
   {	
	    alert("Please enter the area description\n\nMerci de compléter la description des environs");
	    return(false);
   }
   else if (areadescriptionfr.value.length>2000)
   {
	    alert("Please shorten the area description to less than 2,000 characters\n\nMerci de limiter la description des environs à 2 000 signes");
	    return(false);
   }
  }
}

function checkPropertyForm()
{
  temp1="";
  for (i=0; i<document.info.propertyfacilityid.length; i++)
  {
   if (document.info.propertyfacilityid[i].checked==true)
    temp1=temp1+document.info.propertyfacilityid[i].value+",";
  }
  document.info.allpropertyfacilities.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.generalpropertyfacilityid.length; i++)
  {
   if (document.info.generalpropertyfacilityid[i].checked==true)
    temp1=temp1+document.info.generalpropertyfacilityid[i].value+",";
  }
  document.info.allgeneralpropertyfacilities.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.propertyentertainmentid.length; i++)
  {
   if (document.info.propertyentertainmentid[i].checked==true)
    temp1=temp1+document.info.propertyentertainmentid[i].value+",";
  }
  document.info.allpropertyentertainment.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.suitabilityid.length; i++)
  {
   if (document.info.suitabilityid[i].checked==true)
    temp1=temp1+document.info.suitabilityid[i].value+",";
  }
  document.info.allsuitability.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.outsideid.length; i++)
  {
   if (document.info.outsideid[i].checked==true)
    temp1=temp1+document.info.outsideid[i].value+",";
  }
  document.info.alloutside.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.activityid.length; i++)
  {
   if (document.info.activityid[i].checked==true)
    temp1=temp1+document.info.activityid[i].value+",";
  }
  document.info.allactivity.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.bathroom1.length; i++)
  {
   if (document.info.bathroom1[i].checked==true)
    temp1=temp1+document.info.bathroom1[i].value+",";
  }
  document.info.bathroominfo1.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom2.length; i++)
  {
   if (document.info.bathroom2[i].checked==true)
    temp1=temp1+document.info.bathroom2[i].value+",";
  }
  document.info.bathroominfo2.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom3.length; i++)
  {
   if (document.info.bathroom3[i].checked==true)
    temp1=temp1+document.info.bathroom3[i].value+",";
  }
  document.info.bathroominfo3.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom4.length; i++)
  {
   if (document.info.bathroom4[i].checked==true)
    temp1=temp1+document.info.bathroom4[i].value+",";
  }
  document.info.bathroominfo4.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom5.length; i++)
  {
   if (document.info.bathroom5[i].checked==true)
    temp1=temp1+document.info.bathroom5[i].value+",";
  }
  document.info.bathroominfo5.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom6.length; i++)
  {
   if (document.info.bathroom6[i].checked==true)
    temp1=temp1+document.info.bathroom6[i].value+",";
  }
  document.info.bathroominfo6.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom7.length; i++)
  {
   if (document.info.bathroom7[i].checked==true)
    temp1=temp1+document.info.bathroom7[i].value+",";
  }
  document.info.bathroominfo7.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom8.length; i++)
  {
   if (document.info.bathroom8[i].checked==true)
    temp1=temp1+document.info.bathroom8[i].value+",";
  }
  document.info.bathroominfo8.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom9.length; i++)
  {
   if (document.info.bathroom9[i].checked==true)
    temp1=temp1+document.info.bathroom9[i].value+",";
  }
  document.info.bathroominfo9.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom10.length; i++)
  {
   if (document.info.bathroom10[i].checked==true)
    temp1=temp1+document.info.bathroom10[i].value+",";
  }
  document.info.bathroominfo10.value=temp1.substring(0,temp1.length-1);

  with (document.info)
  {
   if (email.value=='')
   {
    alert("Please enter a valid email address\n\nMerci d’indiquer une adresse email valide");
    return(false);
   }
   else if (propertytypeid.value=='0')
   {
    alert("Please select a property type\n\nMerci de choisir un type de propriété");
    return(false);
   }
   else if (accommodationtypeid.value=='0')
   {
    alert("Please select an accommodation type\n\nMerci de choisir un type de logement");
    return(false);
   }
   else if (propertyname.value=='')
   {
    alert("Please enter a property name\n\nMerci d’indiquer un nom de propriété");
    return(false);
   }
   else if (address1.value=='')
   {
    alert("Please enter your address\n\nMerci d’indiquer votre adresse");
    return(false);
   }
   else if (((attraction1.value!='') && (attraction1.value!='-') && ((distanceattraction1.value=='') || (distanceattraction1.value=='-'))) || ((attraction2.value!='') && (attraction2.value!='-') && ((distanceattraction2.value=='') || (distanceattraction2.value=='-'))) || ((attraction3.value!='') && (attraction3.value!='-') && ((distanceattraction3.value=='') || (distanceattraction3.value=='-'))) || ((attraction4.value!='') && (attraction4.value!='-') && ((distanceattraction4.value=='') || (distanceattraction4.value=='-'))) || ((attraction5.value!='') && (attraction5.value!='-') && ((distanceattraction5.value=='') || (distanceattraction5.value=='-'))) || ((attraction6.value!='') && (attraction6.value!='-') && ((distanceattraction6.value=='') || (distanceattraction6.value=='-'))) || ((attraction7.value!='') && (attraction7.value!='-') && ((distanceattraction7.value=='') || (distanceattraction7.value=='-'))) || ((attraction8.value!='') && (attraction8.value!='-') && ((distanceattraction8.value=='') || (distanceattraction8.value=='-'))) || ((attraction9.value!='') && (attraction9.value!='-') && ((distanceattraction9.value=='') || (distanceattraction9.value=='-'))) || ((attraction10.value!='') && (attraction10.value!='-') && ((distanceattraction10.value=='') || (distanceattraction10.value=='-'))))
   {
    alert("Please enter the walking distance from each of the key locations identified above\n\nMerci d’indiquer la distance à parcourir de chacun des lieux clé mentionnés ci-dessus");
    return(false);
   }
   else if (floorarea.value=='')
   {
    alert("Please enter the property floor area\n\nMerci d’indiquer la surface habitable");
    return(false);
   }
   else if ((bedtype1a.selectedIndex==0 || numberbeds1a.selectedIndex==0) && (bedtypelivingrooma.selectedIndex==0 || numberbedslivingrooma.selectedIndex==0) && (bedtypediningrooma.selectedIndex==0 || numberbedsdiningrooma.selectedIndex==0) && (bedtypehalla.selectedIndex==0 || numberbedshalla.selectedIndex==0))
   {
    alert("Please enter the sleeping arrangements\n\nMerci de compléter la description des chambres");
    return(false);
   }
   //else if (sleeps.value=='0')
   //{
    //alert("Please select the number of people\n\nMerci de choisir le nombre de personnes");
    //return(false);
   //}
   else if (numberrooms.value=='0')
   {
    alert("Please enter the property number of rooms\n\nMerci d’indiquer le nombre de pièces de votre propriété");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo1.value=='' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("Please choose number of separate bathrooms\n\nMerci d’indiquer le nombre de salles de bain");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo1.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo2.value=='Toilet' && document.info.bathroominfo1.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo3.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo4.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo5.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo6.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo7.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo8.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo9.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo10.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo1.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberwc.value=='-1')
   {
    alert("Please choose number of WCs\n\nMerci d’indiquer le nombre de toilettes séparés");
    return(false);
   }
   else if (diningroom.value=='-1')
   {
    alert("Please enter the dining room seating\n\nMerci d’indiquer le nombre de places assises – salle à manger");
    return(false);
   }
   else if (livingroom.value=='-1')
   {
    alert("Please enter the living room seating\n\nMerci d’indiquer le nombre de places assises – salle de séjour");
    return(false);
   }
   else if (numberbedrooms.value=='-1')
   {
    alert("Please enter the property number of bedrooms\n\nMerci d’indiquer le nombre de chambres de votre propriété");
    return(false);
   }
   else if (numberbeds.value=='-1')
   {
    alert("Please enter the property number of beds\n\nMerci d’indiquer le nombre de lits");
    return(false);
   }
   else if (sleepingarrangements.value.length>500)
   {
	    alert("Please shorten your sleeping arrangements to less than 500 characters\n\nMerci de limiter votre description des couchages à 500 signes");
	    return(false);
   }
   else 
   {
     res=checkTownForm();
     if (res==false) return(false);
     else 
     { 
	livingroommessage='';
	beds=numberbeds.value;
        if (beds.length>=2) beds=beds.substring(0,beds.length-1);
        if (bedtypelivingrooma.selectedIndex>0 || bedtypediningrooma.selectedIndex>0 || bedtypehalla.selectedIndex>0) livingroommessage=' (including living room)';
        res=window.confirm('The new number of bedrooms is '+numberbedrooms.value+livingroommessage+' and the number of beds is '+beds+livingroommessage+'. If this is correct please click Continue. If it is incorrect please click Cancel and update the sleeping arrangements again');
	if (res==false) return(false);
	else 
	{
		window.alert('Important! Your property about to be created / updated. Please do not click on the Submit button again as this may cause the property to be created twice. A confirmation page will appear when the creation / update is successful. Please press OK to proceed.');
		return(true);
	}
     }
   }
  }
}

function checkPropertyForm2()
{
  with (document.info)
  {
   if (shortdescription.value=='')
   {
	    alert("Please enter your short property description\n\nMerci de compléter la description générale de la propriété");
	    return(false);
   }
   else if (shortdescription.value.length>2000)
   {
	    alert("Please shorten your short property description to less than 2,000 characters\n\nMerci de limiter la description générale de votre propriété à 2 000 signes");
	    return(false);
   }
   else if (description.value=='')
   {
	    alert("Please enter your full property description\n\nMerci de compléter la description détaillée de la propriété");
	    return(false);
   }
   else if (description.value.length>3000)
   {
	    alert("Please shorten your full property description to less than 3,000 characters\n\nMerci de limiter la description détaillée de votre propriété à 3 000 signes");
	    return(false);
   }
   else if (areadescription.value=='')
   {	
	    alert("Please enter the area description\n\nMerci de compléter la description des environs");
	    return(false);
   }
   else if (areadescription.value.length>2000)
   {
	    alert("Please shorten the area description to less than 2,000 characters\n\nMerci de limiter la description des environs à 2 000 signes");
	    return(false);
   }
   else if (initialdeposit.value=='')
   {
    alert("Please enter the initial deposit\n\nMerci d’indiquer le montant de l’acompte initial");
    return(false);
   }
   else if (perioddepositpayable.value=='')
   {
    alert("Please enter the period after booking that deposit is payable\n\nMerci d’indiquer le nombre de jours après réservation pour payer l’acompte");
    return(false);
   }
   else if (periodbalancepayable.value=='')
   {
    alert("Please enter the period before occupation that balance is payable\n\nMerci d’indiquer le nombre de jours avant début location pour payer le loyer dû");
    return(false);
   }
   else if (acceptterms.checked==false)
   {
    alert("You must tick the box to confirm that you have accepted the Terms and Conditions\n\nVous devez cocher la case pour confirmer que vous acceptez les Conditions Générales");
    return(false);
   }
   else 
   {
	return(true);
   }
  }
}


function checkPropertyFormfr()
{
  temp1="";
  for (i=0; i<document.info.propertyfacilityid.length; i++)
  {
   if (document.info.propertyfacilityid[i].checked==true)
    temp1=temp1+document.info.propertyfacilityid[i].value+",";
  }
  document.info.allpropertyfacilities.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.generalpropertyfacilityid.length; i++)
  {
   if (document.info.generalpropertyfacilityid[i].checked==true)
    temp1=temp1+document.info.generalpropertyfacilityid[i].value+",";
  }
  document.info.allgeneralpropertyfacilities.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.propertyentertainmentid.length; i++)
  {
   if (document.info.propertyentertainmentid[i].checked==true)
    temp1=temp1+document.info.propertyentertainmentid[i].value+",";
  }
  document.info.allpropertyentertainment.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.suitabilityid.length; i++)
  {
   if (document.info.suitabilityid[i].checked==true)
    temp1=temp1+document.info.suitabilityid[i].value+",";
  }
  document.info.allsuitability.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.outsideid.length; i++)
  {
   if (document.info.outsideid[i].checked==true)
    temp1=temp1+document.info.outsideid[i].value+",";
  }
  document.info.alloutside.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.activityid.length; i++)
  {
   if (document.info.activityid[i].checked==true)
    temp1=temp1+document.info.activityid[i].value+",";
  }
  document.info.allactivity.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.bathroom1.length; i++)
  {
   if (document.info.bathroom1[i].checked==true)
    temp1=temp1+document.info.bathroom1[i].value+",";
  }
  document.info.bathroominfo1.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom2.length; i++)
  {
   if (document.info.bathroom2[i].checked==true)
    temp1=temp1+document.info.bathroom2[i].value+",";
  }
  document.info.bathroominfo2.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom3.length; i++)
  {
   if (document.info.bathroom3[i].checked==true)
    temp1=temp1+document.info.bathroom3[i].value+",";
  }
  document.info.bathroominfo3.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom4.length; i++)
  {
   if (document.info.bathroom4[i].checked==true)
    temp1=temp1+document.info.bathroom4[i].value+",";
  }
  document.info.bathroominfo4.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom5.length; i++)
  {
   if (document.info.bathroom5[i].checked==true)
    temp1=temp1+document.info.bathroom5[i].value+",";
  }
  document.info.bathroominfo5.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom6.length; i++)
  {
   if (document.info.bathroom6[i].checked==true)
    temp1=temp1+document.info.bathroom6[i].value+",";
  }
  document.info.bathroominfo6.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom7.length; i++)
  {
   if (document.info.bathroom7[i].checked==true)
    temp1=temp1+document.info.bathroom7[i].value+",";
  }
  document.info.bathroominfo7.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom8.length; i++)
  {
   if (document.info.bathroom8[i].checked==true)
    temp1=temp1+document.info.bathroom8[i].value+",";
  }
  document.info.bathroominfo8.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom9.length; i++)
  {
   if (document.info.bathroom9[i].checked==true)
    temp1=temp1+document.info.bathroom9[i].value+",";
  }
  document.info.bathroominfo9.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom10.length; i++)
  {
   if (document.info.bathroom10[i].checked==true)
    temp1=temp1+document.info.bathroom10[i].value+",";
  }
  document.info.bathroominfo10.value=temp1.substring(0,temp1.length-1);

  with (document.info)
  {
   if (email.value=='')
   {
    alert("Please enter a valid email address\n\nMerci d’indiquer une adresse email valide");
    return(false);
   }
   else if (propertytypeid.value=='0')
   {
    alert("Please select a property type\n\nMerci de choisir un type de propriété");
    return(false);
   }
   else if (accommodationtypeid.value=='0')
   {
    alert("Please select an accommodation type\n\nMerci de choisir un type de logement");
    return(false);
   }
   else if (propertyname.value=='')
   {
    alert("Please enter a property name\n\nMerci d’indiquer un nom de propriété");
    return(false);
   }
   else if (address1.value=='')
   {
    alert("Please enter your address\n\nMerci d’indiquer votre adresse");
    return(false);
   }
   else if (((attraction1.value!='') && (attraction1.value!='-') && ((distanceattraction1.value=='') || (distanceattraction1.value=='-'))) || ((attraction2.value!='') && (attraction2.value!='-') && ((distanceattraction2.value=='') || (distanceattraction2.value=='-'))) || ((attraction3.value!='') && (attraction3.value!='-') && ((distanceattraction3.value=='') || (distanceattraction3.value=='-'))) || ((attraction4.value!='') && (attraction4.value!='-') && ((distanceattraction4.value=='') || (distanceattraction4.value=='-'))) || ((attraction5.value!='') && (attraction5.value!='-') && ((distanceattraction5.value=='') || (distanceattraction5.value=='-'))) || ((attraction6.value!='') && (attraction6.value!='-') && ((distanceattraction6.value=='') || (distanceattraction6.value=='-'))) || ((attraction7.value!='') && (attraction7.value!='-') && ((distanceattraction7.value=='') || (distanceattraction7.value=='-'))) || ((attraction8.value!='') && (attraction8.value!='-') && ((distanceattraction8.value=='') || (distanceattraction8.value=='-'))) || ((attraction9.value!='') && (attraction9.value!='-') && ((distanceattraction9.value=='') || (distanceattraction9.value=='-'))) || ((attraction10.value!='') && (attraction10.value!='-') && ((distanceattraction10.value=='') || (distanceattraction10.value=='-'))))
   {
    alert("Please enter the walking distance from each of the key locations identified above\n\nMerci d’indiquer la distance à parcourir de chacun des lieux clé mentionnés ci-dessus");
    return(false);
   }
   else if (floorarea.value=='')
   {
    alert("Please enter the property floor area\n\nMerci d’indiquer la surface habitable");
    return(false);
   }
   else if ((bedtype1a.selectedIndex==0 || numberbeds1a.selectedIndex==0) && (bedtypelivingrooma.selectedIndex==0 || numberbedslivingrooma.selectedIndex==0) && (bedtypediningrooma.selectedIndex==0 || numberbedsdiningrooma.selectedIndex==0) && (bedtypehalla.selectedIndex==0 || numberbedshalla.selectedIndex==0))
   {
    alert("Please enter the sleeping arrangements\n\nMerci de compléter la description des chambres");
    return(false);
   }
   //else if (sleeps.value=='0')
   //{
    //alert("Please select the number of people\n\nMerci de choisir le nombre de personnes");
    //return(false);
   //}
   else if (numberrooms.value=='0')
   {
    alert("Please enter the property number of rooms\n\nMerci d’indiquer le nombre de pièces de votre propriété");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo1.value=='' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("Please choose number of separate bathrooms\n\nMerci d’indiquer le nombre de salles de bain");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo1.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo2.value=='Toilet' && document.info.bathroominfo1.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo3.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo4.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo5.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo6.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo7.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo8.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo9.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo10.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo1.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberwc.value=='-1')
   {
    alert("Please choose number of WCs\n\nMerci d’indiquer le nombre de toilettes séparés");
    return(false);
   }
   else if (diningroom.value=='-1')
   {
    alert("Please enter the dining room seating\n\nMerci d’indiquer le nombre de places assises – salle à manger");
    return(false);
   }
   else if (livingroom.value=='-1')
   {
    alert("Please enter the living room seating\n\nMerci d’indiquer le nombre de places assises – salle de séjour");
    return(false);
   }
   else if (numberbedrooms.value=='-1')
   {
    alert("Please enter the property number of bedrooms\n\nMerci d’indiquer le nombre de chambres de votre propriété");
    return(false);
   }
   else if (numberbeds.value=='-1')
   {
    alert("Please enter the property number of beds\n\nMerci d’indiquer le nombre de lits");
    return(false);
   }
   else if (sleepingarrangementsfr.value.length>500)
   {
	    alert("Please shorten your sleeping arrangements to less than 500 characters\n\nMerci de limiter votre description des couchages à 500 signes");
	    return(false);
   }
   else 
   {
     res=checkTownForm();
     if (res==false) return(false);
     else 
     { 
	beds=numberbeds.value;
        if (beds.length>=2) beds=beds.substring(0,beds.length-1);
	livingroommessage='';
        if (bedtypelivingrooma.selectedIndex>0 || bedtypediningrooma.selectedIndex>0 || bedtypehalla.selectedIndex>0) livingroommessage=' (salon inclus)';
        res=window.confirm('Le nouveau nombre de chambres est de '+numberbedrooms.value+livingroommessage+' et le nombre de lits est de '+beds+livingroommessage+' . Si ces informations sont correctes, merci de cliquer sur "Continue". Si ce n`est pas correct, merci de cliquer sur "Cancel" afin de remettre à jour la description des chambres.');
	if (res==false) return(false);
	else 
	{
		window.alert('Important ! Votre propriété est en cours de création / mise à jour. Merci de ne pas cliquer à nouveau sur le bouton Enregistrer car cela pourrait causer une double création. Un message de confirmation apparaîtra lorsque la création / mise à jour sera effectuée.');
		return(true);
	}
     }
   }
  }
}

function showbedsmessagefr()
{
   with(document.info)
   {
       if ((bedtype1a.selectedIndex==0 || numberbeds1a.selectedIndex==0) && (bedtypelivingrooma.selectedIndex==0 || numberbedslivingrooma.selectedIndex==0) && (bedtypediningrooma.selectedIndex==0 || numberbedsdiningrooma.selectedIndex==0) && (bedtypehalla.selectedIndex==0 || numberbedshalla.selectedIndex==0))
       {
	    alert("Merci de compléter la description des chambres");
	    return(false);
       }
       else
       {
	beds=numberbeds.value;
        if (beds.length>=2) beds=beds.substring(0,beds.length-1);
	livingroommessage='';
        if (bedtypelivingrooma.selectedIndex>0 || bedtypediningrooma.selectedIndex>0 || bedtypehalla.selectedIndex>0) livingroommessage=' (salon inclus)';
        res=window.confirm('Le nouveau nombre de chambres est de '+numberbedrooms.value+livingroommessage+' et le nombre de lits est de '+beds+livingroommessage+' . Si ces informations sont correctes, merci de cliquer sur "Continue". Si ce n`est pas correct, merci de cliquer sur "Cancel" afin de remettre à jour la description des chambres.');
	if (res==false) return(false)
	else return(checkUpdatePropertyFormfr());
       }
   }
}

function showbedsmessage()
{
   with(document.info)
   {
       if ((bedtype1a.selectedIndex==0 || numberbeds1a.selectedIndex==0) && (bedtypelivingrooma.selectedIndex==0 || numberbedslivingrooma.selectedIndex==0) && (bedtypediningrooma.selectedIndex==0 || numberbedsdiningrooma.selectedIndex==0) && (bedtypehalla.selectedIndex==0 || numberbedshalla.selectedIndex==0))
       {
	    alert("Please enter the sleeping arrangements");
	    return(false);
       }
       else
       {
	beds=numberbeds.value;
        if (beds.length>=2) beds=beds.substring(0,beds.length-1);
	livingroommessage='';
        if (bedtypelivingrooma.selectedIndex>0 || bedtypediningrooma.selectedIndex>0 || bedtypehalla.selectedIndex>0) livingroommessage=' (salon inclus)';
        res=window.confirm('The new number of bedrooms is '+numberbedrooms.value+livingroommessage+' and the number of beds is '+beds+livingroommessage+'. If this is correct please click Continue. If it is incorrect please click Cancel and update the sleeping arrangements again');
	if (res==false) return(false)
	else return(checkUpdatePropertyForm());
       }
   }
}

function checkPropertyForm2fr()
{
  with (document.info)
  {
   if (shortdescriptionfr.value=='')
   {
	    alert("Please enter your short property description\n\nMerci de compléter la description générale de la propriété");
	    return(false);
   }
   else if (shortdescriptionfr.value.length>2000)
   {
	    alert("Please shorten your short property description to less than 2,000 characters\n\nMerci de limiter la description générale de votre propriété à 2 000 signes");
	    return(false);
   }
   else if (descriptionfr.value=='')
   {
	    alert("Please enter your full property description\n\nMerci de compléter la description détaillée de la propriété");
	    return(false);
   }
   else if (descriptionfr.value.length>3000)
   {
	    alert("Please shorten your full property description to less than 3,000 characters\n\nMerci de limiter la description détaillée de votre propriété à 3 000 signes");
	    return(false);
   }
   else if (areadescriptionfr.value=='')
   {	
	    alert("Please enter the area description\n\nMerci de compléter la description des environs");
	    return(false);
   }
   else if (areadescriptionfr.value.length>2000)
   {
	    alert("Please shorten the area description to less than 2,000 characters\n\nMerci de limiter la description des environs à 2 000 signes");
	    return(false);
   }
   else if (initialdeposit.value=='')
   {
    alert("Please enter the initial deposit\n\nMerci d’indiquer le montant de l’acompte initial");
    return(false);
   }
   else if (perioddepositpayable.value=='')
   {
    alert("Please enter the period after booking that deposit is payable\n\nMerci d’indiquer le nombre de jours après réservation pour payer l’acompte");
    return(false);
   }
   else if (periodbalancepayable.value=='')
   {
    alert("Please enter the period before occupation that balance is payable\n\nMerci d’indiquer le nombre de jours avant début location pour payer le loyer dû");
    return(false);
   }
   else if (acceptterms.checked==false)
   {
    alert("You must tick the box to confirm that you have accepted the Terms and Conditions\n\nVous devez cocher la case pour confirmer que vous acceptez les Conditions Générales. Merci de cliquer sur OK pour continuer");
    return(false);
   }
   else 
   {
	return(true);
   }
  }
}

function checkUpdatePropertyForm()
{
  temp1="";
  for (i=0; i<document.info.propertyfacilityid.length; i++)
  {
   if (document.info.propertyfacilityid[i].checked==true)
    temp1=temp1+document.info.propertyfacilityid[i].value+",";
  }
  document.info.allpropertyfacilities.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.generalpropertyfacilityid.length; i++)
  {
   if (document.info.generalpropertyfacilityid[i].checked==true)
    temp1=temp1+document.info.generalpropertyfacilityid[i].value+",";
  }
  document.info.allgeneralpropertyfacilities.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.propertyentertainmentid.length; i++)
  {
   if (document.info.propertyentertainmentid[i].checked==true)
    temp1=temp1+document.info.propertyentertainmentid[i].value+",";
  }
  document.info.allpropertyentertainment.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.suitabilityid.length; i++)
  {
   if (document.info.suitabilityid[i].checked==true)
    temp1=temp1+document.info.suitabilityid[i].value+",";
  }
  document.info.allsuitability.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.outsideid.length; i++)
  {
   if (document.info.outsideid[i].checked==true)
    temp1=temp1+document.info.outsideid[i].value+",";
  }
  document.info.alloutside.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.activityid.length; i++)
  {
   if (document.info.activityid[i].checked==true)
    temp1=temp1+document.info.activityid[i].value+",";
  }
  document.info.allactivity.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.bathroom1.length; i++)
  {
   if (document.info.bathroom1[i].checked==true)
    temp1=temp1+document.info.bathroom1[i].value+",";
  }
  document.info.bathroominfo1.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom2.length; i++)
  {
   if (document.info.bathroom2[i].checked==true)
    temp1=temp1+document.info.bathroom2[i].value+",";
  }
  document.info.bathroominfo2.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom3.length; i++)
  {
   if (document.info.bathroom3[i].checked==true)
    temp1=temp1+document.info.bathroom3[i].value+",";
  }
  document.info.bathroominfo3.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom4.length; i++)
  {
   if (document.info.bathroom4[i].checked==true)
    temp1=temp1+document.info.bathroom4[i].value+",";
  }
  document.info.bathroominfo4.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom5.length; i++)
  {
   if (document.info.bathroom5[i].checked==true)
    temp1=temp1+document.info.bathroom5[i].value+",";
  }
  document.info.bathroominfo5.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom6.length; i++)
  {
   if (document.info.bathroom6[i].checked==true)
    temp1=temp1+document.info.bathroom6[i].value+",";
  }
  document.info.bathroominfo6.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom7.length; i++)
  {
   if (document.info.bathroom7[i].checked==true)
    temp1=temp1+document.info.bathroom7[i].value+",";
  }
  document.info.bathroominfo7.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom8.length; i++)
  {
   if (document.info.bathroom8[i].checked==true)
    temp1=temp1+document.info.bathroom8[i].value+",";
  }
  document.info.bathroominfo8.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom9.length; i++)
  {
   if (document.info.bathroom9[i].checked==true)
    temp1=temp1+document.info.bathroom9[i].value+",";
  }
  document.info.bathroominfo9.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom10.length; i++)
  {
   if (document.info.bathroom10[i].checked==true)
    temp1=temp1+document.info.bathroom10[i].value+",";
  }
  document.info.bathroominfo10.value=temp1.substring(0,temp1.length-1);


  with (document.info)
  {
   if (email.value=='')
   {
    alert("Please enter a valid email address\n\nMerci d’indiquer une adresse email valide");
    return(false);
   }
   else if (propertytypeid.value=='0')
   {
    alert("Please select a property type\n\nMerci de choisir un type de propriété");
    return(false);
   }
   else if (accommodationtypeid.value=='0')
   {
    alert("Please select an accommodation type\n\nMerci de choisir un type de logement");
    return(false);
   }
   else if (propertyname.value=='')
   {
    alert("Please enter a property name\n\nMerci d’indiquer un nom de propriété");
    return(false);
   }
   else if (address1.value=='')
   {
    alert("Please enter your address\n\nMerci d’indiquer votre adresse");
    return(false);
   }
   else if (((attraction1.value!='') && (attraction1.value!='-') && ((distanceattraction1.value=='') || (distanceattraction1.value=='-'))) || ((attraction2.value!='') && (attraction2.value!='-') && ((distanceattraction2.value=='') || (distanceattraction2.value=='-'))) || ((attraction3.value!='') && (attraction3.value!='-') && ((distanceattraction3.value=='') || (distanceattraction3.value=='-'))) || ((attraction4.value!='') && (attraction4.value!='-') && ((distanceattraction4.value=='') || (distanceattraction4.value=='-'))) || ((attraction5.value!='') && (attraction5.value!='-') && ((distanceattraction5.value=='') || (distanceattraction5.value=='-'))) || ((attraction6.value!='') && (attraction6.value!='-') && ((distanceattraction6.value=='') || (distanceattraction6.value=='-'))) || ((attraction7.value!='') && (attraction7.value!='-') && ((distanceattraction7.value=='') || (distanceattraction7.value=='-'))) || ((attraction8.value!='') && (attraction8.value!='-') && ((distanceattraction8.value=='') || (distanceattraction8.value=='-'))) || ((attraction9.value!='') && (attraction9.value!='-') && ((distanceattraction9.value=='') || (distanceattraction9.value=='-'))) || ((attraction10.value!='') && (attraction10.value!='-') && ((distanceattraction10.value=='') || (distanceattraction10.value=='-'))))
   {
    alert("Please enter the walking distance from each of the key locations identified above\n\nMerci d’indiquer la distance à parcourir de chacun des lieux clé mentionnés ci-dessus");
    return(false);
   }
   else if (floorarea.value=='')
   {
    alert("Please enter the property floor area\n\nMerci d’indiquer la surface habitable");
    return(false);
   }
   else if ((bedtype1a.selectedIndex==0 || numberbeds1a.selectedIndex==0) && (bedtypelivingrooma.selectedIndex==0 || numberbedslivingrooma.selectedIndex==0) && (bedtypediningrooma.selectedIndex==0 || numberbedsdiningrooma.selectedIndex==0) && (bedtypehalla.selectedIndex==0 || numberbedshalla.selectedIndex==0))
   {
    alert("Please enter the sleeping arrangements\n\nMerci de compléter la description des chambres");
    return(false);
   }
   //else if (sleeps.value=='0')
   //{
    //alert("Please select the number of people\n\nMerci de choisir le nombre de personnes");
    //return(false);
   //}
   else if (numberrooms.value=='0')
   {
    alert("Please enter the property number of rooms\n\nMerci d’indiquer le nombre de pièces de votre propriété");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo1.value=='' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("Please choose number of separate bathrooms\n\nMerci d’indiquer le nombre de salles de bain");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo1.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo2.value=='Toilet' && document.info.bathroominfo1.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo3.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo4.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo5.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo6.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo7.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo8.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo9.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo10.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo1.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }   else if (numberwc.value=='-1')
   {
    alert("Please choose number of WCs\n\nMerci d’indiquer le nombre de toilettes séparés");
    return(false);
   }
   else if (diningroom.value=='-1')
   {
    alert("Please enter the dining room seating\n\nMerci d’indiquer le nombre de places assises – salle à manger");
    return(false);
   }
   else if (livingroom.value=='-1')
   {
    alert("Please enter the living room seating\n\nMerci d’indiquer le nombre de places assises – salle de séjour");
    return(false);
   }
   else if (numberbedrooms.value=='-1')
   {
    alert("Please enter the property number of bedrooms\n\nMerci d’indiquer le nombre de chambres de votre propriété");
    return(false);
   }
   else if (numberbeds.value=='-1')
   {
    alert("Please enter the property number of beds\n\nMerci d’indiquer le nombre de lits");
    return(false);
   }
   else if (sleepingarrangements.value.length>500)
   {
	    alert("Please shorten your sleeping arrangements to less than 500 characters\n\nMerci de limiter votre description des couchages à 500 signes");
	    return(false);
   }
   else if (shortdescription.value=='')
   {
	    alert("Please enter your short property description\n\nMerci de compléter la description générale de la propriété");
	    return(false);
   }
   else if (shortdescription.value.length>2000)
   {
	    alert("Please shorten your short property description to less than 2,000 characters\n\nMerci de limiter la description générale de votre propriété à 2 000 signes");
	    return(false);
   }
   else if (description.value=='')
   {
	    alert("Please enter your full property description\n\nMerci de compléter la description détaillée de la propriété");
	    return(false);
   }
   else if (description.value.length>3000)
   {
	    alert("Please shorten your full property description to less than 3,000 characters\n\nMerci de limiter la description détaillée de votre propriété à 3 000 signes");
	    return(false);
   }
   else if (areadescription.value=='')
   {	
	    alert("Please enter the area description\n\nMerci de compléter la description des environs");
	    return(false);
   }
   else if (areadescription.value.length>2000)
   {
	    alert("Please shorten the area description to less than 2,000 characters\n\nMerci de limiter la description des environs à 2 000 signes");
	    return(false);
   }
   else if (sleepingarrangementsfr.value.length>500)
   {
	    alert("Please shorten your french sleeping arrangements to less than 500 characters");
	    return(false);
   }
   else if (shortdescriptionfr.value=='')
   {
	    alert("Please enter your french short property description");
	    return(false);
   }
   else if (shortdescriptionfr.value.length>2000)
   {
	    alert("Please shorten your french short property description to less than 2,000 characters");
	    return(false);
   }
   else if (descriptionfr.value=='')
   {
	    alert("Please enter your french full property description");
	    return(false);
   }
   else if (descriptionfr.value.length>3000)
   {
	    alert("Please shorten your french full property description to less than 3,000 characters");
	    return(false);
   }
   else if (areadescriptionfr.value=='')
   {	
	    alert("Please enter the french area description");
	    return(false);
   }
   else if (areadescriptionfr.value.length>2000)
   {
	    alert("Please shorten the french area description to less than 2,000 characters");
	    return(false);
   }
   else if (initialdeposit.value=='')
   {
    alert("Please enter the initial deposit\n\nMerci d’indiquer le montant de l’acompte initial");
    return(false);
   }

   else if (perioddepositpayable.value=='')
   {
    alert("Please enter the period after booking that deposit is payable\n\nMerci d’indiquer le nombre de jours après réservation pour payer l’acompte");
    return(false);
   }
   else if (periodbalancepayable.value=='')
   {
    alert("Please enter the period before occupation that balance is payable\n\nMerci d’indiquer le nombre de jours avant début location pour payer le loyer dû");
    return(false);
   }
   else if (acceptterms.checked==false)
   {
    alert("You must tick the box to confirm that you have accepted the Terms and Conditions\n\nVous devez cocher la case pour confirmer que vous acceptez les Conditions Générales");
    return(false);
   }
   else 
   {
     res=checkTownForm();
     if (res==false) return(false);
     else 
     { 
	calculatebedrooms('0');
	calctotalbathrooms();
	window.alert('Important! Your property about to be created / updated. Please do not click on the Submit button again as this may cause the property to be created twice. A confirmation page will appear when the creation / update is successful. Please press OK to proceed.');
	return(true);
     }
   }
  }
}

function checkUpdatePropertyFormfr()
{
  temp1="";
  for (i=0; i<document.info.propertyfacilityid.length; i++)
  {
   if (document.info.propertyfacilityid[i].checked==true)
    temp1=temp1+document.info.propertyfacilityid[i].value+",";
  }
  document.info.allpropertyfacilities.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.generalpropertyfacilityid.length; i++)
  {
   if (document.info.generalpropertyfacilityid[i].checked==true)
    temp1=temp1+document.info.generalpropertyfacilityid[i].value+",";
  }
  document.info.allgeneralpropertyfacilities.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.propertyentertainmentid.length; i++)
  {
   if (document.info.propertyentertainmentid[i].checked==true)
    temp1=temp1+document.info.propertyentertainmentid[i].value+",";
  }
  document.info.allpropertyentertainment.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.suitabilityid.length; i++)
  {
   if (document.info.suitabilityid[i].checked==true)
    temp1=temp1+document.info.suitabilityid[i].value+",";
  }
  document.info.allsuitability.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.outsideid.length; i++)
  {
   if (document.info.outsideid[i].checked==true)
    temp1=temp1+document.info.outsideid[i].value+",";
  }
  document.info.alloutside.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.activityid.length; i++)
  {
   if (document.info.activityid[i].checked==true)
    temp1=temp1+document.info.activityid[i].value+",";
  }
  document.info.allactivity.value=temp1.substring(0,temp1.length-1);

  temp1="";
  for (i=0; i<document.info.bathroom1.length; i++)
  {
   if (document.info.bathroom1[i].checked==true)
    temp1=temp1+document.info.bathroom1[i].value+",";
  }
  document.info.bathroominfo1.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom2.length; i++)
  {
   if (document.info.bathroom2[i].checked==true)
    temp1=temp1+document.info.bathroom2[i].value+",";
  }
  document.info.bathroominfo2.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom3.length; i++)
  {
   if (document.info.bathroom3[i].checked==true)
    temp1=temp1+document.info.bathroom3[i].value+",";
  }
  document.info.bathroominfo3.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom4.length; i++)
  {
   if (document.info.bathroom4[i].checked==true)
    temp1=temp1+document.info.bathroom4[i].value+",";
  }
  document.info.bathroominfo4.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom5.length; i++)
  {
   if (document.info.bathroom5[i].checked==true)
    temp1=temp1+document.info.bathroom5[i].value+",";
  }
  document.info.bathroominfo5.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom6.length; i++)
  {
   if (document.info.bathroom6[i].checked==true)
    temp1=temp1+document.info.bathroom6[i].value+",";
  }
  document.info.bathroominfo6.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom7.length; i++)
  {
   if (document.info.bathroom7[i].checked==true)
    temp1=temp1+document.info.bathroom7[i].value+",";
  }
  document.info.bathroominfo7.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom8.length; i++)
  {
   if (document.info.bathroom8[i].checked==true)
    temp1=temp1+document.info.bathroom8[i].value+",";
  }
  document.info.bathroominfo8.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom9.length; i++)
  {
   if (document.info.bathroom9[i].checked==true)
    temp1=temp1+document.info.bathroom9[i].value+",";
  }
  document.info.bathroominfo9.value=temp1.substring(0,temp1.length-1);
  temp1="";
  for (i=0; i<document.info.bathroom10.length; i++)
  {
   if (document.info.bathroom10[i].checked==true)
    temp1=temp1+document.info.bathroom10[i].value+",";
  }
  document.info.bathroominfo10.value=temp1.substring(0,temp1.length-1);

  with (document.info)
  {
   if (email.value=='')
   {
    alert("Please enter a valid email address\n\nMerci d’indiquer une adresse email valide");
    return(false);
   }
   else if (propertytypeid.value=='0')
   {
    alert("Please select a property type\n\nMerci de choisir un type de propriété");
    return(false);
   }
   else if (accommodationtypeid.value=='0')
   {
    alert("Please select an accommodation type\n\nMerci de choisir un type de logement");
    return(false);
   }
   else if (propertyname.value=='')
   {
    alert("Please enter a property name\n\nMerci d’indiquer un nom de propriété");
    return(false);
   }
   else if (address1.value=='')
   {
    alert("Please enter your address\n\nMerci d’indiquer votre adresse");
    return(false);
   }
   else if (((attraction1.value!='') && (attraction1.value!='-') && ((distanceattraction1.value=='') || (distanceattraction1.value=='-'))) || ((attraction2.value!='') && (attraction2.value!='-') && ((distanceattraction2.value=='') || (distanceattraction2.value=='-'))) || ((attraction3.value!='') && (attraction3.value!='-') && ((distanceattraction3.value=='') || (distanceattraction3.value=='-'))) || ((attraction4.value!='') && (attraction4.value!='-') && ((distanceattraction4.value=='') || (distanceattraction4.value=='-'))) || ((attraction5.value!='') && (attraction5.value!='-') && ((distanceattraction5.value=='') || (distanceattraction5.value=='-'))) || ((attraction6.value!='') && (attraction6.value!='-') && ((distanceattraction6.value=='') || (distanceattraction6.value=='-'))) || ((attraction7.value!='') && (attraction7.value!='-') && ((distanceattraction7.value=='') || (distanceattraction7.value=='-'))) || ((attraction8.value!='') && (attraction8.value!='-') && ((distanceattraction8.value=='') || (distanceattraction8.value=='-'))) || ((attraction9.value!='') && (attraction9.value!='-') && ((distanceattraction9.value=='') || (distanceattraction9.value=='-'))) || ((attraction10.value!='') && (attraction10.value!='-') && ((distanceattraction10.value=='') || (distanceattraction10.value=='-'))))
   {
    alert("Please enter the walking distance from each of the key locations identified above\n\nMerci d’indiquer la distance à parcourir de chacun des lieux clé mentionnés ci-dessus");
    return(false);
   }
   else if (floorarea.value=='')
   {
    alert("Please enter the property floor area\n\nMerci d’indiquer la surface habitable");
    return(false);
   }
   else if ((bedtype1a.selectedIndex==0 || numberbeds1a.selectedIndex==0) && (bedtypelivingrooma.selectedIndex==0 || numberbedslivingrooma.selectedIndex==0) && (bedtypediningrooma.selectedIndex==0 || numberbedsdiningrooma.selectedIndex==0) && (bedtypehalla.selectedIndex==0 || numberbedshalla.selectedIndex==0))
   {
    alert("Please enter the sleeping arrangements\n\nMerci de compléter la description des chambres");
    return(false);
   }
   //else if (sleeps.value=='0')
   //{
    //alert("Please select the number of people\n\nMerci de choisir le nombre de personnes");
    //return(false);
   //}
   else if (numberrooms.value=='0')
   {
    alert("Please enter the property number of rooms\n\nMerci d’indiquer le nombre de pièces de votre propriété");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo1.value=='' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("Please choose number of separate bathrooms\n\nMerci d’indiquer le nombre de salles de bain");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo1.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo2.value=='Toilet' && document.info.bathroominfo1.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo3.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo4.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo5.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo6.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo7.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo8.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo9.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo1.value=='' && document.info.bathroominfo10.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }
   else if (numberbathrooms.value!='0' && document.info.bathroominfo10.value=='Toilet' && document.info.bathroominfo2.value=='' && document.info.bathroominfo3.value=='' && document.info.bathroominfo4.value=='' && document.info.bathroominfo5.value=='' && document.info.bathroominfo6.value=='' && document.info.bathroominfo7.value=='' && document.info.bathroominfo8.value=='' && document.info.bathroominfo9.value=='' && document.info.bathroominfo1.value=='')
   {
    alert("You have selected one of the bathrooms to contain just a toilet. Please note that the bathroom section is for bathrooms only and there is a separate drop down list for separate toilets. Please either select more features for that bathroom or untick the toilet box to remove that bathroom and select the correct number of toilets from the drop down list.\n\nVous avez sélectionné une salle de bains juste pour mentionner un toilette. Remarquez cependant qu’il y a une rubrique spéciale pour les toilettes séparées et une exclusivement pour les salles de bains. Pourriez vous s’il vous plait ajouter plus de caractéristiques concernant cette salle de bain ou alors, décliquer la case ’toilette’ pour annuler cette salle de bain, et dans ce cas, sélectionner le nombre correct de toilettes dans la liste prévue à cet effet.");
    return(false);
   }   else if (numberwc.value=='-1')
   {
    alert("Please choose number of WCs\n\nMerci d’indiquer le nombre de toilettes séparés");
    return(false);
   }
   else if (diningroom.value=='-1')
   {
    alert("Please enter the dining room seating\n\nMerci d’indiquer le nombre de places assises – salle à manger");
    return(false);
   }
   else if (livingroom.value=='-1')
   {
    alert("Please enter the living room seating\n\nMerci d’indiquer le nombre de places assises – salle de séjour");
    return(false);
   }
   else if (numberbedrooms.value=='-1')
   {
    alert("Please enter the property number of bedrooms\n\nMerci d’indiquer le nombre de chambres de votre propriété");
    return(false);
   }
   else if (numberbeds.value=='-1')
   {
    alert("Please enter the property number of beds\n\nMerci d’indiquer le nombre de lits");
    return(false);
   }
   else if (sleepingarrangements.value.length>500)
   {
	    alert("Merci de limiter votre description des couchages à 500 signes (anglais)");
	    return(false);
   }
   else if (shortdescription.value=='')
   {
	    alert("Merci de compléter la description générale de la propriété (anglais)");
	    return(false);
   }
   else if (shortdescription.value.length>2000)
   {
	    alert("Merci de limiter la description générale de votre propriété à 2 000 signes (anglais)");
	    return(false);
   }
   else if (description.value=='')
   {
	    alert("Merci de compléter la description détaillée de la propriété (anglais)");
	    return(false);
   }
   else if (description.value.length>3000)
   {
	    alert("Merci de limiter la description détaillée de votre propriété à 3 000 signes (anglais)");
	    return(false);
   }
   else if (areadescription.value=='')
   {	
	    alert("Merci de compléter la description des environs (anglais)");
	    return(false);
   }
   else if (areadescription.value.length>2000)
   {
	    alert("Merci de limiter la description des environs à 2 000 signes (anglais)");
	    return(false);
   }
   else if (sleepingarrangementsfr.value.length>500)
   {
	    alert("Please shorten your sleeping arrangements to less than 500 characters\n\nMerci de limiter votre description des couchages à 500 signes");
	    return(false);
   }
   else if (shortdescriptionfr.value=='')
   {
	    alert("Please enter your short property description\n\nMerci de compléter la description générale de la propriété");
	    return(false);
   }
   else if (shortdescriptionfr.value.length>2000)
   {
	    alert("Please shorten your short property description to less than 2,000 characters\n\nMerci de limiter la description générale de votre propriété à 2 000 signes");
	    return(false);
   }
   else if (descriptionfr.value=='')
   {
	    alert("Please enter your full property description\n\nMerci de compléter la description détaillée de la propriété");
	    return(false);
   }
   else if (descriptionfr.value.length>3000)
   {
	    alert("Please shorten your full property description to less than 3,000 characters\n\nMerci de limiter la description détaillée de votre propriété à 3 000 signes");
	    return(false);
   }
   else if (areadescriptionfr.value=='')
   {	
	    alert("Please enter the area description\n\nMerci de compléter la description des environs");
	    return(false);
   }
   else if (areadescriptionfr.value.length>2000)
   {
	    alert("Please shorten the area description to less than 2,000 characters\n\nMerci de limiter la description des environs à 2 000 signes");
	    return(false);
   }
   else if (initialdeposit.value=='')
   {
    alert("Please enter the initial deposit\n\nMerci d’indiquer le montant de l’acompte initial");
    return(false);
   }

   else if (perioddepositpayable.value=='')
   {
    alert("Please enter the period after booking that deposit is payable\n\nMerci d’indiquer le nombre de jours après réservation pour payer l’acompte");
    return(false);
   }
   else if (periodbalancepayable.value=='')
   {
    alert("Please enter the period before occupation that balance is payable\n\nMerci d’indiquer le nombre de jours avant début location pour payer le loyer dû");
    return(false);
   }
   else if (acceptterms.checked==false)
   {
    alert("You must tick the box to confirm that you have accepted the Terms and Conditions\n\nVous devez cocher la case pour confirmer que vous acceptez les Conditions Générales");
    return(false);
   }
   else 
   {
     res=checkTownForm();
     if (res==false) return(false);
     else 
     { 
	calculatebedrooms('0');
	calctotalbathrooms();
	window.alert('Important! Your property about to be created / updated. Please do not click on the Submit button again as this may cause the property to be created twice. A confirmation page will appear when the creation / update is successful. Please press OK to proceed.');
	return(true);
     }
   }
  }
}



function checkLogin()
{
	f = document.info;
	if (f.username.value=='')
	{
		alert("Please enter your username\n\nMerci d’indiquer votre nom d’utilisateur");
		return false;
	}
	else if (f.password.value=='')
	{
		alert("Please enter your password\n\nMerci d’indiquer votre mot de passe");
		return false;
	}
}

function checkLogin2()
{
	f = document.info2;
	if (f.username.value=='')
	{
		alert("Please enter your username\n\nMerci d’indiquer votre nom d’utilisateur");
		return false;
	}
	else if (f.password.value=='')
	{
		alert("Please enter your password\n\nMerci d’indiquer votre mot de passe");
		return false;
	}
}

function checkSearch()
{
	f = document.info;
	if (f.startdate.value=='0')
	{
		alert("Please select a full start date\n\nMerci d’indiquer une date de début complète");
		return false;
	}
	else if (f.startyear.value=='0')
	{
		alert("Please select a full start date\n\nMerci d’indiquer une date de début complète");
		return false;
	}
	else if (f.nights.value=='0')
	{
		alert("Please select the number of nights");
		return false;
	}
}

function checkCalendarSize()
{
	f = document.info;
	if (f.rentalbasis.value=='-')
	{
		alert("Please select your property rental basis\n\nMerci d’indiquer la base sur laquelle votre propriété est louée");
		return false;
	}
	else if (f.startdate.value=='0')
	{
		alert("Please select a full start date\n\nMerci d’indiquer une date de début complète");
		return false;
	}
	else if (f.startmonth.value=='0')
	{
		alert("Please select a full start date\n\nMerci d’indiquer une date de début complète");
		return false;
	}
	else if (f.startyear.value=='0')
	{
		alert("Please select a full start date\n\nMerci d’indiquer une date de début complète");
		return false;
	}
}

function checkCalendarSize2()
{
	f = document.info;
	if (f.rentalbasis.value=='-')
	{
		alert("Please select your property rental basis\n\nMerci d’indiquer la base sur laquelle votre propriété est louée");
		return false;
	}
	else if (f.startdate.value=='0')
	{
		alert("Please select a full start date\n\nMerci d’indiquer une date de début complète");
		return false;
	}
	else if (f.startmonth.value=='0')
	{
		alert("Please select a full start date\n\nMerci d’indiquer une date de début complète");
		return false;
	}
	else if (f.startyear.value=='0')
	{
		alert("Please select a full start date\n\nMerci d’indiquer une date de début complète");
		return false;
	}
	else
	{
		return(confirm('Are you sure you wish to make these changes. This will have the effect of deleting all information stored regarding this property`s pricing and availability (but not the other general property details) and these details will need to be re-inputted.\n\nEtes-vous sûr de bien vouloir effectuer ces modifications. Ceci aura pour effet d’effacer toutes les informations enregistrées précédemment concernant les tarifs et disponibilités de cette propriété (mais ne modifiera pas les autres critères de la propriété), ces informations devront donc être réenregistrées.'));
	}
}

function numbersOnly(field)
{
	var valid = "0123456789";
	ok = 1;
	var temp;
	for (var i=0; i<field.value.length; i++)
	{
		temp = "" + field.value.substring(i, i+1);
		if (valid.indexOf(temp) == "-1")
			ok = 0;
	}
	if (ok==0)
	{
		alert("Please only enter numbers in this field.\nPlease note that for the purposes of expressing various terms such as area and price, we use the commonly accepted global method of presentation, which is a “.” rather than a “,”. For instance, 60 metres 50 centimetres is presented as 60.5 m. And 500 Euro is presented as 500.00 Euro, not 500,00 Euro.\n\nMerci de noter que pour toutes notions de chiffres, tels que surfaces et prix, nous utilisons la présentation universelle, c’est-à-dire un « . » plutôt qu’une « , ». Par exemple, 60 mètres 50 centimètres s’écrit 60.5m et 500 Euros s’écrit 500.00 Euros et non 500,00 Euros.");
		field.focus();
		field.select();
	}
}

function checkTenantForm()
{
  with (document.info)
  {
   var cookies=document.cookie;
   var referer=cookieVal3('tpsource',cookies);
   var keyword=cookieVal3('tpkeyword',cookies); 
   marketingsource.value=referer;
   marketingkeyword.value=keyword;
   if (country.value=='-')
   {
    alert("Please select a country\n\nMerci de choisir un pays");
    return(false);
   }
   else if (fullname.value=='')
   {
    alert("Please enter your full name\n\nMerci d’indiquer vos nom et prénom");
    return(false);
   }
   else if (address.value=='')
   {
    alert("Please enter your address\n\nMerci d’indiquer votre adresse");
    return(false);
   }
   else if (city.value=='')
   {
    alert("Please enter your city\n\nMerci d’indiquer votre ville");
    return(false);
   }
   else if (country.value=='-')
   {
    alert("Please select a country\n\nMerci de choisir un pays");
    return(false);
   }
   else if (postcode.value=='')
   {
    alert("Please enter your postcode\n\nMerci d’indiquer votre code postal");
    return(false);
   }
   else if (telephoneam.value=='')
   {
    alert("Please enter your daytime telepone\n\nMerci d’indiquer votre téléphone - journée");
    return(false);
   }
   else if (telephonepm.value=='')
   {
    alert("Please enter your evening telepone\n\nMerci d’indiquer votre téléphone - soirée");
    return(false);
   }
   else if (mobile.value=='')
   {
    alert("Please enter your mobile number\n\nMerci d’indiquer votre téléphone portable");
    return(false);
   }
   else if (password.value=='')
   {
     alert("Please enter a password\n\nMerci d’indiquer un mot de passe");
     return(false);
   }
   else if (password.value!=password2.value)
   {
     alert("Password mismatch\n\nErreur de mot de passe");
     return(false);
   }
   else if (email.value=='')
   {
    alert("Please enter a valid email address\n\nMerci d’indiquer une adresse email valide");
    return(false);
   }
   else if (email.value.indexOf(' ')>-1)
   {
    alert("Please enter your email address with no spaces\n\nMerci d’indiquer votre adresse email sans espace");
    return(false);
   }
   else if (email.value!='')
   {
    var str = email.value;
    var supported = 0;
    if (window.RegExp)
    {
     var tempStr = "a";
     var tempReg = new RegExp(tempStr);
     if (tempReg.test(tempStr)) supported = 1;
    }
    if (!supported) 
     return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
    var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
    var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,9}|[0-9]{1,9})(\\]?)$");
    if ((!r1.test(str)==true)&&(r2.test(str)==false))
    {
     alert('Sorry, you must provide a real email address\n\nDésolé, l’adresse email indiquée n’existe pas');
     return(false);
    }
   }
  }
}

function checkTenantForm2()
{
  with (document.form)
  {
   var cookies=document.cookie;
   var referer=cookieVal3('tpsource',cookies);
   var keyword=cookieVal3('tpkeyword',cookies); 
   marketingsource.value=referer;
   marketingkeyword.value=keyword;
   arrivemonth.value = parseInt(getMonthValue(arrivedate2.options[arrivedate2.selectedIndex].value))+1;
   arriveyear.value = getYearValue(arrivedate2.options[arrivedate2.selectedIndex].value);
   departmonth.value = parseInt(getMonthValue(departdate2.options[departdate2.selectedIndex].value))+1;
   departyear.value = getYearValue(departdate2.options[departdate2.selectedIndex].value);

   if (country.value=='-')
   {
    alert("Please select a country\n\nMerci de choisir un pays");
    return(false);
   }
   else if (fullname.value=='')
   {
    alert("Please enter your full name\n\nMerci d’indiquer vos nom et prénom");
    return(false);
   }
   else if (address.value=='')
   {
    alert("Please enter your address\n\nMerci d’indiquer votre adresse");
    return(false);
   }
   else if (city.value=='')
   {
    alert("Please enter your city\n\nMerci d’indiquer votre ville");
    return(false);
   }
   else if (country.value=='-')
   {
    alert("Please select a country\n\nMerci de choisir un pays");
    return(false);
   }
   else if (postcode.value=='')
   {
    alert("Please enter your postcode\n\nMerci d’indiquer votre code postal");
    return(false);
   }
   else if (telephoneam.value=='')
   {
    alert("Please enter your daytime telepone\n\nMerci d’indiquer votre téléphone - journée");
    return(false);
   }
   else if (telephonepm.value=='')
   {
    alert("Please enter your evening telepone\n\nMerci d’indiquer votre téléphone - soirée");
    return(false);
   }
   else if (mobile.value=='')
   {
    alert("Please enter your mobile number\n\nMerci d’indiquer votre téléphone portable");
    return(false);
   }
   else if (password.value=='')
   {
     alert("Please enter a password\n\nMerci d’indiquer un mot de passe");
     return(false);
   }
   else if (password.value!=password2.value)
   {
     alert("Password mismatch\n\nErreur de mot de passe");
     return(false);
   }
   else if (email.value=='')
   {
    alert("Please enter a valid email address\n\nMerci d’indiquer une adresse email valide");
    return(false);
   }
   else if (email.value.indexOf(' ')>-1)
   {
    alert("Please enter your email address with no spaces\n\nMerci d’indiquer votre adresse email sans espace");
    return(false);
   }
   else if (email.value!='')
   {
    var str = email.value;
    var supported = 0;
    if (window.RegExp)
    {
     var tempStr = "a";
     var tempReg = new RegExp(tempStr);
     if (tempReg.test(tempStr)) supported = 1;
    }
    if (!supported) 
     return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
    var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
    var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,9}|[0-9]{1,9})(\\]?)$");
    if ((!r1.test(str)==true)&&(r2.test(str)==false))
    {
     alert('Sorry, you must provide a real email address\n\nDésolé, l’adresse email indiquée n’existe pas');
     return(false);
    }
   }
  }
}

function checkTenantForm3()
{
  with (document.form)
  {
   arrivemonth.value = parseInt(getMonthValue(arrivedate2.options[arrivedate2.selectedIndex].value))+1;
   arriveyear.value = getYearValue(arrivedate2.options[arrivedate2.selectedIndex].value);
   departmonth.value = parseInt(getMonthValue(departdate2.options[departdate2.selectedIndex].value))+1;
   departyear.value = getYearValue(departdate2.options[departdate2.selectedIndex].value);

   if (country.value=='-')
   {
    alert("Please select a country\n\nMerci de choisir un pays");
    return(false);
   }
   else if (fullname.value=='')
   {
    alert("Please enter your full name\n\nMerci d’indiquer vos nom et prénom");
    return(false);
   }
   else if (address.value=='')
   {
    alert("Please enter your address\n\nMerci d’indiquer votre adresse");
    return(false);
   }
   else if (city.value=='')
   {
    alert("Please enter your city\n\nMerci d’indiquer votre ville");
    return(false);
   }
   else if (country.value=='-')
   {
    alert("Please select a country\n\nMerci de choisir un pays");
    return(false);
   }
   else if (postcode.value=='')
   {
    alert("Please enter your postcode\n\nMerci d’indiquer votre code postal");
    return(false);
   }
   else if (telephoneam.value=='')
   {
    alert("Please enter your daytime telepone\n\nMerci d’indiquer votre téléphone - journée");
    return(false);
   }
   else if (telephonepm.value=='')
   {
    alert("Please enter your evening telepone\n\nMerci d’indiquer votre téléphone - soirée");
    return(false);
   }
   else if (mobile.value=='')
   {
    alert("Please enter your mobile number\n\nMerci d’indiquer votre téléphone portable");
    return(false);
   }
   else if (user_email.value=='')
   {
    alert("Please enter a valid email address\n\nMerci d’indiquer une adresse email valide");
    return(false);
   }
   else if (user_email.value.indexOf(' ')>-1)
   {
    alert("Please enter your email address with no spaces\n\nMerci d’indiquer votre adresse email sans espace");
    return(false);
   }
   else if (user_email.value!='')
   {
    var str = user_email.value;
    var supported = 0;
    if (window.RegExp)
    {
     var tempStr = "a";
     var tempReg = new RegExp(tempStr);
     if (tempReg.test(tempStr)) supported = 1;
    }
    if (!supported) 
     return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
    var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
    var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,9}|[0-9]{1,9})(\\]?)$");
    if ((!r1.test(str)==true)&&(r2.test(str)==false))
    {
     alert('Sorry, you must provide a real email address\n\nDésolé, l’adresse email indiquée n’existe pas');
     return(false);
    }
   }
  }
}


function checkShortTenantForm()
{
  with (document.info)
  {
   var cookies=document.cookie;
   var referer=cookieVal3('tpsource',cookies);
   var keyword=cookieVal3('tpkeyword',cookies); 
   marketingsource.value=referer;
   marketingkeyword.value=keyword;
   if (fullname.value=='')
   {
    alert("Please enter your full name\n\nMerci d’indiquer vos nom et prénom");
    return(false);
   }
   else if (email.value=='')
   {
    alert("Please enter a valid email address\n\nMerci d’indiquer une adresse email valide");
    return(false);
   }
   else if (email.value.indexOf(' ')>-1)
   {
    alert("Please enter your email address with no spaces\n\nMerci d’indiquer votre adresse email sans espace");
    return(false);
   }
   else if (email.value!='')
   {
    var str = email.value;
    var supported = 0;
    if (window.RegExp)
    {
     var tempStr = "a";
     var tempReg = new RegExp(tempStr);
     if (tempReg.test(tempStr)) supported = 1;
    }
    if (!supported) 
     return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
    var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
    var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,9}|[0-9]{1,9})(\\]?)$");
    if ((!r1.test(str)==true)&&(r2.test(str)==false))
    {
     alert('Sorry, you must provide a real email address\n\nDésolé, l’adresse email indiquée n’existe pas');
     return(false);
    }
   }
  }
}


function checkMessageForm()
{
  with (document.info)
  {
   if (message.value=='')
   {
    alert("Please enter your message\n\nMerci d’indiquer votre message");
    return(false);
   }
   else if (message.value.length>4000)
   {
    alert("Please shorten your message\n\nMerci de raccourcir votre message");
    return(false);
   }
  }
}

function checkMessageForm2()
{
  with (document.info)
  {
   if (message.value=='')
   {
    alert("Please enter your message\n\nMerci d’indiquer votre message");
    return(false);
   }
   else if (message.value.length>4000)
   {
    alert("Please shorten your message\n\nMerci de raccourcir votre message");
    return(false);
   }
   else if (adults.selectedIndex==0)
   {
    alert("Please enter the number of adults\n\nMerci d’indiquer le nombre d'adultes");
    return(false);
   }
  }
}

function checkPictures()
{
  with (document.info)
  {
   if (picture1.value.length>0 && picture1.value.toLowerCase().indexOf('.jpg')==-1 && picture1.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture2.value.length>0 && picture2.value.toLowerCase().indexOf('.jpg')==-1 && picture2.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture3.value.length>0 && picture3.value.toLowerCase().indexOf('.jpg')==-1 && picture3.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture4.value.length>0 && picture4.value.toLowerCase().indexOf('.jpg')==-1 && picture4.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture5.value.length>0 && picture5.value.toLowerCase().indexOf('.jpg')==-1 && picture5.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture6.value.length>0 && picture6.value.toLowerCase().indexOf('.jpg')==-1 && picture6.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture7.value.length>0 && picture7.value.toLowerCase().indexOf('.jpg')==-1 && picture7.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture8.value.length>0 && picture8.value.toLowerCase().indexOf('.jpg')==-1 && picture8.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture9.value.length>0 && picture9.value.toLowerCase().indexOf('.jpg')==-1 && picture9.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture10.value.length>0 && picture10.value.toLowerCase().indexOf('.jpg')==-1 && picture10.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture11.value.length>0 && picture11.value.toLowerCase().indexOf('.jpg')==-1 && picture11.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture12.value.length>0 && picture12.value.toLowerCase().indexOf('.jpg')==-1 && picture12.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture13.value.length>0 && picture13.value.toLowerCase().indexOf('.jpg')==-1 && picture13.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture14.value.length>0 && picture14.value.toLowerCase().indexOf('.jpg')==-1 && picture14.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture15.value.length>0 && picture15.value.toLowerCase().indexOf('.jpg')==-1 && picture15.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture16.value.length>0 && picture16.value.toLowerCase().indexOf('.jpg')==-1 && picture16.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture17.value.length>0 && picture17.value.toLowerCase().indexOf('.jpg')==-1 && picture17.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture18.value.length>0 && picture18.value.toLowerCase().indexOf('.jpg')==-1 && picture18.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture19.value.length>0 && picture19.value.toLowerCase().indexOf('.jpg')==-1 && picture19.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
   else if (picture20.value.length>0 && picture20.value.toLowerCase().indexOf('.jpg')==-1 && picture20.value.toLowerCase().indexOf('.gif')==-1)
   {
    alert("Please note that all images uploaded must have one of the following file extensions: jpg, gif\n\nMerci de noter que toutes les photos téléchargées doivent présenter l`une des extensions suivantes : jpg, gif");
    return(false);
   }
  }
}

function checkBookingForm()
{
  with (document.info)
  {
   if (country.value=='-')
   {
    alert("Please select a country\n\nMerci de choisir un pays");
    return(false);
   }
   else if (fullname.value=='')
   {
    alert("Please enter your full name\n\nMerci d’indiquer vos nom et prénom");
    return(false);
   }
   else if (address.value=='')
   {
    alert("Please enter your address\n\nMerci d’indiquer votre adresse");
    return(false);
   }
   else if (city.value=='')
   {
    alert("Please enter your city\n\nMerci d’indiquer votre ville");
    return(false);
   }
   else if (postcode.value=='')
   {
    alert("Please enter your postcode\n\nMerci d’indiquer votre code postal");
    return(false);
   }
   else if (telephoneam.value=='')
   {
    alert("Please enter your daytime telepone\n\nMerci d’indiquer votre téléphone - journée");
    return(false);
   }
   else if (telephonepm.value=='')
   {
    alert("Please enter your work telepone");
    return(false);
   }
   else if (mobile.value=='')
   {
    alert("Please enter your mobile number\n\nMerci d’indiquer votre téléphone portable");
    return(false);
   }
   else if (nguests.value=='')
   {
    alert("Please enter total number of guests");
    return(false);
   }
   else if (email.value=='')
   {
    alert("Please enter a valid email address\n\nMerci d’indiquer une adresse email valide");
    return(false);
   }
   else if (email.value.indexOf(' ')>-1)
   {
    alert("Please enter your email address with no spaces\n\nMerci d’indiquer votre adresse email sans espace");
    return(false);
   }
   else if (email.value!='')
   {
    var str = email.value;
    var supported = 0;
    if (window.RegExp)
    {
     var tempStr = "a";
     var tempReg = new RegExp(tempStr);
     if (tempReg.test(tempStr)) supported = 1;
    }
    if (!supported) 
     return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
    var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
    var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,9}|[0-9]{1,9})(\\]?)$");
    if ((!r1.test(str)==true)&&(r2.test(str)==false))
    {
     alert('Sorry, you must provide a real email address\n\nDésolé, l’adresse email indiquée n’existe pas');
     return(false);
    }
   }
  }
}

function checkCookie(url)
{
	basketid='';
	basketid2='';
	if (document.cookie!='')
	{
		pos = document.cookie.indexOf('basketid=');
		pos2 = document.cookie.indexOf('|',pos);
		if ((pos>-1) && (pos2>-1))
		{
			basketid = document.cookie.substring(pos+9,pos2);
		}
		pos = document.cookie.indexOf('basketid2=');
		if (pos>-1)
		{
			basketid2 = document.cookie.substring(pos+10);
		}
		if (basketid!='' && basketid2!='')
			url=url+'&basketid='+basketid+'&basketid2='+basketid2;
	}
	window.location=url;
}

function checkcookietenantform()
{
 container.style.visibility="hidden";
 var cookies=document.cookie; 
 var pos=cookies.lastIndexOf('primaryusername='); 
 var pos2=cookies.indexOf('|',pos); 
 if ((pos>-1) && (pos2>-1)) 
 {
   username=cookies.substring(pos+'primaryusername='.length,pos2);   
   var pos=cookies.lastIndexOf('primarypassword=');   
   var pos2=cookies.indexOf('|',pos);  
   if ((pos>-1) && (pos2>-1))   
   {
        password=cookies.substring(pos+'primarypassword='.length,pos2);	 
        document.info2.username.value=username;	
        document.info2.password.value=password;	
        document.info2.submit();    
   } 
   else container.style.visibility="visible";
 }
 else container.style.visibility="visible";
}

function checkcookietenantsearchform()
{
 var cookies=document.cookie; 
 var pos=cookies.lastIndexOf('primaryusername='); 
 var pos2=cookies.indexOf('|',pos); 
 if ((pos>-1) && (pos2>-1)) 
 {
   susername=cookies.substring(pos+'primaryusername='.length,pos2);   
   var pos=cookies.lastIndexOf('primarypassword=');   
   var pos2=cookies.indexOf('|',pos);  
   if ((pos>-1) && (pos2>-1))   
   {
        spassword=cookies.substring(pos+'primarypassword='.length,pos2);	 
	with (document.info2)
	{
           username.value=susername;	
           password.value=spassword;	
	   submit();
	}
   } 
 }
}


function checkfeedbackform()
{
  with (document.info)
  {
   if (comments.value.length<5)
   {
      alert("Please provide some comments about the property and your stay as this is what other renters will pay particular attention to. Thanks!\n\nMerci d'indiquer des commentaires sur la propriété ainsi que votre séjour car ces informations sont importantes pour les autres locataires !");
      return(false);
   }
   else if (comments.value.length>1000)
   {
      alert("Please shorten your comments to less than 1000 characters\n\nMerci de limiter votre commentaires à 1000 signes");
      return(false);
   }
  }  
}

function changeeuro()
{
 if (document.form.message.value.indexOf("€")>-1) 
   document.form.message.value=document.form.message.value.replace("€","&euro;");
}

function changeeuro2()
{
 if (document.info.message.value.indexOf("€")>-1) 
   document.info.message.value=document.info.message.value.replace("€","&euro;");
}

function checkOwnerreply()
{
  if (document.info.ownerreply.value.length<3)
  {
      alert("Please enter your comments\n\nMerci d’indiquer votre commentaires");
      return(false);
  }
  else if (document.info.ownerreply.value.length>3000)
  {
      alert("Please shorten your comments to less than 3000 characters\n\nMerci de limiter votre commentaires à 3000 signes");
      return(false);
  }
}

function cookieVal3(cookieName,cookieString)
{
  var pos=cookieString.lastIndexOf(cookieName);
  var pos2=cookieString.indexOf("|",pos);
  if (pos!=-1) 
  {
    if (pos2!=-1) cookieString=cookieString.substring(pos+cookieName.length+1,pos2);
    else 
    {
       var pos2=cookieString.indexOf(";",pos);
       if (pos2>-1) cookieString=cookieString.substring(pos+cookieName.length+1,pos2);
       else cookieString=cookieString.substring(pos+cookieName.length+1);
    }    
  }
  else cookieString="";
  return(cookieString);
}

function checkmessageinformation()
{
  with (document.form)
  {
     if (!available[0].checked && !available[1].checked)
     {
	alert('Please select whether the property is available or not\n\nMerci d’indiquer si votre propriété est disponible ou non');
        return(false);
     }  
     else if (available[0].checked && !changeprice[0].checked && !changeprice[1].checked)
     {
	alert('Please select whether the price is correct or not\n\nMerci d’indiquer si le tarif est correct ou non');
        return(false);
     }  
     else if (available[0].checked && changeprice[1].checked && newprice.value=='0')
     {
	alert('Please enter the amended price\n\nMerci d’indiquer le nouveau tarif');
        return(false);
     }  
  }
}

function showbedrooms(listnumber)
{
  document.getElementById('extrabedrooms'+listnumber).style.display='block';
}

function calctotalbathrooms()
{
  totalbathrooms=0;
  with(document.info)
  {
   found=false;
   i=0;
   while (!found && i<5)
   {
      if (bathroom1[i].checked) 
      {
         totalbathrooms=totalbathrooms+1;
	 found=true;
      }
      i++;
   }
   found=false;
   i=0;
   while (!found && i<5)
   {
      if (bathroom2[i].checked) 
      {
         totalbathrooms=totalbathrooms+1;
	 found=true;
      }
      i++;
   }
   found=false;
   i=0;
   while (!found && i<5)
   {
      if (bathroom3[i].checked) 
      {
         totalbathrooms=totalbathrooms+1;
	 found=true;
      }
      i++;
   }
   found=false;
   i=0;
   while (!found && i<5)
   {
      if (bathroom4[i].checked) 
      {
         totalbathrooms=totalbathrooms+1;
	 found=true;
      }
      i++;
   }
   found=false;
   i=0;
   while (!found && i<5)
   {
      if (bathroom5[i].checked) 
      {
         totalbathrooms=totalbathrooms+1;
	 found=true;
      }
      i++;
   }
   found=false;
   i=0;
   while (!found && i<5)
   {
      if (bathroom6[i].checked) 
      {
         totalbathrooms=totalbathrooms+1;
	 found=true;
      }
      i++;
   }
   found=false;
   i=0;
   while (!found && i<5)
   {
      if (bathroom7[i].checked) 
      {
         totalbathrooms=totalbathrooms+1;
	 found=true;
      }
      i++;
   }
   found=false;
   i=0;
   while (!found && i<5)
   {
      if (bathroom8[i].checked) 
      {
         totalbathrooms=totalbathrooms+1;
	 found=true;
      }
      i++;
   }
   found=false;
   i=0;
   while (!found && i<5)
   {
      if (bathroom9[i].checked) 
      {
         totalbathrooms=totalbathrooms+1;
	 found=true;
      }
      i++;
   }
   found=false;
   i=0;
   while (!found && i<5)
   {
      if (bathroom10[i].checked) 
      {
         totalbathrooms=totalbathrooms+1;
	 found=true;
      }
      i++;
   }
   document.getElementById('numberbathrooms').innerHTML=totalbathrooms;
   numberbathrooms.value=totalbathrooms;
  }
}

function calculatebedrooms(changesleeps)
{
  totalbedrooms=0;
  totalbeds=0;
  totalsleeps=0;
  with(document.info)
  {
	  if (bedtype1a.selectedIndex>0 && numberbeds1a.selectedIndex>0) totalbedrooms++;
	  if (bedtype2a.selectedIndex>0 && numberbeds2a.selectedIndex>0) totalbedrooms++;
	  if (bedtype3a.selectedIndex>0 && numberbeds3a.selectedIndex>0) totalbedrooms++;
	  if (bedtype4a.selectedIndex>0 && numberbeds4a.selectedIndex>0) totalbedrooms++;
	  if (bedtype5a.selectedIndex>0 && numberbeds5a.selectedIndex>0) totalbedrooms++;
	  if (bedtype6a.selectedIndex>0 && numberbeds6a.selectedIndex>0) totalbedrooms++;
	  if (bedtype7a.selectedIndex>0 && numberbeds7a.selectedIndex>0) totalbedrooms++;
	  if (bedtype8a.selectedIndex>0 && numberbeds8a.selectedIndex>0) totalbedrooms++;
	  if (bedtype9a.selectedIndex>0 && numberbeds9a.selectedIndex>0) totalbedrooms++;
	  if (bedtype10a.selectedIndex>0 && numberbeds10a.selectedIndex>0) totalbedrooms++;
	  if (bedtype11a.selectedIndex>0 && numberbeds11a.selectedIndex>0) totalbedrooms++;
	  if (bedtype12a.selectedIndex>0 && numberbeds12a.selectedIndex>0) totalbedrooms++;
	  if (bedtype13a.selectedIndex>0 && numberbeds13a.selectedIndex>0) totalbedrooms++;
	  if (bedtype14a.selectedIndex>0 && numberbeds14a.selectedIndex>0) totalbedrooms++;
	  if (bedtype15a.selectedIndex>0 && numberbeds15a.selectedIndex>0) totalbedrooms++;
	  if (bedtype16a.selectedIndex>0 && numberbeds16a.selectedIndex>0) totalbedrooms++;
	  if (bedtype17a.selectedIndex>0 && numberbeds17a.selectedIndex>0) totalbedrooms++;
	  if (bedtype18a.selectedIndex>0 && numberbeds18a.selectedIndex>0) totalbedrooms++;
	  if (bedtype19a.selectedIndex>0 && numberbeds19a.selectedIndex>0) totalbedrooms++;
	  if (bedtype20a.selectedIndex>0 && numberbeds20a.selectedIndex>0) totalbedrooms++;
	  if (bedtype21a.selectedIndex>0 && numberbeds21a.selectedIndex>0) totalbedrooms++;
	  if (bedtype22a.selectedIndex>0 && numberbeds22a.selectedIndex>0) totalbedrooms++;
	  if (bedtype23a.selectedIndex>0 && numberbeds23a.selectedIndex>0) totalbedrooms++;
	  if (bedtype24a.selectedIndex>0 && numberbeds24a.selectedIndex>0) totalbedrooms++;
	  if (bedtype25a.selectedIndex>0 && numberbeds25a.selectedIndex>0) totalbedrooms++;
	  if (bedtype26a.selectedIndex>0 && numberbeds26a.selectedIndex>0) totalbedrooms++;
	  if (bedtype27a.selectedIndex>0 && numberbeds27a.selectedIndex>0) totalbedrooms++;
	  if (bedtype28a.selectedIndex>0 && numberbeds28a.selectedIndex>0) totalbedrooms++;
	  if (bedtype29a.selectedIndex>0 && numberbeds29a.selectedIndex>0) totalbedrooms++;
	  if (bedtype30a.selectedIndex>0 && numberbeds30a.selectedIndex>0) totalbedrooms++;

	  if (bedtype1a.selectedIndex>0) 
	  {
	    if (bedtype1a.selectedIndex<11) totalbeds=totalbeds+(numberbeds1a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds1a.selectedIndex)*2);
	    if (bedtype1a.selectedIndex==1 || bedtype1a.selectedIndex==3 || bedtype1a.selectedIndex==9 || bedtype1a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds1a.selectedIndex*2);
	    else if (bedtype1a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds1a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds1a.selectedIndex;
	  }
	  if (bedtype1b.selectedIndex>0) 
	  {
	    if (bedtype1b.selectedIndex<11) totalbeds=totalbeds+(numberbeds1b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds1b.selectedIndex)*2);
	    if (bedtype1b.selectedIndex==1 || bedtype1b.selectedIndex==3 || bedtype1b.selectedIndex==9 || bedtype1b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds1b.selectedIndex*2);
	    else if (bedtype1b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds1b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds1b.selectedIndex;
	  }
	  if (bedtype1c.selectedIndex>0) 
	  {
	    if (bedtype1c.selectedIndex<11) totalbeds=totalbeds+(numberbeds1c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds1c.selectedIndex)*2);
	    if (bedtype1c.selectedIndex==1 || bedtype1c.selectedIndex==3 || bedtype1c.selectedIndex==9 || bedtype1c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds1c.selectedIndex*2);
	    else if (bedtype1c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds1c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds1c.selectedIndex;
	  }
	  if (bedtype2a.selectedIndex>0) 
	  {
	    if (bedtype2a.selectedIndex<11) totalbeds=totalbeds+(numberbeds2a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds2a.selectedIndex)*2);
	    if (bedtype2a.selectedIndex==1 || bedtype2a.selectedIndex==3 || bedtype2a.selectedIndex==9 || bedtype2a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds2a.selectedIndex*2); 
	    else if (bedtype2a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds2a.selectedIndex*3);
 	    else totalsleeps=totalsleeps+numberbeds2a.selectedIndex;
	  }
	  if (bedtype2b.selectedIndex>0) 
	  {
	    if (bedtype2b.selectedIndex<11) totalbeds=totalbeds+(numberbeds2b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds2b.selectedIndex)*2);
	    if (bedtype2b.selectedIndex==1 || bedtype2b.selectedIndex==3 || bedtype2b.selectedIndex==9 || bedtype2b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds2b.selectedIndex*2); 
	    else if (bedtype2b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds2b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds2b.selectedIndex;
	  }
	  if (bedtype2c.selectedIndex>0) 
	  {
	    if (bedtype2c.selectedIndex<11) totalbeds=totalbeds+(numberbeds2c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds2c.selectedIndex)*2);
	    if (bedtype2c.selectedIndex==1 || bedtype2c.selectedIndex==3 || bedtype2c.selectedIndex==9 || bedtype2c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds2c.selectedIndex*2); 
	    else if (bedtype2c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds2c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds2c.selectedIndex;
	  }
	  if (bedtype3a.selectedIndex>0) 
	  {
	    if (bedtype3a.selectedIndex<11) totalbeds=totalbeds+(numberbeds3a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds3a.selectedIndex)*2);
	    if (bedtype3a.selectedIndex==1 || bedtype3a.selectedIndex==3 || bedtype3a.selectedIndex==9 || bedtype3a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds3a.selectedIndex*2); 
	    else if (bedtype3a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds3a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds3a.selectedIndex;
	  }
	  if (bedtype3b.selectedIndex>0) 
	  {
	    if (bedtype3b.selectedIndex<11) totalbeds=totalbeds+(numberbeds3b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds3b.selectedIndex)*2);
	    if (bedtype3b.selectedIndex==1 || bedtype3b.selectedIndex==3 || bedtype3b.selectedIndex==9 || bedtype3b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds3b.selectedIndex*2); 
	    else if (bedtype3b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds3b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds3b.selectedIndex;
	  }
	  if (bedtype3c.selectedIndex>0) 
	  {
	    if (bedtype3c.selectedIndex<11) totalbeds=totalbeds+(numberbeds3c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds3c.selectedIndex)*2);
	    if (bedtype3c.selectedIndex==1 || bedtype3c.selectedIndex==3 || bedtype3c.selectedIndex==9 || bedtype3c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds3c.selectedIndex*2); 
	    else if (bedtype3c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds3c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds3c.selectedIndex;
	  }
	  if (bedtype4a.selectedIndex>0) 
	  {
	    if (bedtype4a.selectedIndex<11) totalbeds=totalbeds+(numberbeds4a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds4a.selectedIndex)*2);
	    if (bedtype4a.selectedIndex==1 || bedtype4a.selectedIndex==3 || bedtype4a.selectedIndex==9 || bedtype4a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds4a.selectedIndex*2); 
	    else if (bedtype4a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds4a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds4a.selectedIndex;
	  }
	  if (bedtype4b.selectedIndex>0) 
	  {
	    if (bedtype4b.selectedIndex<11) totalbeds=totalbeds+(numberbeds4b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds4b.selectedIndex)*2);
	    if (bedtype4b.selectedIndex==1 || bedtype4b.selectedIndex==3 || bedtype4b.selectedIndex==9 || bedtype4b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds4b.selectedIndex*2); 
	    else if (bedtype4b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds4b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds4b.selectedIndex;
	  }
	  if (bedtype4c.selectedIndex>0) 
	  {
	    if (bedtype4c.selectedIndex<11) totalbeds=totalbeds+(numberbeds4c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds4c.selectedIndex)*2);
	    if (bedtype4c.selectedIndex==1 || bedtype4c.selectedIndex==3 || bedtype4c.selectedIndex==9 || bedtype4c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds4c.selectedIndex*2); 
	    else if (bedtype4c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds4c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds4c.selectedIndex;
	  }
	  if (bedtype5a.selectedIndex>0) 
	  {
	    if (bedtype5a.selectedIndex<11) totalbeds=totalbeds+(numberbeds5a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds5a.selectedIndex)*2);
	    if (bedtype5a.selectedIndex==1 || bedtype5a.selectedIndex==3 || bedtype5a.selectedIndex==9 || bedtype5a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds5a.selectedIndex*2); 
	    else if (bedtype5a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds5a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds5a.selectedIndex;
	  }
	  if (bedtype5b.selectedIndex>0) 
	  {
	    if (bedtype5b.selectedIndex<11) totalbeds=totalbeds+(numberbeds5b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds5b.selectedIndex)*2);
	    if (bedtype5b.selectedIndex==1 || bedtype5b.selectedIndex==3 || bedtype5b.selectedIndex==9 || bedtype5b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds5b.selectedIndex*2); 
	    else if (bedtype5b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds5b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds5b.selectedIndex;
	  }
	  if (bedtype5c.selectedIndex>0) 
	  {
	    if (bedtype5c.selectedIndex<11) totalbeds=totalbeds+(numberbeds5c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds5c.selectedIndex)*2);
	    if (bedtype5c.selectedIndex==1 || bedtype5c.selectedIndex==3 || bedtype5c.selectedIndex==9 || bedtype5c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds5c.selectedIndex*2); 
	    else if (bedtype5c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds5c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds5c.selectedIndex;
	  }
	  if (bedtype6a.selectedIndex>0) 
	  {
	    if (bedtype6a.selectedIndex<11) totalbeds=totalbeds+(numberbeds6a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds6a.selectedIndex)*2);
	    if (bedtype6a.selectedIndex==1 || bedtype6a.selectedIndex==3 || bedtype6a.selectedIndex==9 || bedtype6a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds6a.selectedIndex*2); 
	    else if (bedtype6a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds6a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds6a.selectedIndex;
	  }
	  if (bedtype6b.selectedIndex>0) 
	  {
	    if (bedtype6b.selectedIndex<11) totalbeds=totalbeds+(numberbeds6b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds6b.selectedIndex)*2);
	    if (bedtype6b.selectedIndex==1 || bedtype6b.selectedIndex==3 || bedtype6b.selectedIndex==9 || bedtype6b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds6b.selectedIndex*2); 
	    else if (bedtype6b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds6b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds6b.selectedIndex;
	  }
	  if (bedtype6c.selectedIndex>0) 
	  {
	    if (bedtype6c.selectedIndex<11) totalbeds=totalbeds+(numberbeds6c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds6c.selectedIndex)*2);
	    if (bedtype6c.selectedIndex==1 || bedtype6c.selectedIndex==3 || bedtype6c.selectedIndex==9 || bedtype6c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds6c.selectedIndex*2); 
	    else if (bedtype6c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds6c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds6c.selectedIndex;
	  }
	  if (bedtype7a.selectedIndex>0) 
	  {
	    if (bedtype7a.selectedIndex<11) totalbeds=totalbeds+(numberbeds7a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds7a.selectedIndex)*2);
	    if (bedtype7a.selectedIndex==1 || bedtype7a.selectedIndex==3 || bedtype7a.selectedIndex==9 || bedtype7a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds7a.selectedIndex*2); 
	    else if (bedtype7a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds7a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds7a.selectedIndex;
	  }
	  if (bedtype7b.selectedIndex>0) 
	  {
	    if (bedtype7b.selectedIndex<11) totalbeds=totalbeds+(numberbeds7b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds7b.selectedIndex)*2);
	    if (bedtype7b.selectedIndex==1 || bedtype7b.selectedIndex==3 || bedtype7b.selectedIndex==9 || bedtype7b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds7b.selectedIndex*2); 
	    else if (bedtype7b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds7b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds7b.selectedIndex;
	  }
	  if (bedtype7c.selectedIndex>0) 
	  {
	    if (bedtype7c.selectedIndex<11) totalbeds=totalbeds+(numberbeds7c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds7c.selectedIndex)*2);
	    if (bedtype7c.selectedIndex==1 || bedtype7c.selectedIndex==3 || bedtype7c.selectedIndex==9 || bedtype7c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds7c.selectedIndex*2); 
	    else if (bedtype7c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds7c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds7c.selectedIndex;
	  }
	  if (bedtype8a.selectedIndex>0) 
	  {
	    if (bedtype8a.selectedIndex<11) totalbeds=totalbeds+(numberbeds8a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds8a.selectedIndex)*2);
	    if (bedtype8a.selectedIndex==1 || bedtype8a.selectedIndex==3 || bedtype8a.selectedIndex==9 || bedtype8a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds8a.selectedIndex*2); 
	    else if (bedtype8a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds8a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds8a.selectedIndex;
	  }
	  if (bedtype8b.selectedIndex>0) 
	  {
	    if (bedtype8b.selectedIndex<11) totalbeds=totalbeds+(numberbeds8b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds8b.selectedIndex)*2);
	    if (bedtype8b.selectedIndex==1 || bedtype8b.selectedIndex==3 || bedtype8b.selectedIndex==9 || bedtype8b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds8b.selectedIndex*2); 
	    else if (bedtype8b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds8b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds8b.selectedIndex;
	  }
	  if (bedtype8c.selectedIndex>0) 
	  {
	    if (bedtype8c.selectedIndex<11) totalbeds=totalbeds+(numberbeds8c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds8c.selectedIndex)*2);
	    if (bedtype8c.selectedIndex==1 || bedtype8c.selectedIndex==3 || bedtype8c.selectedIndex==9 || bedtype8c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds8c.selectedIndex*2); 
	    else if (bedtype8c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds8c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds8c.selectedIndex;
	  }
	  if (bedtype9a.selectedIndex>0) 
	  {
	    if (bedtype9a.selectedIndex<11) totalbeds=totalbeds+(numberbeds9a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds9a.selectedIndex)*2);
	    if (bedtype9a.selectedIndex==1 || bedtype9a.selectedIndex==3 || bedtype9a.selectedIndex==9 || bedtype9a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds9a.selectedIndex*2); 
	    else if (bedtype9a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds9a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds9a.selectedIndex;
	  }
	  if (bedtype9b.selectedIndex>0) 
	  {
	    if (bedtype9b.selectedIndex<11) totalbeds=totalbeds+(numberbeds9b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds9b.selectedIndex)*2);
	    if (bedtype9b.selectedIndex==1 || bedtype9b.selectedIndex==3 || bedtype9b.selectedIndex==9 || bedtype9b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds9b.selectedIndex*2); 
	    else if (bedtype9b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds9b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds9b.selectedIndex;
	  }
	  if (bedtype9c.selectedIndex>0) 
	  {
	    if (bedtype9c.selectedIndex<11) totalbeds=totalbeds+(numberbeds9c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds9c.selectedIndex)*2);
	    if (bedtype9c.selectedIndex==1 || bedtype9c.selectedIndex==3 || bedtype9c.selectedIndex==9 || bedtype9c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds9c.selectedIndex*2); 
	    else if (bedtype9c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds9c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds9c.selectedIndex;
	  }
	  if (bedtype10a.selectedIndex>0) 
	  {
	    if (bedtype10a.selectedIndex<11) totalbeds=totalbeds+(numberbeds10a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds10a.selectedIndex)*2);
	    if (bedtype10a.selectedIndex==1 || bedtype10a.selectedIndex==3 || bedtype10a.selectedIndex==9 || bedtype10a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds10a.selectedIndex*2); 
	    else if (bedtype10a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds10a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds10a.selectedIndex;
	  }
	  if (bedtype10b.selectedIndex>0) 
	  {
	    if (bedtype10b.selectedIndex<11) totalbeds=totalbeds+(numberbeds10b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds10b.selectedIndex)*2);
	    if (bedtype10b.selectedIndex==1 || bedtype10b.selectedIndex==3 || bedtype10b.selectedIndex==9 || bedtype10b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds10b.selectedIndex*2); 
	    else if (bedtype10b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds10b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds10b.selectedIndex;
	  }
	  if (bedtype10c.selectedIndex>0) 
	  {
	    if (bedtype10c.selectedIndex<11) totalbeds=totalbeds+(numberbeds10c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds10c.selectedIndex)*2);
	    if (bedtype10c.selectedIndex==1 || bedtype10c.selectedIndex==3 || bedtype10c.selectedIndex==9 || bedtype10c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds10c.selectedIndex*2); 
	    else if (bedtype10c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds10c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds10c.selectedIndex;
	  }
	  if (bedtype11a.selectedIndex>0) 
	  {
	    if (bedtype11a.selectedIndex<11) totalbeds=totalbeds+(numberbeds11a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds11a.selectedIndex)*2);
	    if (bedtype11a.selectedIndex==1 || bedtype11a.selectedIndex==3 || bedtype11a.selectedIndex==9 || bedtype11a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds11a.selectedIndex*2); 
	    else if (bedtype11a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds11a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds11a.selectedIndex;
	  }
	  if (bedtype11b.selectedIndex>0) 
	  {
	    if (bedtype11b.selectedIndex<11) totalbeds=totalbeds+(numberbeds11b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds11b.selectedIndex)*2);
	    if (bedtype11b.selectedIndex==1 || bedtype11b.selectedIndex==3 || bedtype11b.selectedIndex==9 || bedtype11b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds11b.selectedIndex*2); 
	    else if (bedtype11b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds11b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds11b.selectedIndex;
	  }
	  if (bedtype11c.selectedIndex>0) 
	  {
	    if (bedtype11c.selectedIndex<11) totalbeds=totalbeds+(numberbeds11c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds11c.selectedIndex)*2);
	    if (bedtype11c.selectedIndex==1 || bedtype11c.selectedIndex==3 || bedtype11c.selectedIndex==9 || bedtype11c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds11c.selectedIndex*2); 
	    else if (bedtype11c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds11c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds11c.selectedIndex;
	  }
	  if (bedtype12a.selectedIndex>0) 
	  {
	    if (bedtype12a.selectedIndex<11) totalbeds=totalbeds+(numberbeds12a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds12a.selectedIndex)*2);
	    if (bedtype12a.selectedIndex==1 || bedtype12a.selectedIndex==3 || bedtype12a.selectedIndex==9 || bedtype12a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds12a.selectedIndex*2); 
	    else if (bedtype12a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds12a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds12a.selectedIndex;
	  }
	  if (bedtype12b.selectedIndex>0) 
	  {
	    if (bedtype12b.selectedIndex<11) totalbeds=totalbeds+(numberbeds12b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds12b.selectedIndex)*2);
	    if (bedtype12b.selectedIndex==1 || bedtype12b.selectedIndex==3 || bedtype12b.selectedIndex==9 || bedtype12b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds12b.selectedIndex*2); 
	    else if (bedtype12b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds12b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds12b.selectedIndex;
	  }
	  if (bedtype12c.selectedIndex>0) 
	  {
	    if (bedtype12c.selectedIndex<11) totalbeds=totalbeds+(numberbeds12c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds12c.selectedIndex)*2);
	    if (bedtype12c.selectedIndex==1 || bedtype12c.selectedIndex==3 || bedtype12c.selectedIndex==9 || bedtype12c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds12c.selectedIndex*2); 
	    else if (bedtype12c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds12c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds12c.selectedIndex;
	  }
	  if (bedtype13a.selectedIndex>0) 
	  {
	    if (bedtype13a.selectedIndex<11) totalbeds=totalbeds+(numberbeds13a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds13a.selectedIndex)*2);
	    if (bedtype13a.selectedIndex==1 || bedtype13a.selectedIndex==3 || bedtype13a.selectedIndex==9 || bedtype13a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds13a.selectedIndex*2); 
	    else if (bedtype13a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds13a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds13a.selectedIndex;
	  }
	  if (bedtype13b.selectedIndex>0) 
	  {
	    if (bedtype13b.selectedIndex<11) totalbeds=totalbeds+(numberbeds13b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds13b.selectedIndex)*2);
	    if (bedtype13b.selectedIndex==1 || bedtype13b.selectedIndex==3 || bedtype13b.selectedIndex==9 || bedtype13b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds13b.selectedIndex*2); 
	    else if (bedtype13b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds13b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds13b.selectedIndex;
	  }
	  if (bedtype13c.selectedIndex>0) 
	  {
	    if (bedtype13c.selectedIndex<11) totalbeds=totalbeds+(numberbeds13c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds13c.selectedIndex)*2);
	    if (bedtype13c.selectedIndex==1 || bedtype13c.selectedIndex==3 || bedtype13c.selectedIndex==9 || bedtype13c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds13c.selectedIndex*2); 
	    else if (bedtype13c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds13c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds13c.selectedIndex;
	  }
	  if (bedtype14a.selectedIndex>0) 
	  {
	    if (bedtype14a.selectedIndex<11) totalbeds=totalbeds+(numberbeds14a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds14a.selectedIndex)*2);
	    if (bedtype14a.selectedIndex==1 || bedtype14a.selectedIndex==3 || bedtype14a.selectedIndex==9 || bedtype14a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds14a.selectedIndex*2); 
	    else if (bedtype14a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds14a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds14a.selectedIndex;
	  }
	  if (bedtype14b.selectedIndex>0) 
	  {
	    if (bedtype14b.selectedIndex<11) totalbeds=totalbeds+(numberbeds14b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds14b.selectedIndex)*2);
	    if (bedtype14b.selectedIndex==1 || bedtype14b.selectedIndex==3 || bedtype14b.selectedIndex==9 || bedtype14b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds14b.selectedIndex*2); 
	    else if (bedtype14b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds14b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds14b.selectedIndex;
	  }
	  if (bedtype14c.selectedIndex>0) 
	  {
	    if (bedtype14c.selectedIndex<11) totalbeds=totalbeds+(numberbeds14c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds14c.selectedIndex)*2);
	    if (bedtype14c.selectedIndex==1 || bedtype14c.selectedIndex==3 || bedtype14c.selectedIndex==9 || bedtype14c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds14c.selectedIndex*2); 
	    else if (bedtype14c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds14c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds14c.selectedIndex;
	  }
	  if (bedtype15a.selectedIndex>0) 
	  {
	    if (bedtype15a.selectedIndex<11) totalbeds=totalbeds+(numberbeds15a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds15a.selectedIndex)*2);
	    if (bedtype15a.selectedIndex==1 || bedtype15a.selectedIndex==3 || bedtype15a.selectedIndex==9 || bedtype15a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds15a.selectedIndex*2); 
	    else if (bedtype15a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds15a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds15a.selectedIndex;
	  }
	  if (bedtype15b.selectedIndex>0) 
	  {
	    if (bedtype15b.selectedIndex<11) totalbeds=totalbeds+(numberbeds15b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds15b.selectedIndex)*2);
	    if (bedtype15b.selectedIndex==1 || bedtype15b.selectedIndex==3 || bedtype15b.selectedIndex==9 || bedtype15b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds15b.selectedIndex*2); 
	    else if (bedtype15b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds15b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds15b.selectedIndex;
	  }
	  if (bedtype15c.selectedIndex>0) 
	  {
	    if (bedtype15c.selectedIndex<11) totalbeds=totalbeds+(numberbeds15c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds15c.selectedIndex)*2);
	    if (bedtype15c.selectedIndex==1 || bedtype15c.selectedIndex==3 || bedtype15c.selectedIndex==9 || bedtype15c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds15c.selectedIndex*2); 
	    else if (bedtype15c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds15c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds15c.selectedIndex;
	  }
	  if (bedtype16a.selectedIndex>0) 
	  {
	    if (bedtype16a.selectedIndex<11) totalbeds=totalbeds+(numberbeds16a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds16a.selectedIndex)*2);
	    if (bedtype16a.selectedIndex==1 || bedtype16a.selectedIndex==3 || bedtype16a.selectedIndex==9 || bedtype16a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds16a.selectedIndex*2); 
	    else if (bedtype16a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds16a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds16a.selectedIndex;
	  }
	  if (bedtype16b.selectedIndex>0) 
	  {
	    if (bedtype16b.selectedIndex<11) totalbeds=totalbeds+(numberbeds16b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds16b.selectedIndex)*2);
	    if (bedtype16b.selectedIndex==1 || bedtype16b.selectedIndex==3 || bedtype16b.selectedIndex==9 || bedtype16b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds16b.selectedIndex*2); 
	    else if (bedtype16b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds16b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds16b.selectedIndex;
	  }
	  if (bedtype16c.selectedIndex>0) 
	  {
	    if (bedtype16c.selectedIndex<11) totalbeds=totalbeds+(numberbeds16c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds16c.selectedIndex)*2);
	    if (bedtype16c.selectedIndex==1 || bedtype16c.selectedIndex==3 || bedtype16c.selectedIndex==9 || bedtype16c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds16c.selectedIndex*2); 
	    else if (bedtype16c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds16c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds16c.selectedIndex;
	  }
	  if (bedtype17a.selectedIndex>0) 
	  {
	    if (bedtype17a.selectedIndex<11) totalbeds=totalbeds+(numberbeds17a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds17a.selectedIndex)*2);
	    if (bedtype17a.selectedIndex==1 || bedtype17a.selectedIndex==3 || bedtype17a.selectedIndex==9 || bedtype17a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds17a.selectedIndex*2); 
	    else if (bedtype17a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds17a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds17a.selectedIndex;
	  }
	  if (bedtype17b.selectedIndex>0) 
	  {
	    if (bedtype17b.selectedIndex<11) totalbeds=totalbeds+(numberbeds17b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds17b.selectedIndex)*2);
	    if (bedtype17b.selectedIndex==1 || bedtype17b.selectedIndex==3 || bedtype17b.selectedIndex==9 || bedtype17b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds17b.selectedIndex*2); 
	    else if (bedtype17b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds17b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds17b.selectedIndex;
	  }
	  if (bedtype17c.selectedIndex>0) 
	  {
	    if (bedtype17c.selectedIndex<11) totalbeds=totalbeds+(numberbeds17c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds17c.selectedIndex)*2);
	    if (bedtype17c.selectedIndex==1 || bedtype17c.selectedIndex==3 || bedtype17c.selectedIndex==9 || bedtype17c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds17c.selectedIndex*2); 
	    else if (bedtype17c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds17c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds17c.selectedIndex;
	  }
	  if (bedtype18a.selectedIndex>0) 
	  {
	    if (bedtype18a.selectedIndex<11) totalbeds=totalbeds+(numberbeds18a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds18a.selectedIndex)*2);
	    if (bedtype18a.selectedIndex==1 || bedtype18a.selectedIndex==3 || bedtype18a.selectedIndex==9 || bedtype18a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds18a.selectedIndex*2); 
	    else if (bedtype18a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds18a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds18a.selectedIndex;
	  }
	  if (bedtype18b.selectedIndex>0) 
	  {
	    if (bedtype18b.selectedIndex<11) totalbeds=totalbeds+(numberbeds18b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds18b.selectedIndex)*2);
	    if (bedtype18b.selectedIndex==1 || bedtype18b.selectedIndex==3 || bedtype18b.selectedIndex==9 || bedtype18b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds18b.selectedIndex*2); 
	    else if (bedtype18b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds18b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds18b.selectedIndex;
	  }
	  if (bedtype18c.selectedIndex>0) 
	  {
	    if (bedtype18c.selectedIndex<11) totalbeds=totalbeds+(numberbeds18c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds18c.selectedIndex)*2);
	    if (bedtype18c.selectedIndex==1 || bedtype18c.selectedIndex==3 || bedtype18c.selectedIndex==9 || bedtype18c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds18c.selectedIndex*2); 
	    else if (bedtype18c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds18c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds18c.selectedIndex;
	  }
	  if (bedtype19a.selectedIndex>0) 
	  {
	    if (bedtype19a.selectedIndex<11) totalbeds=totalbeds+(numberbeds19a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds19a.selectedIndex)*2);
	    if (bedtype19a.selectedIndex==1 || bedtype19a.selectedIndex==3 || bedtype19a.selectedIndex==9 || bedtype19a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds19a.selectedIndex*2); 
	    else if (bedtype19a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds19a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds19a.selectedIndex;
	  }
	  if (bedtype19b.selectedIndex>0) 
	  {
	    if (bedtype19b.selectedIndex<11) totalbeds=totalbeds+(numberbeds19b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds19b.selectedIndex)*2);
	    if (bedtype19b.selectedIndex==1 || bedtype19b.selectedIndex==3 || bedtype19b.selectedIndex==9 || bedtype19b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds19b.selectedIndex*2); 
	    else if (bedtype19b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds19b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds19b.selectedIndex;
	  }
	  if (bedtype19c.selectedIndex>0) 
	  {
	    if (bedtype19c.selectedIndex<11) totalbeds=totalbeds+(numberbeds19c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds19c.selectedIndex)*2);
	    if (bedtype19c.selectedIndex==1 || bedtype19c.selectedIndex==3 || bedtype19c.selectedIndex==9 || bedtype19c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds19c.selectedIndex*2); 
	    else if (bedtype19c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds19c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds19c.selectedIndex;
	  }
	  if (bedtype20a.selectedIndex>0) 
	  {
	    if (bedtype20a.selectedIndex<11) totalbeds=totalbeds+(numberbeds20a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds20a.selectedIndex)*2);
	    if (bedtype20a.selectedIndex==1 || bedtype20a.selectedIndex==3 || bedtype20a.selectedIndex==9 || bedtype20a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds20a.selectedIndex*2); 
	    else if (bedtype20a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds20a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds20a.selectedIndex;
	  }
	  if (bedtype20b.selectedIndex>0) 
	  {
	    if (bedtype20b.selectedIndex<11) totalbeds=totalbeds+(numberbeds20b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds20b.selectedIndex)*2);
	    if (bedtype20b.selectedIndex==1 || bedtype20b.selectedIndex==3 || bedtype20b.selectedIndex==9 || bedtype20b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds20b.selectedIndex*2); 
	    else if (bedtype20b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds20b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds20b.selectedIndex;
	  }
	  if (bedtype20c.selectedIndex>0) 
	  {
	    if (bedtype20c.selectedIndex<11) totalbeds=totalbeds+(numberbeds20c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds20c.selectedIndex)*2);
	    if (bedtype20c.selectedIndex==1 || bedtype20c.selectedIndex==3 || bedtype20c.selectedIndex==9 || bedtype20c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds20c.selectedIndex*2); 
	    else if (bedtype20c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds20c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds20c.selectedIndex;
	  }
	  if (bedtype21a.selectedIndex>0) 
	  {
	    if (bedtype21a.selectedIndex<11) totalbeds=totalbeds+(numberbeds21a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds21a.selectedIndex)*2);
	    if (bedtype21a.selectedIndex==1 || bedtype21a.selectedIndex==3 || bedtype21a.selectedIndex==9 || bedtype21a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds21a.selectedIndex*2); 
	    else if (bedtype21a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds21a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds21a.selectedIndex;
	  }
	  if (bedtype21b.selectedIndex>0) 
	  {
	    if (bedtype21b.selectedIndex<11) totalbeds=totalbeds+(numberbeds21b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds21b.selectedIndex)*2);
	    if (bedtype21b.selectedIndex==1 || bedtype21b.selectedIndex==3 || bedtype21b.selectedIndex==9 || bedtype21b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds21b.selectedIndex*2); 
	    else if (bedtype21b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds21b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds21b.selectedIndex;
	  }
	  if (bedtype21c.selectedIndex>0) 
	  {
	    if (bedtype21c.selectedIndex<11) totalbeds=totalbeds+(numberbeds21c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds21c.selectedIndex)*2);
	    if (bedtype21c.selectedIndex==1 || bedtype21c.selectedIndex==3 || bedtype21c.selectedIndex==9 || bedtype21c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds21c.selectedIndex*2); 
	    else if (bedtype21c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds21c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds21c.selectedIndex;
	  }
	  if (bedtype22a.selectedIndex>0) 
	  {
	    if (bedtype22a.selectedIndex<11) totalbeds=totalbeds+(numberbeds22a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds22a.selectedIndex)*2);
	    if (bedtype22a.selectedIndex==1 || bedtype22a.selectedIndex==3 || bedtype22a.selectedIndex==9 || bedtype22a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds22a.selectedIndex*2); 
	    else if (bedtype22a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds22a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds22a.selectedIndex;
	  }
	  if (bedtype22b.selectedIndex>0) 
	  {
	    if (bedtype22b.selectedIndex<11) totalbeds=totalbeds+(numberbeds22b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds22b.selectedIndex)*2);
	    if (bedtype22b.selectedIndex==1 || bedtype22b.selectedIndex==3 || bedtype22b.selectedIndex==9 || bedtype22b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds22b.selectedIndex*2); 
	    else if (bedtype22b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds22b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds22b.selectedIndex;
	  }
	  if (bedtype22c.selectedIndex>0) 
	  {
	    if (bedtype22c.selectedIndex<11) totalbeds=totalbeds+(numberbeds22c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds22c.selectedIndex)*2);
	    if (bedtype22c.selectedIndex==1 || bedtype22c.selectedIndex==3 || bedtype22c.selectedIndex==9 || bedtype22c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds22c.selectedIndex*2); 
	    else if (bedtype22c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds22c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds22c.selectedIndex;
	  }
	  if (bedtype23a.selectedIndex>0) 
	  {
	    if (bedtype23a.selectedIndex<11) totalbeds=totalbeds+(numberbeds23a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds23a.selectedIndex)*2);
	    if (bedtype23a.selectedIndex==1 || bedtype23a.selectedIndex==3 || bedtype23a.selectedIndex==9 || bedtype23a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds23a.selectedIndex*2); 
	    else if (bedtype23a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds23a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds23a.selectedIndex;
	  }
	  if (bedtype23b.selectedIndex>0) 
	  {
	    if (bedtype23b.selectedIndex<11) totalbeds=totalbeds+(numberbeds23b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds23b.selectedIndex)*2);
	    if (bedtype23b.selectedIndex==1 || bedtype23b.selectedIndex==3 || bedtype23b.selectedIndex==9 || bedtype23b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds23b.selectedIndex*2); 
	    else if (bedtype23b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds23b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds23b.selectedIndex;
	  }
	  if (bedtype23c.selectedIndex>0) 
	  {
	    if (bedtype23c.selectedIndex<11) totalbeds=totalbeds+(numberbeds23c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds23c.selectedIndex)*2);
	    if (bedtype23c.selectedIndex==1 || bedtype23c.selectedIndex==3 || bedtype23c.selectedIndex==9 || bedtype23c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds23c.selectedIndex*2); 
	    else if (bedtype23c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds23c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds23c.selectedIndex;
	  }
	  if (bedtype24a.selectedIndex>0) 
	  {
	    if (bedtype24a.selectedIndex<11) totalbeds=totalbeds+(numberbeds24a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds24a.selectedIndex)*2);
	    if (bedtype24a.selectedIndex==1 || bedtype24a.selectedIndex==3 || bedtype24a.selectedIndex==9 || bedtype24a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds24a.selectedIndex*2); 
	    else if (bedtype24a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds24a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds24a.selectedIndex;
	  }
	  if (bedtype24b.selectedIndex>0) 
	  {
	    if (bedtype24b.selectedIndex<11) totalbeds=totalbeds+(numberbeds24b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds24b.selectedIndex)*2);
	    if (bedtype24b.selectedIndex==1 || bedtype24b.selectedIndex==3 || bedtype24b.selectedIndex==9 || bedtype24b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds24b.selectedIndex*2); 
	    else if (bedtype24b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds24b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds24b.selectedIndex;
	  }
	  if (bedtype24c.selectedIndex>0) 
	  {
	    if (bedtype24c.selectedIndex<11) totalbeds=totalbeds+(numberbeds24c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds24c.selectedIndex)*2);
	    if (bedtype24c.selectedIndex==1 || bedtype24c.selectedIndex==3 || bedtype24c.selectedIndex==9 || bedtype24c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds24c.selectedIndex*2); 
	    else if (bedtype24c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds24c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds24c.selectedIndex;
	  }
	  if (bedtype25a.selectedIndex>0) 
	  {
	    if (bedtype25a.selectedIndex<11) totalbeds=totalbeds+(numberbeds25a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds25a.selectedIndex)*2);
	    if (bedtype25a.selectedIndex==1 || bedtype25a.selectedIndex==3 || bedtype25a.selectedIndex==9 || bedtype25a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds25a.selectedIndex*2); 
	    else if (bedtype25a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds25a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds25a.selectedIndex;
	  }
	  if (bedtype25b.selectedIndex>0) 
	  {
	    if (bedtype25b.selectedIndex<11) totalbeds=totalbeds+(numberbeds25b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds25b.selectedIndex)*2);
	    if (bedtype25b.selectedIndex==1 || bedtype25b.selectedIndex==3 || bedtype25b.selectedIndex==9 || bedtype25b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds25b.selectedIndex*2); 
	    else if (bedtype25b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds25b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds25b.selectedIndex;
	  }
	  if (bedtype25c.selectedIndex>0) 
	  {
	    if (bedtype25c.selectedIndex<11) totalbeds=totalbeds+(numberbeds25c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds25c.selectedIndex)*2);
	    if (bedtype25c.selectedIndex==1 || bedtype25c.selectedIndex==3 || bedtype25c.selectedIndex==9 || bedtype25c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds25c.selectedIndex*2); 
	    else if (bedtype25c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds25c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds25c.selectedIndex;
	  }
	  if (bedtype26a.selectedIndex>0) 
	  {
	    if (bedtype26a.selectedIndex<11) totalbeds=totalbeds+(numberbeds26a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds26a.selectedIndex)*2);
	    if (bedtype26a.selectedIndex==1 || bedtype26a.selectedIndex==3 || bedtype26a.selectedIndex==9 || bedtype26a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds26a.selectedIndex*2); 
	    else if (bedtype26a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds26a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds26a.selectedIndex;
	  }
	  if (bedtype26b.selectedIndex>0) 
	  {
	    if (bedtype26b.selectedIndex<11) totalbeds=totalbeds+(numberbeds26b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds26b.selectedIndex)*2);
	    if (bedtype26b.selectedIndex==1 || bedtype26b.selectedIndex==3 || bedtype26b.selectedIndex==9 || bedtype26b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds26b.selectedIndex*2); 
	    else if (bedtype26b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds26b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds26b.selectedIndex;
	  }
	  if (bedtype26c.selectedIndex>0) 
	  {
	    if (bedtype26c.selectedIndex<11) totalbeds=totalbeds+(numberbeds26c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds26c.selectedIndex)*2);
	    if (bedtype26c.selectedIndex==1 || bedtype26c.selectedIndex==3 || bedtype26c.selectedIndex==9 || bedtype26c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds26c.selectedIndex*2); 
	    else if (bedtype26c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds26c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds26c.selectedIndex;
	  }
	  if (bedtype27a.selectedIndex>0) 
	  {
	    if (bedtype27a.selectedIndex<11) totalbeds=totalbeds+(numberbeds27a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds27a.selectedIndex)*2);
	    if (bedtype27a.selectedIndex==1 || bedtype27a.selectedIndex==3 || bedtype27a.selectedIndex==9 || bedtype27a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds27a.selectedIndex*2); 
	    else if (bedtype27a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds27a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds27a.selectedIndex;
	  }
	  if (bedtype27b.selectedIndex>0) 
	  {
	    if (bedtype27b.selectedIndex<11) totalbeds=totalbeds+(numberbeds27b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds27b.selectedIndex)*2);
	    if (bedtype27b.selectedIndex==1 || bedtype27b.selectedIndex==3 || bedtype27b.selectedIndex==9 || bedtype27b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds27b.selectedIndex*2); 
	    else if (bedtype27b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds27b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds27b.selectedIndex;
	  }
	  if (bedtype27c.selectedIndex>0) 
	  {
	    if (bedtype27c.selectedIndex<11) totalbeds=totalbeds+(numberbeds27c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds27c.selectedIndex)*2);
	    if (bedtype27c.selectedIndex==1 || bedtype27c.selectedIndex==3 || bedtype27c.selectedIndex==9 || bedtype27c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds27c.selectedIndex*2); 
	    else if (bedtype27c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds27c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds27c.selectedIndex;
	  }
	  if (bedtype28a.selectedIndex>0) 
	  {
	    if (bedtype28a.selectedIndex<11) totalbeds=totalbeds+(numberbeds28a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds28a.selectedIndex)*2);
	    if (bedtype28a.selectedIndex==1 || bedtype28a.selectedIndex==3 || bedtype28a.selectedIndex==9 || bedtype28a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds28a.selectedIndex*2); 
	    else if (bedtype28a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds28a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds28a.selectedIndex;
	  }
	  if (bedtype28b.selectedIndex>0) 
	  {
	    if (bedtype28b.selectedIndex<11) totalbeds=totalbeds+(numberbeds28b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds28b.selectedIndex)*2);
	    if (bedtype28b.selectedIndex==1 || bedtype28b.selectedIndex==3 || bedtype28b.selectedIndex==9 || bedtype28b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds28b.selectedIndex*2); 
	    else if (bedtype28b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds28b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds28b.selectedIndex;
	  }
	  if (bedtype28c.selectedIndex>0) 
	  {
	    if (bedtype28c.selectedIndex<11) totalbeds=totalbeds+(numberbeds28c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds28c.selectedIndex)*2);
	    if (bedtype28c.selectedIndex==1 || bedtype28c.selectedIndex==3 || bedtype28c.selectedIndex==9 || bedtype28c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds28c.selectedIndex*2); 
	    else if (bedtype28c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds28c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds28c.selectedIndex;
	  }
	  if (bedtype29a.selectedIndex>0) 
	  {
	    if (bedtype29a.selectedIndex<11) totalbeds=totalbeds+(numberbeds29a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds29a.selectedIndex)*2);
	    if (bedtype29a.selectedIndex==1 || bedtype29a.selectedIndex==3 || bedtype29a.selectedIndex==9 || bedtype29a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds29a.selectedIndex*2); 
	    else if (bedtype29a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds29a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds29a.selectedIndex;
	  }
	  if (bedtype29b.selectedIndex>0) 
	  {
	    if (bedtype29b.selectedIndex<11) totalbeds=totalbeds+(numberbeds29b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds29b.selectedIndex)*2);
	    if (bedtype29b.selectedIndex==1 || bedtype29b.selectedIndex==3 || bedtype29b.selectedIndex==9 || bedtype29b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds29b.selectedIndex*2); 
	    else if (bedtype29b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds29b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds29b.selectedIndex;
	  }
	  if (bedtype29c.selectedIndex>0) 
	  {
	    if (bedtype29c.selectedIndex<11) totalbeds=totalbeds+(numberbeds29c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds29c.selectedIndex)*2);
	    if (bedtype29c.selectedIndex==1 || bedtype29c.selectedIndex==3 || bedtype29c.selectedIndex==9 || bedtype29c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds29c.selectedIndex*2); 
	    else if (bedtype29c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds29c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds29c.selectedIndex;
	  }
	  if (bedtype30a.selectedIndex>0) 
	  {
	    if (bedtype30a.selectedIndex<11) totalbeds=totalbeds+(numberbeds30a.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds30a.selectedIndex)*2);
	    if (bedtype30a.selectedIndex==1 || bedtype30a.selectedIndex==3 || bedtype30a.selectedIndex==9 || bedtype30a.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds30a.selectedIndex*2); 
	    else if (bedtype30a.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds30a.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds30a.selectedIndex;
	  }
	  if (bedtype30b.selectedIndex>0) 
	  {
	    if (bedtype30b.selectedIndex<11) totalbeds=totalbeds+(numberbeds30b.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds30b.selectedIndex)*2);
	    if (bedtype30b.selectedIndex==1 || bedtype30b.selectedIndex==3 || bedtype30b.selectedIndex==9 || bedtype30b.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds30b.selectedIndex*2); 
	    else if (bedtype30b.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds30b.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds30b.selectedIndex;
	  }
	  if (bedtype30c.selectedIndex>0) 
	  {
	    if (bedtype30c.selectedIndex<11) totalbeds=totalbeds+(numberbeds30c.selectedIndex);
	    else totalbeds=totalbeds+((numberbeds30c.selectedIndex)*2);
	    if (bedtype30c.selectedIndex==1 || bedtype30c.selectedIndex==3 || bedtype30c.selectedIndex==9 || bedtype30c.selectedIndex==11) totalsleeps=totalsleeps+(numberbeds30c.selectedIndex*2); 
	    else if (bedtype30c.selectedIndex==12) totalsleeps=totalsleeps+(numberbeds30c.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbeds30c.selectedIndex;
	  }

	  if (bedtypelivingrooma.selectedIndex>0) 
	  {
	    if (bedtypelivingrooma.selectedIndex<11) totalbeds=totalbeds+(numberbedslivingrooma.selectedIndex);
	    else totalbeds=totalbeds+((numberbedslivingrooma.selectedIndex)*2);
	    if (bedtypelivingrooma.selectedIndex==1 || bedtypelivingrooma.selectedIndex==3 || bedtypelivingrooma.selectedIndex==9 || bedtypelivingrooma.selectedIndex==11) totalsleeps=totalsleeps+(numberbedslivingrooma.selectedIndex*2); 
	    else if (bedtypelivingrooma.selectedIndex==12) totalsleeps=totalsleeps+(numberbedslivingrooma.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbedslivingrooma.selectedIndex;
	  }
	  if (bedtypelivingroomb.selectedIndex>0) 
	  {
	    if (bedtypelivingroomb.selectedIndex<11) totalbeds=totalbeds+(numberbedslivingroomb.selectedIndex);
	    else totalbeds=totalbeds+((numberbedslivingroomb.selectedIndex)*2);
	    if (bedtypelivingroomb.selectedIndex==1 || bedtypelivingroomb.selectedIndex==3 || bedtypelivingroomb.selectedIndex==9 || bedtypelivingroomb.selectedIndex==11) totalsleeps=totalsleeps+(numberbedslivingroomb.selectedIndex*2); 
	    else if (bedtypelivingroomb.selectedIndex==12) totalsleeps=totalsleeps+(numberbedslivingroomb.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbedslivingroomb.selectedIndex;
	  }
	  if (bedtypelivingroomc.selectedIndex>0) 
	  {
	    if (bedtypelivingroomc.selectedIndex<11) totalbeds=totalbeds+(numberbedslivingroomc.selectedIndex);
	    else totalbeds=totalbeds+((numberbedslivingroomc.selectedIndex)*2);
	    if (bedtypelivingroomc.selectedIndex==1 || bedtypelivingroomc.selectedIndex==3 || bedtypelivingroomc.selectedIndex==9 || bedtypelivingroomc.selectedIndex==11) totalsleeps=totalsleeps+(numberbedslivingroomc.selectedIndex*2); 
	    else if (bedtypelivingroomc.selectedIndex==12) totalsleeps=totalsleeps+(numberbedslivingroomc.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbedslivingroomc.selectedIndex;
	  }
	  if (bedtypediningrooma.selectedIndex>0) 
	  {
	    if (bedtypediningrooma.selectedIndex<11) totalbeds=totalbeds+(numberbedsdiningrooma.selectedIndex);
	    else totalbeds=totalbeds+((numberbedsdiningrooma.selectedIndex)*2);
	    if (bedtypediningrooma.selectedIndex==1 || bedtypediningrooma.selectedIndex==3 || bedtypediningrooma.selectedIndex==9 || bedtypediningrooma.selectedIndex==11) totalsleeps=totalsleeps+(numberbedsdiningrooma.selectedIndex*2); 
	    else if (bedtypediningrooma.selectedIndex==12) totalsleeps=totalsleeps+(numberbedsdiningrooma.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbedsdiningrooma.selectedIndex;
	  }
	  if (bedtypediningroomb.selectedIndex>0) 
	  {
	    if (bedtypediningroomb.selectedIndex<11) totalbeds=totalbeds+(numberbedsdiningroomb.selectedIndex);
	    else totalbeds=totalbeds+((numberbedsdiningroomb.selectedIndex)*2);
	    if (bedtypediningroomb.selectedIndex==1 || bedtypediningroomb.selectedIndex==3 || bedtypediningroomb.selectedIndex==9 || bedtypediningroomb.selectedIndex==11) totalsleeps=totalsleeps+(numberbedsdiningroomb.selectedIndex*2); 
	    else if (bedtypediningroomb.selectedIndex==12) totalsleeps=totalsleeps+(numberbedsdiningroomb.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbedsdiningroomb.selectedIndex;
	  }
	  if (bedtypediningroomc.selectedIndex>0) 
	  {
	    if (bedtypediningroomc.selectedIndex<11) totalbeds=totalbeds+(numberbedsdiningroomc.selectedIndex);
	    else totalbeds=totalbeds+((numberbedsdiningroomc.selectedIndex)*2);
	    if (bedtypediningroomc.selectedIndex==1 || bedtypediningroomc.selectedIndex==3 || bedtypediningroomc.selectedIndex==9 || bedtypediningroomc.selectedIndex==11) totalsleeps=totalsleeps+(numberbedsdiningroomc.selectedIndex*2); 
	    else if (bedtypediningroomc.selectedIndex==12) totalsleeps=totalsleeps+(numberbedsdiningroomc.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbedsdiningroomc.selectedIndex;
	  }
	  if (bedtypehalla.selectedIndex>0) 
	  {
	    if (bedtypehalla.selectedIndex<11) totalbeds=totalbeds+(numberbedshalla.selectedIndex);
	    else totalbeds=totalbeds+((numberbedshalla.selectedIndex)*2);
	    if (bedtypehalla.selectedIndex==1 || bedtypehalla.selectedIndex==3 || bedtypehalla.selectedIndex==9 || bedtypehalla.selectedIndex==11) totalsleeps=totalsleeps+(numberbedshalla.selectedIndex*2); 
	    else if (bedtypehalla.selectedIndex==12) totalsleeps=totalsleeps+(numberbedshalla.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbedshalla.selectedIndex;
	  }
	  if (bedtypehallb.selectedIndex>0) 
	  {
	    if (bedtypehallb.selectedIndex<11) totalbeds=totalbeds+(numberbedshallb.selectedIndex);
	    else totalbeds=totalbeds+((numberbedshallb.selectedIndex)*2);
	    if (bedtypehallb.selectedIndex==1 || bedtypehallb.selectedIndex==3 || bedtypehallb.selectedIndex==9 || bedtypehallb.selectedIndex==11) totalsleeps=totalsleeps+(numberbedshallb.selectedIndex*2); 
	    else if (bedtypehallb.selectedIndex==12) totalsleeps=totalsleeps+(numberbedshallb.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbedshallb.selectedIndex;
	  }
	  if (bedtypehallc.selectedIndex>0) 
	  {
	    if (bedtypehallc.selectedIndex<11) totalbeds=totalbeds+(numberbedshallc.selectedIndex);
	    else totalbeds=totalbeds+((numberbedshallc.selectedIndex)*2);
	    if (bedtypehallc.selectedIndex==1 || bedtypehallc.selectedIndex==3 || bedtypehallc.selectedIndex==9 || bedtypehallc.selectedIndex==11) totalsleeps=totalsleeps+(numberbedshallc.selectedIndex*2); 
	    else if (bedtypehallc.selectedIndex==12) totalsleeps=totalsleeps+(numberbedshallc.selectedIndex*3);
	    else totalsleeps=totalsleeps+numberbedshallc.selectedIndex;
	  }
	  document.getElementById('numberbedrooms').innerHTML=totalbedrooms;
	  numberbedrooms.value=totalbedrooms;
	  //document.getElementById('numbersleeps').innerHTML=totalsleeps;
	  //sleeps.value=totalsleeps;

          if (changesleeps=='1')
	  {
		  sleeps.length=0;
		  NewOpt =  new Option;    
		  NewOpt.value = totalsleeps;   
		  NewOpt.text = totalsleeps; 
		  sleeps.options[0]=NewOpt; 
		  j=1;
		  for (var i=  (totalsleeps-1);i > 0 ;i--) 
		  {
		     NewOpt =  new Option;    
		     NewOpt.value = i;   
		     NewOpt.text = i; 
		     sleeps.options[j]=NewOpt; 
		     j++;
		  }
	  }

	  if (sitelanguage.value=='fr')
	  {
		  includingsofabed=" - Pas de canapé-lit dans le salon";
		  if (bedtypelivingrooma.selectedIndex>0 || bedtypelivingroomb.selectedIndex>0 || bedtypelivingroomc.selectedIndex>0 || bedtypediningrooma.selectedIndex>0 || bedtypediningroomb.selectedIndex>0 || bedtypediningroomc.selectedIndex>0 || bedtypehalla.selectedIndex>0  || bedtypehallb.selectedIndex>0 || bedtypehallc.selectedIndex>0) 
		  {
			includingsofabed=" - Canapé-lit dans le salon inclus";
			numberbeds.value=totalbeds+'a';
		  }
		  else numberbeds.value=totalbeds+'b';
		  document.getElementById('numberbeds').innerHTML=totalbeds+includingsofabed;
	  }
	  else
	  {
		  includingsofabed=" - No sofa bed in living room";
		  if (bedtypelivingrooma.selectedIndex>0 || bedtypelivingroomb.selectedIndex>0 || bedtypelivingroomc.selectedIndex>0 || bedtypediningrooma.selectedIndex>0 || bedtypediningroomb.selectedIndex>0 || bedtypediningroomc.selectedIndex>0 || bedtypehalla.selectedIndex>0  || bedtypehallb.selectedIndex>0 || bedtypehallc.selectedIndex>0)
		  {
			 includingsofabed=" - Including sofa bed in living room";
			 numberbeds.value=totalbeds+'a';
		  }
		  else numberbeds.value=totalbeds+'b';
		  document.getElementById('numberbeds').innerHTML=totalbeds+includingsofabed;
	  }

  }
}

function showchildren()
{
   with(document.info)
   {
	   total=children.selectedIndex;
	   if (total==0) 
	   {
		document.getElementById('child1').style.display="none";
		document.getElementById('child2').style.display="none";
		document.getElementById('child3').style.display="none";
		document.getElementById('child4').style.display="none";
		document.getElementById('child5').style.display="none";
		document.getElementById('child6').style.display="none";
		document.getElementById('child7').style.display="none";
		document.getElementById('child8').style.display="none";
		document.getElementById('child9').style.display="none";
		document.getElementById('child10').style.display="none";
		document.getElementById('child1b').style.display="none";
		document.getElementById('child2b').style.display="none";
		document.getElementById('child3b').style.display="none";
		document.getElementById('child4b').style.display="none";
		document.getElementById('child5b').style.display="none";
		document.getElementById('child6b').style.display="none";
		document.getElementById('child7b').style.display="none";
		document.getElementById('child8b').style.display="none";
		document.getElementById('child9b').style.display="none";
		document.getElementById('child10b').style.display="none";
	   }
	   else if (total==1) 
	   {
		document.getElementById('child1').style.display="block";
		document.getElementById('child2').style.display="none";
		document.getElementById('child3').style.display="none";
		document.getElementById('child4').style.display="none";
		document.getElementById('child5').style.display="none";
		document.getElementById('child6').style.display="none";
		document.getElementById('child7').style.display="none";
		document.getElementById('child8').style.display="none";
		document.getElementById('child9').style.display="none";
		document.getElementById('child10').style.display="none";
		document.getElementById('child1b').style.display="block";
		document.getElementById('child2b').style.display="none";
		document.getElementById('child3b').style.display="none";
		document.getElementById('child4b').style.display="none";
		document.getElementById('child5b').style.display="none";
		document.getElementById('child6b').style.display="none";
		document.getElementById('child7b').style.display="none";
		document.getElementById('child8b').style.display="none";
		document.getElementById('child9b').style.display="none";
		document.getElementById('child10b').style.display="none";
	   }
	   else if (total==2) 
	   {
		document.getElementById('child1').style.display="block";
		document.getElementById('child2').style.display="block";
		document.getElementById('child3').style.display="none";
		document.getElementById('child4').style.display="none";
		document.getElementById('child5').style.display="none";
		document.getElementById('child6').style.display="none";
		document.getElementById('child7').style.display="none";
		document.getElementById('child8').style.display="none";
		document.getElementById('child9').style.display="none";
		document.getElementById('child10').style.display="none";
		document.getElementById('child1b').style.display="block";
		document.getElementById('child2b').style.display="block";
		document.getElementById('child3b').style.display="none";
		document.getElementById('child4b').style.display="none";
		document.getElementById('child5b').style.display="none";
		document.getElementById('child6b').style.display="none";
		document.getElementById('child7b').style.display="none";
		document.getElementById('child8b').style.display="none";
		document.getElementById('child9b').style.display="none";
		document.getElementById('child10b').style.display="none";
	   }
	   else if (total==3) 
	   {
		document.getElementById('child1').style.display="block";
		document.getElementById('child2').style.display="block";
		document.getElementById('child3').style.display="block";
		document.getElementById('child4').style.display="none";
		document.getElementById('child5').style.display="none";
		document.getElementById('child6').style.display="none";
		document.getElementById('child7').style.display="none";
		document.getElementById('child8').style.display="none";
		document.getElementById('child9').style.display="none";
		document.getElementById('child10').style.display="none";
		document.getElementById('child1b').style.display="block";
		document.getElementById('child2b').style.display="block";
		document.getElementById('child3b').style.display="block";
		document.getElementById('child4b').style.display="none";
		document.getElementById('child5b').style.display="none";
		document.getElementById('child6b').style.display="none";
		document.getElementById('child7b').style.display="none";
		document.getElementById('child8b').style.display="none";
		document.getElementById('child9b').style.display="none";
		document.getElementById('child10b').style.display="none";
	   }
	   else if (total==4) 
	   {
		document.getElementById('child1').style.display="block";
		document.getElementById('child2').style.display="block";
		document.getElementById('child3').style.display="block";
		document.getElementById('child4').style.display="block";
		document.getElementById('child5').style.display="none";
		document.getElementById('child6').style.display="none";
		document.getElementById('child7').style.display="none";
		document.getElementById('child8').style.display="none";
		document.getElementById('child9').style.display="none";
		document.getElementById('child10').style.display="none";
		document.getElementById('child1b').style.display="block";
		document.getElementById('child2b').style.display="block";
		document.getElementById('child3b').style.display="block";
		document.getElementById('child4b').style.display="block";
		document.getElementById('child5b').style.display="none";
		document.getElementById('child6b').style.display="none";
		document.getElementById('child7b').style.display="none";
		document.getElementById('child8b').style.display="none";
		document.getElementById('child9b').style.display="none";
		document.getElementById('child10b').style.display="none";
	   }
	   else if (total==5) 
	   {
		document.getElementById('child1').style.display="block";
		document.getElementById('child2').style.display="block";
		document.getElementById('child3').style.display="block";
		document.getElementById('child4').style.display="block";
		document.getElementById('child5').style.display="block";
		document.getElementById('child6').style.display="none";
		document.getElementById('child7').style.display="none";
		document.getElementById('child8').style.display="none";
		document.getElementById('child9').style.display="none";
		document.getElementById('child10').style.display="none";
		document.getElementById('child1b').style.display="block";
		document.getElementById('child2b').style.display="block";
		document.getElementById('child3b').style.display="block";
		document.getElementById('child4b').style.display="block";
		document.getElementById('child5b').style.display="block";
		document.getElementById('child6b').style.display="none";
		document.getElementById('child7b').style.display="none";
		document.getElementById('child8b').style.display="none";
		document.getElementById('child9b').style.display="none";
		document.getElementById('child10b').style.display="none";
	   }
	   else if (total==6) 
	   {
		document.getElementById('child1').style.display="block";
		document.getElementById('child2').style.display="block";
		document.getElementById('child3').style.display="block";
		document.getElementById('child4').style.display="block";
		document.getElementById('child5').style.display="block";
		document.getElementById('child6').style.display="block";
		document.getElementById('child7').style.display="none";
		document.getElementById('child8').style.display="none";
		document.getElementById('child9').style.display="none";
		document.getElementById('child10').style.display="none";
		document.getElementById('child1b').style.display="block";
		document.getElementById('child2b').style.display="block";
		document.getElementById('child3b').style.display="block";
		document.getElementById('child4b').style.display="block";
		document.getElementById('child5b').style.display="block";
		document.getElementById('child6b').style.display="block";
		document.getElementById('child7b').style.display="none";
		document.getElementById('child8b').style.display="none";
		document.getElementById('child9b').style.display="none";
		document.getElementById('child10b').style.display="none";
	   }
	   else if (total==7) 
	   {
		document.getElementById('child1').style.display="block";
		document.getElementById('child2').style.display="block";
		document.getElementById('child3').style.display="block";
		document.getElementById('child4').style.display="block";
		document.getElementById('child5').style.display="block";
		document.getElementById('child6').style.display="block";
		document.getElementById('child7').style.display="block";
		document.getElementById('child8').style.display="none";
		document.getElementById('child9').style.display="none";
		document.getElementById('child10').style.display="none";
		document.getElementById('child1b').style.display="block";
		document.getElementById('child2b').style.display="block";
		document.getElementById('child3b').style.display="block";
		document.getElementById('child4b').style.display="block";
		document.getElementById('child5b').style.display="block";
		document.getElementById('child6b').style.display="block";
		document.getElementById('child7b').style.display="block";
		document.getElementById('child8b').style.display="none";
		document.getElementById('child9b').style.display="none";
		document.getElementById('child10b').style.display="none";
	   }
	   else if (total==8) 
	   {
		document.getElementById('child1').style.display="block";
		document.getElementById('child2').style.display="block";
		document.getElementById('child3').style.display="block";
		document.getElementById('child4').style.display="block";
		document.getElementById('child5').style.display="block";
		document.getElementById('child6').style.display="block";
		document.getElementById('child7').style.display="block";
		document.getElementById('child8').style.display="block";
		document.getElementById('child9').style.display="none";
		document.getElementById('child10').style.display="none";
		document.getElementById('child1b').style.display="block";
		document.getElementById('child2b').style.display="block";
		document.getElementById('child3b').style.display="block";
		document.getElementById('child4b').style.display="block";
		document.getElementById('child5b').style.display="block";
		document.getElementById('child6b').style.display="block";
		document.getElementById('child7b').style.display="block";
		document.getElementById('child8b').style.display="block";
		document.getElementById('child9b').style.display="none";
		document.getElementById('child10b').style.display="none";
	   }
	   else if (total==9) 
	   {
		document.getElementById('child1').style.display="block";
		document.getElementById('child2').style.display="block";
		document.getElementById('child3').style.display="block";
		document.getElementById('child4').style.display="block";
		document.getElementById('child5').style.display="block";
		document.getElementById('child6').style.display="block";
		document.getElementById('child7').style.display="block";
		document.getElementById('child8').style.display="block";
		document.getElementById('child9').style.display="block";
		document.getElementById('child10').style.display="none";
		document.getElementById('child1b').style.display="block";
		document.getElementById('child2b').style.display="block";
		document.getElementById('child3b').style.display="block";
		document.getElementById('child4b').style.display="block";
		document.getElementById('child5b').style.display="block";
		document.getElementById('child6b').style.display="block";
		document.getElementById('child7b').style.display="block";
		document.getElementById('child8b').style.display="block";
		document.getElementById('child9b').style.display="block";
		document.getElementById('child10b').style.display="none";
	   }
	   else if (total==10) 
	   {
		document.getElementById('child1').style.display="block";
		document.getElementById('child2').style.display="block";
		document.getElementById('child3').style.display="block";
		document.getElementById('child4').style.display="block";
		document.getElementById('child5').style.display="block";
		document.getElementById('child6').style.display="block";
		document.getElementById('child7').style.display="block";
		document.getElementById('child8').style.display="block";
		document.getElementById('child9').style.display="block";
		document.getElementById('child10').style.display="block";
		document.getElementById('child1b').style.display="block";
		document.getElementById('child2b').style.display="block";
		document.getElementById('child3b').style.display="block";
		document.getElementById('child4b').style.display="block";
		document.getElementById('child5b').style.display="block";
		document.getElementById('child6b').style.display="block";
		document.getElementById('child7b').style.display="block";
		document.getElementById('child8b').style.display="block";
		document.getElementById('child9b').style.display="block";
		document.getElementById('child10b').style.display="block";
	   }
   }
}
