<!-- // un bon script est toujours en commentaire

var photos = new Array;

photos[ 0]=['0', 'FondEcran (00b).JPG','1369','1024',   '128','96', 'Le superbe château de Pierrefonds en hiver.'];
photos[ 1]=['1', 'FondEcran (01b).JPG','1280','957',    '128','96', 'Château de Saint Germain en Laye.'];
photos[ 2]=['2', 'FondEcran (02b).JPG','1280','957',    '128','96', 'Parc et château de Rambouillet.'];
photos[ 3]=['3', 'FondEcran (03b).JPG','1280','957',    '128','96', 'Le superbe château de Pierrefonds en hiver.'];
photos[ 4]=['4', 'FondEcran (04b).JPG','1280','957',    '128','96', 'Notre Dame de Paris.'];
photos[ 5]=['5', 'FondEcran (05b).JPG','1280','957',    '128','96', 'Le superbe château de Pierrefonds en hiver.'];
photos[ 6]=['6', 'FondEcran (06b).JPG','1280','957',    '128','96', 'Notre Dame de Paris.'];
photos[ 7]=['7', 'FondEcran (07b).JPG','1280','957',    '128','96', 'Mont Saint Michel au printemps.'];
photos[ 8]=['8', 'FondEcran (08b).JPG','1280','957',    '128','96', 'Notre Dame de Paris.'];
photos[ 9]=['9', 'FondEcran (09b).JPG','1280','957',    '128','96', 'Mont Saint Michel au printemps.'];
photos[10]=['10','FondEcran (10b).JPG','1280','957',    '128','96', 'Mont Saint Michel au printemps.'];
photos[11]=['11','FondEcran (11b).JPG','1280','957',    '128','96', 'Magnifique Hôtel de Ville de Compiègne.'];
photos[12]=['12','FondEcran (12b).JPG','1280','957',    '128','96', 'Bassin du parc du château de Chantilly.'];
photos[13]=['13','FondEcran (13b).JPG','1280','957',    '128','96', 'Mont Saint Michel resplandissant sous un ciel bleu d\'avril.'];
photos[14]=['14','FondEcran (14b).JPG','1280','957',    '128','96', 'Escalier du château de Fontainebleau.'];
photos[15]=['15','FondEcran (15b).JPG','1280','957',    '128','96', 'Allée du parc du château de Fontainebleau.'];
photos[16]=['16','FondEcran (16b).JPG','1280','957',    '128','96', 'Notre Dame de Paris.'];
photos[17]=['17','FondEcran (17b).JPG','1280','957',    '128','96', 'L\'Atomium propre perdu dans un ciel bruxellois.'];
photos[18]=['18','FondEcran (18b).JPG','1280','957',    '128','96', 'L\'Atomium propre sous le ciel gris de Bruxelles.'];
photos[19]=['19','FondEcran (19b).JPG','1280','851',    '128','85', 'Lumière du parc Angrignon, Montréal, en octobre 2009.'];
photos[20]=['20','FondEcran (20b).JPG','1280','851',    '128','85', 'Moret sur Loing, un jour un peu gris de 2009.'];
photos[21]=['21','FondEcran (21b).JPG','1280','851',    '128','85', 'Bord de Seine à Seine-Port.'];
photos[22]=['22','FondEcran (22b).JPG','1280','851',    '128','85', 'Extrait de la forêt de Fontainebleau.'];
photos[23]=['23','FondEcran (23b).JPG','1280','851',    '128','85', 'Bord de Seine à Seine-Port.'];
photos[24]=['24','FondEcran (24b).JPG','1280','851',    '128','85', 'Château de Vaulx le Vicomte sous un ciel gris de Février 2009.'];
photos[25]=['25','FondEcran (25b).JPG','1280','851',    '128','85', 'Moret sur Loing, un jour un peu gris de 2009.'];
photos[26]=['26','FondEcran (26b).JPG','1280','851',    '128','85', 'Cours d\'eau à Avilly Saint Léonard.'];
photos[27]=['27','FondEcran (27b).JPG','1280','851',    '128','85', 'La Ducati, cachée près de Fitou, entre Narbonne et Perpignan.'];
photos[28]=['28','FondEcran (28b).JPG','1280','851',    '128','85', 'Le viaduc de Millau.'];
photos[29]=['29','FondEcran (29b).JPG','1280','957',    '128','96', 'Chantilly au printemps.'];
photos[30]=['30','FondEcran (30b).JPG','1280','957',    '128','96', 'La grande roue de Londres vue de Saint James Park.'];
photos[31]=['31','FondEcran (31b).JPG','1280','957',    '128','96', 'Ciel londonnien.'];
photos[32]=['32','FondEcran (32b).JPG','1280','957',    '128','96', 'Ciel en feu au couché de soleil dans la Somme.'];
photos[33]=['33','FondEcran (33b).JPG','1280','957',    '128','96', 'Eglise abbevilloise sous un double arc en ciel.'];
photos[34]=['34','FondEcran (34b).JPG','1280','957',    '128','96', 'Cours d\'eau en banlieue ouest de Londres.'];
photos[35]=['35','FondEcran (35b).JPG','1280','957',    '128','96', 'Chute apprivoisée londonnienne.'];
photos[36]=['36','FondEcran (36b).JPG','1280','957',    '128','96', 'Eglise de Saint Leu d\'Esserent.'];
photos[37]=['37','FondEcran (37b).JPG','1280','957',    '128','96', 'Mare languedocienne au couchant.'];
photos[38]=['38','FondEcran (38b).JPG','1280','957',    '128','96', 'Basilique de Saint Denis.'];
photos[39]=['39','FondEcran (39b).JPG','1280','957',    '128','96', 'Basilique de Saint Denis.'];
photos[40]=['40','FondEcran (40b).JPG','1280','957',    '128','96', 'Basilique de Saint Denis.'];
photos[41]=['41','FondEcran (41b).JPG','1280','957',    '128','96', 'Trois billots troués.'];
photos[42]=['42','FondEcran (42b).JPG','1280','957',    '128','96', 'Petit port de pêche breton sous un ciel de mai 2007.'];
photos[43]=['43','FondEcran (43b).JPG','1280','957',    '128','96', 'Déchiquetage de côte bretonne en mai 2007.'];
photos[44]=['44','FondEcran (44b).JPG','1280','957',    '128','96', 'Grise côte bretonne en mai 2007.'];
photos[45]=['45','FondEcran (45b).JPG','1280','957',    '128','96', 'Petite pommeraie bretonne un matin gorgé du soleil de mai 2007.'];
photos[46]=['46','FondEcran (46b).JPG','1280','957',    '128','96', 'Cloître à Belém, Lisbonne.'];
photos[47]=['47','FondEcran (47b).JPG','1280','957',    '128','96', 'Cloître à Belém, Lisbonne.'];
photos[48]=['48','FondEcran (48b).JPG','1280','957',    '128','96', 'Cloître à Belém, Lisbonne.'];
photos[49]=['49','FondEcran (49b).JPG','1280','957',    '128','96', 'Ciel Portugais.'];
photos[50]=['50','FondEcran (50b).JPG','1280','957',    '128','96', 'Tour de Belém à Lisbonne.'];
photos[51]=['51','FondEcran (51b).JPG','1280','957',    '128','96', 'Pont du 25 avril à Lisbonne'];
photos[52]=['52','FondEcran (52b).JPG','1280','957',    '128','96', 'Jeux d\'eux à coté du village olympique de Lisbonne.'];
photos[53]=['53','FondEcran (53b).JPG','1280','957',    '128','96', 'Jeux d\'eux à coté du village olympique de Lisbonne.'];
photos[54]=['54','FondEcran (54b).JPG','1280','957',    '128','96', 'Palais de Sintra.'];
photos[55]=['55','FondEcran (55b).JPG','1280','957',    '128','96', 'Parc du Jardin d\'Acclimatation à Sintra.'];
photos[56]=['56','FondEcran (56b).JPG','1280','957',    '128','96', 'Parc du Jardin d\'Acclimatation à Sintra.'];
photos[57]=['57','FondEcran (57b).JPG','1280','957',    '128','96', 'Parc du Jardin d\'Acclimatation à Sintra.'];
photos[58]=['58','FondEcran (58b).JPG','1280','957',    '128','96', 'Vieux château à Sintra au Portugal.'];
photos[59]=['59','FondEcran (59b).JPG','1280','957',    '128','96', 'Vieux château à Sintra au Portugal.'];
photos[60]=['60','FondEcran (60b).JPG','1208','904',    '128','96', 'Vieux château à Sintra au Portugal.'];
photos[61]=['61','FondEcran (61b).JPG','1280','957',    '128','96', 'Vieux château à Sintra au Portugal.'];
photos[62]=['62','FondEcran (62b).JPG','1280','957',    '128','96', 'Plage Portugaise en juin.'];
photos[63]=['63','FondEcran (63b).JPG','1280','957',    '128','96', 'Fontaine rafraichissante à Lisbonne.'];
photos[64]=['64','FondEcran (64b).JPG','1280','957',    '128','96', 'Eglise de la Trinité à Paris.'];
photos[65]=['65','FondEcran (65b).jpg','1280','957',    '128','96', 'En Ducati, c\'est bon la vie.'];
photos[66]=['66','FondEcran (66b).jpg','1280','957',    '128','96', 'Ruine auvergnate.'];
photos[67]=['67','FondEcran (67b).jpg','1280','957',    '128','96', 'Château perdu en Auvergne.'];
photos[68]=['68','FondEcran (68b).JPG','1280','957',    '128','96', 'Campagne auvergnate en avril 2008.'];
photos[69]=['69','FondEcran (69b).JPG','1280','957',    '128','96', 'Campagne auvergnate en avril 2008.'];
photos[70]=['70','FondEcran (70b).JPG','1280','957',    '128','96', 'Sacré Coeur.'];
photos[71]=['71','FondEcran (71b).JPG','1280','957',    '128','96', 'Rue Foyaltier en plein nétoyage, à coté du Sacré Coeur.'];
photos[72]=['72','FondEcran (72b).JPG','1280','957',    '128','96', 'Eglise Saint Eustache.'];
photos[73]=['73','FondEcran (73b).JPG','1369','1024',   '128','96', 'Tour Saint Jacques.'];
photos[74]=['74','FondEcran (74b).JPG','1280','957',    '128','96', 'Notre Dame de Paris.'];
photos[75]=['75','FondEcran (75b).JPG','1280','957',    '128','96', 'Rose rose en bordure de cloître perdu dans Paris.'];
photos[76]=['76','FondEcran (76b).JPG','1280','957',    '128','96', 'Le musée du Louvre vu de l\'autre coté de la Seine.'];
photos[77]=['77','FondEcran (77b).JPG','1280','957',    '128','96', 'La pyramide du Louvre.'];
photos[78]=['78','FondEcran (78b).JPG','1280','957',    '128','96', 'Campagne normande au petit matin en octobre 2008.'];
photos[79]=['79','FondEcran (79b).JPG','1280','957',    '128','96', 'Campagne normande au petit matin en octobre 2008.'];
photos[80]=['80','FondEcran (80b).JPG','1280','957',    '128','96', 'Côtes normande en octobre 2008.'];
photos[81]=['81','FondEcran (81b).JPG','1280','957',    '128','96', 'Côtes normande en octobre 2008.'];
photos[82]=['82','FondEcran (82b).JPG','1280','957',    '128','96', 'Côtes normande en octobre 2008.'];
photos[83]=['83','FondEcran (83b).JPG','1280','957',    '128','96', 'Côtes normande en octobre 2008.'];
photos[84]=['84','FondEcran (84b).JPG','1280','957',    '128','96', 'Rocamadour en Mai 2009'];
photos[85]=['85','FondEcran (85b).JPG','1280','957',    '128','96', 'Maison mondiaalement connue prise entre deux rochers.'];
photos[86]=['86','FondEcran (86b).JPG','1280','957',    '128','96', 'Extrait de côte bretonne par temps gris en mai 2007.'];
photos[87]=['87','FondEcran (87b).JPG','1280','957',    '128','96', 'Bizarrerie bretonne en Mai 2007'];
photos[88]=['88','FondEcran (88b).JPG','1280','957',    '128','96', 'Mont Saint Michel par temps pluvieux en Mai 2007'];
photos[89]=['89','FondEcran (89b).JPG','1280','957',    '128','96', 'Extrait de côte bretonne sur mer légèrement agitée en mai 2007.'];
photos[90]=['90','FondEcran (90b).jpg','1280','957',    '128','96', 'Mobilier de jardin taillé dans un tron de chêne, Ikéa a des progrés à faire pour atteindre cette solidité là.'];
photos[91]=['91','FondEcran (91b).jpg','1280','957',    '128','96', 'Ruine de château auvergnat prise au détour d\'une route magnifique en mai 2008.'];
photos[92]=['92','FondEcran (92b).JPG','1280','957',    '128','96', 'Orage sur Lisbonne vu de Almada, un soir de juin 2008.'];
photos[93]=['93','FondEcran (93b).JPG','1280','957',    '128','96', 'Le Saint Laurent gelé et Québec vue de l\'embarcadaire du traversier à Levi en février 2008.'];
photos[94]=['94','FondEcran (94b).JPG','1280','957',    '128','96', 'Paysage hivernale dans la région de Québec. Photo prise lors d\'une ballade en moto neige en février 2008.'];
photos[95]=['95','FondEcran (95b).JPG','1280','957',    '128','96', 'Paysage hivernale dans la région de Québec. Photo prise lors d\'une ballade en moto neige en février 2008.'];
photos[96]=['96','FondEcran (96b).JPG','1280','957',    '128','96', 'Paysage hivernale dans la région de Québec. Photo prise lors d\'une ballade en moto neige en février 2008.'];
photos[97]=['97','FondEcran (97b).JPG','1280','957',    '128','96', 'Paysage hivernale dans la région de Québec. Photo prise lors d\'une ballade en moto neige en février 2008.'];
photos[98]=['98','FondEcran (98b).JPG','1369','1024',   '128','96', 'Paysage hivernale dans la région de Québec. Photo prise lors d\'une ballade en moto neige en février 2008.'];
photos[99]=['99','FondEcran (99b).JPG','1280','957',    '128','96', 'Lanterne indiquant le chemin du shack, la cabane au Canada tapie au fond des bois.'];
photos[100]=['100','20080423.jpg','1281','959',         '128','96', 'Pont Eiffel en Auvergne.'];
photos[101]=['101','20100426.jpg','1312','872',         '128','96', 'Moi je veux bien surveiller les enfants, mais à l\'ombre alors.'];
photos[102]=['102','20051111.jpg','1258','942',         '128','96', 'Petite vigneraie dans la Drôme en novembre 2005.'];
photos[103]=['103','20001216.jpg','1520','1019',        '128','96', 'Le Pays de Galles en décembre 2000.'];
photos[104]=['104','20030301.jpg','1260','840',         '128','96', 'De la poussière tu es venue, à la poussière tu retourneras.'];
photos[105]=['105','20030302.jpg','1260','840',         '128','96', 'Château de Lucie, la célèbre fantome auvergnate.'];
photos[106]=['106','20051025.jpg','1331','998',         '128','96', 'La fontaine du Vaucluse en octobre 2005'];
photos[107]=['107','20001216b.jpg','1008','1520',       '96','128', 'Le Pays de Galles en décembre 2000.'];
photos[108]=['108','20031001.jpg','1306','870',         '128','96', 'Le village de Robin Hood (Yorkshire, Angleterre) en octobre 2003.'];
photos[109]=['109','20071006.jpg','1304','976',         '128','96', 'Apprenti explorateur, octobre 2007.'];
photos[110]=['110','20100430.jpg','1293','860',         '128','96', 'Accident de la nature en Provence, avril 2010.'];
photos[111]=['111','20100530.jpg','1293','860',         '128','96', 'Combat de rue à Montréal, mai 2010.'];
photos[112]=['112','20100520.jpg','1293','860',         '128','96', 'Pris dans le marbre, mai 2010.'];
photos[113]=['113','Lisboa_050.jpg','2419','709',       '128','45', 'Lisbonne, juin 2007.'];
photos[114]=['114','20070619.jpg','1327','993',         '128','96', 'Lisbonne, juin 2007.'];
photos[115]=['115','20060312.jpg','935','1250',         '96','128', 'Ski, février 2006.'];
photos[116]=['116','20060827.jpg','935','1250',         '96','128', 'Recyclage, ao&ucirc;t 2007.'];
photos[117]=['117','20030301b.jpg','1350','900',        '128','96', 'Lac Auvergnat, mars 2003.'];
photos[118]=['118','DSCN0669.jpg','1350','1010',        '128','96', 'La méditerranée à coté de Marseille, mai 2005.'];
photos[119]=['119','002Liege.jpg','1350','1010',        '128','96', 'Liège, avril 2006.'];
photos[120]=['120','IMG_0231.jpg','1350','1013',        '128','96', 'Bretagne, mai 2007.'];
photos[121]=['121','20050702_0066.jpg','1010','1350',   '96', '128','Feu de la Saint Jean, juillet 2007.'];
photos[122]=['122','DSCN0206.jpg','1350','1010',        '128','96', 'L\'Iles sur la Sorgues, novembre 2005.'];
photos[123]=['123','Quebec2008_0175.jpg','1350','1010', '128','96', 'Québec, février 2008.'];
photos[124]=['124','028_24A.jpg','1350','903',          '128','86', 'Sévennes, mars 2001.'];
photos[125]=['125','20091014_Paris.jpg','1350','1010',  '128','96', 'Montmartre, Paris, octobre 2008.'];
photos[126]=['126','20081219.jpg','1350','898',         '128','85', 'Ma première voiture, décembre 2008.'];
photos[127]=['127','033_Paris_050325.jpg','1350','1010','128','96', 'Les ponts de Paris, mars 2005.'];
photos[128]=['128','20090103_0059.jpg','1350','898',    '128','85', 'Savigny le Temple, janvier 2009.'];
photos[129]=['129','20060123.jpg','1350','1013',        '128','96', 'Savigny le Temple, janvier 2006.'];
photos[130]=['130','20100430_c.jpg','898','1350',       '85','128', 'Un motard heureux, avril 2010.'];
photos[131]=['131','20080518_2618.jpg','1013','1350',   '96','128', 'Un piano malheureux, mai 2008.'];
photos[132]=['132','200012 Pays de Galles 0031.jpg','1350','900',    '128','85', 'Petite église au Pays de Galles, décembre 2000.'];
photos[133]=['133','037 Mont Saint Michel.jpg','1350','1010','128','96', 'Mont Saint Michel, avril 2006.'];
photos[134]=['134','20090720_0005.jpg','1350','898',	'128','85', 'Chantilly un soir de juillet 2009.'];
photos[135]=['135','20100828_059.jpg','1350','898',		'128','85', 'Montréal, Vieux Port, août 2010.'];
photos[136]=['136','20090904_0059.jpg','1350','898',	'128','85', 'Montréal, septembre 2009.'];
photos[137]=['137','20090909_0004.jpg','1350','898',	'128','85', 'Minette, septembre 2009.'];
photos[138]=['138','20030301_0022.jpg','900','1350',	'85','128', 'Auvergne, mars 2003.'];
photos[139]=['139','200012_PaysGalles_16.jpg','1350','905',	'128','86', 'Promenade au Pays de Galle, décembre 2001.'];
photos[140]=['140','IMG_1720.jpg','1350','1013',		'128','96', 'Grande roue parisienne, décembre 2008.'];
photos[141]=['141','DSCN6466.jpg','1010','1350',		'96','128', 'Grande roue parisienne, décembre 2008.'];
photos[142]=['142','20090720_0007.jpg','1350','898',	'128','85', '.'];
photos[143]=['143','20101022_006.jpg','1350','898',		'128','85', '.'];
photos[144]=['144','DSCN5540.jpg','1350','1013',		'128','96', 'Vadrouille en Auvergne en avril 2008'];
photos[145]=['145','20101022_128.jpg','1350','898',		'128','85', 'Montréal, vue de la tour penchée du Stade Olympique, octobre 2010'];
photos[146]=['146','20101022_152.jpg','1350','898',		'128','85', 'Montréal, vue de la tour penchée du Stade Olympique, octobre 2010'];
photos[147]=['147','20101219_04.jpg','1063','1600',		'85','128', 'Montréal, sous la neige, de nuit, décembre 2010'];
photos[148]=['148','20101209_0018.jpg','1600','1063',	'128','85', 'Montréal, de nuit, vue du haut, décembre 2010'];
photos[149]=['149','20101212_12.jpg','1600','1063',		'128','85', 'Montréal, sous la neige, décembre 2010'];
photos[150]=['150','20101219_25.jpg','1063','1600',		'85','128', 'Montréal, sous la neige, décembre 2010'];
photos[151]=['151','20110116_b_088.jpg','1600','1063',	'128','85', 'Montréal, cymetière sous la neige, janvier 2011'];
photos[152]=['152','20110116_019.jpg','1600','1063',	'128','85', 'Montréal, cymetière sous la neige, janvier 2011'];
photos[153]=['153','20101022_045.jpg','1600','1063',	'128','85', ''];
photos[154]=['154','20101022_066.jpg','1600','1063',	'128','85', ''];
photos[155]=['155','20101101_04.jpg','1600','1063',		'128','85', ''];
photos[156]=['156','20101107_17.jpg','1063','1600',		'85','128', ''];
photos[157]=['157','20101107_28.jpg','1600','1063',		'128','85', ''];
photos[158]=['158','20101110_062.jpg','1600','1063',	'128','85', ''];
photos[159]=['159','20101110_105.jpg','1600','1063',	'128','85', ''];
photos[160]=['160','20101111_23.jpg','1063','1600',		'85','128', ''];
photos[161]=['161','20101209_31.jpg','1600','1063',		'128','85', ''];
photos[162]=['162','20101110_012.jpg','1600','1063',	'128','85', ''];
photos[163]=['153','20101219_05.jpg','1600','1063',		'128','85', ''];

