function ecrirePromos()
{
	var promos = new Array();
	// src de l'image, titre, sous-titre, texte, lien, section ou sous-section dans laquelle la promo doit s'afficher, si la promo doit s'afficher dans une nouvelle fenêtre
	/* toutes les sections : plan;accueil;activites;certificatCadeau;condos;contact;gastronomie;hebergement;localisation;mariagesReceptions;offresSpeciales;reunions;spa;tarifsForfaits;reservations*/
	promos[0] = new Array('', 'SMOKE FREE', 'Manoir St-Castin is a smoke free environment', '', '', 'plan;accueil;activites;certificatCadeau;contact;gastronomie;hebergement;localisation;mariagesReceptions;offresSpeciales;centreSante;tarifsForfaits;reservations;reunions', false);
	promos[1] = new Array('../images/promos/rgatlb.jpg', '', '', '', 'http://www.lacbeauport.com/', 'plan;activites;certificatCadeau;contact;gastronomie;hebergement;localisation;mariagesReceptions;offresSpeciales;centreSante;tarifsForfaits;reservations;reunions', true);
	promos[2] = new Array('../images-eg/promos/spa.gif', '', '', '', 'http://www.spavillegia.com/', 'plan;accueil;activites;certificatCadeau;condos;contact;gastronomie;hebergement;localisation;mariagesReceptions;offresSpeciales;spa;tarifsForfaits;reservations;reunions', true);
	promos[3] = new Array('../images-fr/promos/reservert.jpg', 'RÉSER VERT', '', '', 'http://www.reservert.com', 'plan;accueil;activites;certificatCadeau;contact;gastronomie;hebergement;localisation;mariagesReceptions;offresSpeciales;centreSante;tarifsForfaits;reservations;reunions', true);
	promos[4] = new Array('../images/promos/corpoaventure.jpg', 'LIVEN UP YOUR<br>MEETINGS', 'with Hôtels Villegia', '', 'pages-eg/reu_corpoaventure.htm', 'plan;accueil;activites;certificatCadeau;condos;contact;gastronomie;hebergement;localisation;mariagesReceptions;offresSpeciales;spa;tarifsForfaits;reservations;reunions', false);

	//promos[x] = new Array('../../images/promos/20-dollars.gif', 'VILLEGIA REBATE IS BACK', 'Download the coupon now to get your $20 rebate', '', '../../pdfs-eg/promorabais20.pdf', 'plan;accueil;activites;certificatCadeau;contact;gastronomie;hebergement;localisation;mariagesReceptions;offresSpeciales;centreSante;tarifsForfaits;reservations;reunions', false);
	//promos[x] = new Array('../images-eg/promos/salonfemme.jpg', 'NATIONAL WOMEN\'S SHOW', '', '', 'http://www.nationalwomenshow.com/montreal_eng/coupon.html', 'plan;accueil;activites;algotherapie;certificatCadeau;contact;gastronomie;hebergement;localisation;mariagesReceptions;offresSpeciales;reunions;tarifsForfaits', true);
	//promos[x] = new Array('../images-eg/promos/offre_derniere-minute.jpg', '', '', '', '', 'plan;accueil;activites;certificatCadeau;condos;contact;gastronomie;hebergement;localisation;mariagesReceptions;offresSpeciales;reunions;spa;tarifsForfaits', true);
	//promos[x] = new Array('../images-eg/promos/st-sylvestre.jpg', '', '', '', '../../promovillegia/mailing_20081008/stcastin-eg.htm', 'plan;accueil;activites;certificatCadeau;condos;contact;gastronomie;hebergement;localisation;mariagesReceptions;offresSpeciales;reunions;spa;tarifsForfaits', true);
	//promos[x] = new Array('../images-eg/promos/cheque_cadeau.gif', 'PLEASE MENTION<br>THIS OFFER UPON<br>YOUR PURCHASE', 'The rebate will be apply only on the room portion. Valid until November 30th 2008.', '', '', 'plan;accueil;activites;certificatCadeau;condos;contact;gastronomie;hebergement;localisation;mariagesReceptions;offresSpeciales;reunions;spa;tarifsForfaits;reservations', false);
	//promos[x] = new Array('../images/promos/plein_air-ete.jpg', 'THE OUTDOOR AT<br>MANOIR ST-CASTIN', 'Free activities with<br>all lodging packages<br>From June 24th, 2008<br>to September 1st, 2008', 'Bike, pedal boat,<br>canoe, kayak, pool<br>and much more!', '', 'plan;accueil;activites;certificatCadeau;condos;contact;gastronomie;hebergement;localisation;mariagesReceptions;offresSpeciales;reunions;spa;tarifsForfaits;reservations', false);
	//promos[x] = new Array('../images/promos/anneau_glace.jpg', 'SKATE WITH US', 'on our magnificent<br>skating rink', '', 'pages-eg/act_place-region.htm#hiver', 'accueil', false);
	//promos[x] = new Array('../images/promos/st-valentin.jpg', 'VALENTINE\'S DAY 2008 PACKAGE', '', '', 'pages-eg/offres_speciales.htm', 'accueil', false);
	//promos[x] = new Array('../images-eg/promos/certificat_stvalentin.jpg', 'GREAT GIFTS IDEA', 'Offer to the loved one<br>a gift certicate', '', 'pages-eg/tarifs_forfaits.htm', 'accueil', false);
	//promos[x] = new Array('../images/promos/certificat_cadeau.jpg', 'GREAT GIFTS IDEA', 'Offer to the love one<br>a Spa Villegia gift certicate', '', 'pages-eg/tarifs_forfaits.htm#forfaitsSante', 'accueil;spa', false);
	//promos[x] = new Array('../images/promos/plein_air-ete.jpg', 'THE OUTDOOR AT<br>MANOIR ST-CASTIN', 'Free activities with<br>all lodging packages', 'Bike, pedal boat,<br>canoe, kayak, surfbike<br>and much more!', '', 'plan;accueil;activites;certificatCadeau;condos;contact;gastronomie;hebergement;localisation;mariagesReceptions;offresSpeciales;reunions;spa;tarifsForfaits;reservations', false);
	//promos[x] = new Array('../images/promos/forfait_vitalite.jpg', 'REVITALIZING PACKAGE', '', '', 'pages-eg/offres_speciales.htm#forfaitRevitalisant', 'plan;activites;certificatCadeau;condos;contact;gastronomie;hebergement;localisation;mariagesReceptions;reunions;spa;tarifsForfaits;reservations', false);
	//promos[x] = new Array('../images-eg/promos/coupon_20.gif', '$20 REBATE PER NIGHT', '', '', 'pages-eg/offres_speciales.htm', 'plan;accueil;activites;certificatCadeau;condos;contact;gastronomie;hebergement;localisation;mariagesReceptions;reunions;spa;tarifsForfaits;reservations', false);
	//promos[x] = new Array('../images/promos/certificat_detente.jpg', 'GREAT GIFTS IDEA', 'Offer to the love one<br>a Spa Villegia gift certicate', '', 'pages-eg/spa.htm', 'accueil', false);
	//promos[x] = new Array('../images/promos/st-valentin.jpg', 'VALENTINE\'S<br>DAY SPECIAL', 'Chocolat Balneotherapy<br>for couples and 60 minutes<br>massage', '', 'pages-eg/offres_speciales.htm#specialAmoureux', 'plan;activites;certificatCadeau;condos;contact;gastronomie;hebergement;localisation;mariagesReceptions;reunions;spa;tarifsForfaits;reservations', false);
	//promos[x] = new Array('../images/promos/neige_stcastin.jpg', 'MANOIR ST-CASTIN<br>UNCOVER IT\'S<br>WINTER COAT', '15 cm of new snow', '', '', 'accueil', false);
	//promos[x] = new Array('../images-eg/promos/temps_fetes.gif', 'MANOIR ST-CASTIN', 'offers special packages<br>for your greater pleasure', '', '../../promovillegia/mailing_112806/index-eg.htm', 'plan;activites;certificatCadeau;condos;contact;gastronomie;hebergement;localisation;mariagesReceptions;offresSpeciales;reunions;spa;tarifsForfaits', true);
	//promos[x] = new Array('../images/promos/nostalgie_automne.jpg', 'AUTUM SPECIAL', 'Nostalgic Autum Package', '', 'pages-eg/offres_speciales.htm', 'plan;activites;certificatCadeau;condos;contact;gastronomie;hebergement;localisation;mariagesReceptions;reunions;spa;tarifsForfaits', false);
	//promos[x] = new Array('', 'GIFT CERTIFICATE', 'To congratulate an<br>employee, give a treat<br>to an affectionate person,<br>think to give a H&ocirc;tels<br>Villegia gift certificate.', '', 'pages-eg/certificat_cadeau.php?lang=eg', 'tarifsForfaits', false);
	//promos[x] = new Array('../images/promos/hebergement.jpg', 'ROOMS ENTIRELY<br>REVAMPED', 'providing you with a view<br>on the mountain or lake.<br>Comfort and style.', '', 'pages-eg/heb_intro.htm', 'gastronomie;spa', false);
	//promos[x] = new Array('../images/promos/gastronomie.jpg', 'TO APPETIZE YOU,', 'our chef leads you through a<br>gastronomic tour of Quebec\'s<br>fine countryside cuisine.<br>A pleasure for the senses.', '', 'pages-eg/gas_intro.htm', 'reunions;mariagesReceptions;condos', false);
	//promos[x] = new Array('', 'NEW<br>DECEMBER 2005<br>PAVILLON ST-CASTIN', 'A dozen of all-equipped<br>condo style units will be<br>added to our 105 rooms<br>&amp; suites.', 'This complex is contiguous to the hotel. Eye filling view on the mountain. Bedoom, living room, kitchen, complete bathroom, natural fireplace.', 'pages-eg/condos.htm', 'hebergement', false);
	//promos[x] = new Array('../images-eg/promos/coupon_50.jpg', '$50 REBATE ON TWO<br>NIGHTS STAY OR MORE', '', '', 'pages-eg/offres_speciales.htm', 'plan;accueil;activites;certificatCadeau;condos;contact;gastronomie;hebergement;localisation;mariagesReceptions;reunions;spa;tarifsForfaits', false);
	//promos[x] = new Array('../images/promos/forfait_vitalite.jpg', 'HEALTH &amp; VITALITY<br>PACKAGE', 'When all the nodes of the<br>body are untied, then, even<br>here, in this human life, the<br>mortal becomes immortal.<br>It is the supreme teaching.', '', 'pages-eg/offres_speciales.htm', 'plan;activites;certificatCadeau;condos;contact;gastronomie;hebergement;localisation;mariagesReceptions;reunions;spa;tarifsForfaits', false);
	//promos[x] = new Array('../images/promos/promotions_printemps.jpg', 'SPRING 2006<br>PROMOTIONS', 'Stopover Package<br>at St-Castin &amp; Spring<br>Awakening Package', '', 'pages-eg/offres_speciales.htm', 'plan;activites;certificatCadeau;condos;contact;gastronomie;hebergement;localisation;mariagesReceptions;reunions;spa;tarifsForfaits', false);
	//promos[x] = new Array('../images/promos/anneau_glace.jpg', 'WARM UP YOUR LEGS', 'on a 3-km outdoor rink.<br>Opening expected by mid<br>December, facing the hotel.', '', 'pages-eg/act_place-region.htm', 'activites', false);
	//promos[x] = new Array('../images-eg/promos/forfait_relache.gif', 'FAMILY SCHOOL BREAK', '', 'Starting at 226$ per<br>night/family (2 adults -<br>2 children). Taxes extra.', 'pages-eg/offres_speciales.htm', 'accueil', false);


	var separateur = false;

	for (i=0 ; i < promos.length ; i++)
	{
		var tabTemp = promos[i];
		var tabTemp2 = tabTemp[5].split(';');

		for (j=0 ; j < tabTemp2.length ; j++)
		{
			if (tabTemp2[j] == section || tabTemp2[j] == sousSection)
			{				
				// Il s'agit de la première promo dans la bande beige
				if (separateur == false)
				{
					// On ouvre la table
					document.write ('<table width="198" border="0" cellpadding="5" cellspacing="0">');					
				
					// Si la première promo n'a pas de photo
					if (tabTemp[0] == '')
					{
						document.write ('<tr>');					
						document.write ('<td><img src="../../images/communs/spacer.gif" height="5" width"1"></td>');					
						document.write ('</tr>');						
					}
				}
				// Sinon on écrit un séparateur entre les promos
				else
				{
					document.write ('<tr>');					
					document.write ('<td><img src="../../images/communs/separateur_promos.gif"></td>');					
					document.write ('</tr>');					
				}

				// Si la promo a une photo
				if (tabTemp[0] != '')
				{
					document.write ('<tr>');					
					// Si la promo a un lien
					if (tabTemp[4] != '')
					{
						if (tabTemp[6]) document.write ('<td><a href="' + tabTemp[4] + '" target="_blank"><img src="' + tabTemp[0] + '" border="0"></a></td>');					
						else document.write ('<td><a href="' + serverPath + tabTemp[4] + '"><img src="' + tabTemp[0] + '" border="0"></a></td>');
					}
					else
					{
						document.write ('<td><img src="' + tabTemp[0] + '"></td>');	
					}
					document.write ('</tr>');						
				}

				document.write ('<tr>');					
				document.write ('<td>');					

				// Titre et sous-titre de la promo
				// Si la promo a une photo
				if (tabTemp[0] != '') document.write ('<p class="titrePromo" style="margin-top:10px; margin-left:10px; margin-right:10px; margin-bottom:0px;">' + tabTemp[1] + '<br><b class="sousTitrePromo">' + tabTemp[2] + '</b></p>');
				// Sinon
				else document.write ('<p class="titrePromo" style="margin-left:10px; margin-right:10px; margin-bottom:0px;">' + tabTemp[1] + '<br><b class="sousTitrePromo">' + tabTemp[2] + '</b></p>');

				// Texte de la promo
				document.write ('<p style="margin-top:15px; margin-left:10px; margin-right:10px; margin-bottom:0px;">' + tabTemp[3] + '</p>');

				// Si la promo a un lien
				if (tabTemp[4] != '')
				{
					if (tabTemp[6]) document.write ('<p style="margin-top:15px; margin-left:10px; margin-right:10px; margin-bottom:0px;"><a class="lienPromo" href="' + tabTemp[4] + '" target="_blank">For more information (+)</a></p>');
					else document.write ('<p style="margin-top:15px; margin-left:10px; margin-right:10px; margin-bottom:0px;"><a class="lienPromo" href="' + serverPath + tabTemp[4] + '">For more information (+)</a></p>');
				}

				document.write ('</td>');						
				document.write ('</tr>');						

				separateur = true;
				break;
			}		
		}
	}

	// S'il y a eu au moins une promo, on ferme la table
	if (separateur == true) document.write ('</table>');
	else
	{
		document.write ('<table width="198" border="0" cellpadding="5" cellspacing="0">');					
		document.write ('<tr>');					
		document.write ('<td><img src="../../images/communs/spacer.gif" height="5" width"1"></td>');					
		document.write ('</tr>');						
		document.write ('</table>');		
	}
}