var strSearch  = window.location.search;
var indCurrent = window.location.search.indexOf('=');
var lgtCurrent = window.location.search.length;

var docWidth   = 0;
var docHeight  = 0;
var imgWidth   = 0;
var imgHeight  = 0;
var coeffImage = 1;
var imgTargetW = 0;
var imgTargetH = 0;
var imgRealW   = 0;
var imgRealH   = 0;

//var strCurrent = '1';
var intCurrent = 1;
var indPrev    = 0;
var indNext    = 0;

/*** Determination de la photo a afficher dans le tableau "photos" */
if ( indCurrent != -1 ) {
	intCurrent = parseInt(strSearch.substring((indCurrent +1), lgtCurrent));
} else {
	intCurrent = parseInt(photos.length);// -1);
}

//intCurrent = strCurrent;
if (intCurrent == 1) {
	indPrev    = parseInt(photos.length);// -1);
	indNext    = 2;
} else if ( intCurrent == parseInt(photos.length) ) {// -1) ) {
	indPrev    = parseInt(photos.length -1);//2);
	indNext    = 1;
} else {
	indPrev    = intCurrent -1;
	indNext    = intCurrent +1;
}
//alert(strSearch+'/'+indCurrent+'/'+lgtCurrent+'/'+strCurrent+'/'+intCurrent+'/'+indPrev+'/'+indNext);

function writeHome() {
	var texte = '';

//	texte = '<table width=\"100%\" align=\"center\"><tr><td width=\"30\" class=\"TxtXPetitCtr\">&nbsp;<a href=\"http://lefoujd.net/">Lefoujd.net<\/a></td>'
	texte = '<table width=\"90%\" align=\"center\">';
	texte += '<tr>';

	// Lien vers la page d'accueil du site
	texte += '<td width=\"125\" class=\"TxtXPetit avide\">&nbsp;<&nbsp;<a class=\"avide\" href=\"http://lefoujd.net/">accueil Lefoujd.net<\/a>&nbsp;>&nbsp;</td>';

	// Liens de navigation sur les photos du jours 
	texte += '<td class=\"TxtXPetitCtr\">&nbsp;</td>';
	
	// Lien vers la page regroupant toutes les miniatures
	texte += '<td width=\"125\" class=\"TxtXPetitLeft\"><&nbsp;<a class=\"avide\" href=\"./index.html">retour&nbsp;à&nbsp;l\'image&nbsp;du&nbsp;jour<\/a>&nbsp;>&nbsp;</td></tr></table>';
	document.write(texte);
}

function writeNextPrev() {
	// entete de photo
	var texte = '';

//	texte = '<table width=\"100%\" align=\"center\"><tr><td width=\"30\" class=\"TxtXPetitCtr\">&nbsp;<a href=\"http://lefoujd.net/">Lefoujd.net<\/a></td>'
	texte = '<table width=\"90%\" align=\"center\">';
	texte += '<tr>';

	// Lien vers la page d'accueil du site
	texte += '<td width=\"125\" class=\"TxtXPetit avide\">&nbsp;<&nbsp;<a class=\"avide\" href=\"http://lefoujd.net/">accueil Lefoujd.net<\/a>&nbsp;>&nbsp;</td>';

	// Liens de navigation sur les photos du jours 
	texte += '<td class=\"TxtXPetitCtr\">';
	if ( intCurrent == 1) {
		texte += '<&nbsp;premier&nbsp;|&nbsp;précédent&nbsp;|';
	} else if (intCurrent == (photos.length)) {
		texte += '<&nbsp;<a class=\"avide\" href=\"./index.html?img=1\">premier<\/a>&nbsp;|&nbsp;<a class=\"avide\" href=\"./index.html?img='+indPrev+'\">précédent<\/a>&nbsp;|';
	} else {
		texte += '<&nbsp;<a class=\"avide\" href=\"./index.html?img=1\">premier<\/a>&nbsp;|&nbsp;<a class=\"avide\" href=\"./index.html?img='+indPrev+'\">précédent<\/a>&nbsp;|';
	}
	texte += '&nbsp;<a class=\"avide\" href="\./images/'+photos[intCurrent-1][1]+'\" target=\"_blank\">ouvrir l\'image dans une autre fenêtre<\/a>&nbsp;';
	if ( intCurrent == 1) {
		texte += '|&nbsp;<a class=\"avide\" href=\"./index.html?img='+indNext+'\">suivant<\/a>&nbsp;|&nbsp;<a class=\"avide\" href=\"./index.html?img='+(photos.length)+'\">dernier<\/a>&nbsp;>';
	} else if (intCurrent == (photos.length)) {
		texte += '|&nbsp;suivant&nbsp;|&nbsp;dernier&nbsp;>';
	} else {
		texte += '|&nbsp;<a class=\"avide\" href=\"./index.html?img='+indNext+'\">suivant<\/a>&nbsp;|&nbsp;<a class=\"avide\" href=\"./index.html?img='+(photos.length)+'\">dernier<\/a>&nbsp;>';
	}
	texte += '</td>';
	
	// Lien vers la page regroupant toutes les miniatures
	texte += '<td width=\"125\" class=\"TxtXPetitLeft\"><&nbsp;<a class=\"avide\" href=\"./allImages.html">toutes&nbsp;les&nbsp;images<\/a>&nbsp;>&nbsp;</td></tr></table>';
	document.write(texte);
}


function calculTailleImage() {

       docWidth   = document.body.clientWidth;
       docHeight  = document.body.clientHeight;
       imgRealW   = parseInt(photos[intCurrent -1][2]);
       imgRealH   = parseInt(photos[intCurrent -1][3]);
 
       /* Détermination de la taille de l'ecran par rapport à la taille utile du document HTML
          Pour simplifier la chose nous allons dire que si le rapport Largeur / Hauteur est superieur a 1.5,
          on a affaire a un ecran "wide" et donc, on se basera sur la hauteur de l'image pour l'affichage
          sinon, on a un ecran "classique 4:3 et on se basera sur la largeur de l'image
 
          Le rapport de 1.5 est une valeur fixee arbitrairement suite a quelques tests.
              - 16/10 : rapport environ 1.6  - ecran "wide"
              - 16/9  : rapport environ 1.78 - ecran "wide"
              -  4/3  : rapport environ 1.33 - ecran "classique"
 
          Cette méthode permet aussi de résoudre quelques soucis quand les navigateurs ne sont pas en
          plein-ecran et qu'ils sont dimentionnes "bizarrement".
       */
       var ecran    = docWidth / docHeight;
       var bClassic = true;
       var bHoriz   = true;
 
       if ( ecran > 1.5 )         { bClassic = false; }
       if ( imgRealW < imgRealH ) { bHoriz = false; }
 
       /* Maintenant on sait que si l'image est horizontale et que l'ecran est de type classique, on
          se basera sur la largeur de l'image pour ajuster l'affichage, dans tous les autres cas, on
          se basera sur la hauteur de l'image.
       */
 
       if ( bHoriz && bClassic ) {
              coeffImage = ( ( docWidth - 100 ) * 0.9 ) / imgRealW;
       } else {
              coeffImage = ( ( docHeight - 35 ) * 0.9 ) / imgRealH;
              // Derniere verif pour les images en paysage
              if ( (imgRealW * coeffImage) >= docWidth ) {
                     coeffImage = ( ( docWidth - 100 ) * 0.9 ) / imgRealW;
              }
       }
 
       imgWidth  = imgRealW * coeffImage;
       imgHeight = imgRealH * coeffImage;
}

function writePhoto() {

	calculTailleImage();
	writeNextPrev();

	document.write('<table cellspacing=\"20\" align=\"center\" border=\"1\">');
	document.write('<tr>');
	document.write('<td align=\"center\" valign=\"middle\">');
	document.write('<a href=\"./index.html?img='+indPrev+'\"><img src=\"./images/'+photos[intCurrent-1][1]+'"\ height=\"'+imgHeight+'\" width=\"'+imgWidth+'\"><\/a>');
	document.write('</td>');
	document.write('</tr>');
	document.write('</table>');

//	writeLegende();
}

function writePhotoList() {

	var i=0;
	var j=1;
	// chaque colonne fait 168 de large
	// on part sur un tableau qui fait 90% de la taille utile de la fenetre
	var iNbCols=Math.round( ( parseInt( document.body.clientWidth ) * 0.9 ) /168 );

	writeHome();

	document.write('<table cellspacing=\"20\" align=\"center\" border=\"1\">');
	document.write('<tr>');

	for (i=photos.length-1 ; i>=0 ; i-- ) {
		document.write('<td align=\"center\" valign=\"middle\">');
		document.write('<a href=\"./index.html?img='+(i+1)+'\"><img src=\"./thumbs/'+photos[i][1]+'"\ width=\"'+photos[i][4]+'" height=\"'+photos[i][5]+'\"><\/a>');
		document.write('</td>');
		
		if ( ( j % iNbCols ) == 0 ) {
			document.write('</tr>');
			document.write('<tr>');
			j=0;
		}
		j++;
	}
	
	document.write('</tr>');
	document.write('</table>');
}

function writeLegende() {
	// pied de page de photo
	document.write('<p class=\"TxtGrandCtr\">'+photos[intCurrent -1][6]
					+'<br>'+photos[intCurrent -1][0]
					+'<br>'+photos[intCurrent -1][1]
					+'<br>'+photos[intCurrent -1][2]
					+'<br>'+photos[intCurrent -1][3]
					+'<br>'+photos[intCurrent -1][4]
					+'<br>'+photos[intCurrent -1][5]
					+'<br>Doc ('+docWidth+'x'+docHeight+')'
					+'<br>Real ('+imgRealW+'x'+imgRealH+')'
					+'<br>Target ('+imgTargetW+'x'+imgTargetH+')'
					+'<br>Final ('+imgWidth+'x'+imgHeight+')'
					+'<br>Coeff: '+coeffImage+''
/*					+'<br>'+window.location.search
					+'<br>length='+window.location.search.length
					+'<br>lgtCurrent='+lgtCurrent
					+'<br>indCurrent='+indCurrent
					+'<br>strCurrent='+strCurrent
					+'<br>intCurrent='+intCurrent
					+'<br>indNext='+indNext
					+'<br>indPrev='+indPrev
					+'<br>substring='+strSearch.substring((indCurrent +1), lgtCurrent)
*/					+'<\/p>'
					);
}

// fin de script -->
