window.thumbnails = new Object();
												thumbnails[2488168] = new thumbnail(2488168,'158276','','Zege-Church-Door_thumb.jpg',130, 87,5,'photo_2488168.html');
												thumbnails[2488150] = new thumbnail(2488150,'158276','','Lake-Tana-Church-Interior_thumb.jpg',130, 87,5,'photo_2488150.html');
												thumbnails[2456448] = new thumbnail(2456448,'158153','','Tower-and-Church_thumb.jpg',130, 85,5,'photo_2456448.html');
												thumbnails[2457975] = new thumbnail(2457975,'158154','','Cappadocia-Zelve-Valley-Pan_thumb.jpg',130, 87,5,'photo_2457975.html');
												thumbnails[2488060] = new thumbnail(2488060,'158027','','Skellig-Michael-FINAL----Ov_thumb.jpg',130, 101,5,'photo_2488060.html');
												thumbnails[2456314] = new thumbnail(2456314,'158153','','Cross-on-Dome_thumb.jpg',130, 87,5,'photo_2456314.html');
												thumbnails[2457972] = new thumbnail(2457972,'158154','','Cappadocia-Zelve-Valley-Mon_thumb.jpg',130, 86,5,'photo_2457972.html');
												thumbnails[2488067] = new thumbnail(2488067,'158027','','Skellig-Michael-Graves_thumb.jpg',130, 102,5,'photo_2488067.html');
												thumbnails[2488186] = new thumbnail(2488186,'158276','','Zege-Round-Church-w-Icon_thumb.jpg',130, 87,5,'photo_2488186.html');
												thumbnails[2456435] = new thumbnail(2456435,'158153','','St-Paul-Keep_thumb.jpg',130, 87,5,'photo_2456435.html');
												thumbnails[2457969] = new thumbnail(2457969,'158154','','Cappadocia-Mountain-with-Mo_thumb.jpg',130, 85,5,'photo_2457969.html');
												thumbnails[2488037] = new thumbnail(2488037,'158027','','Skellig-Michael-Cross-and-L_thumb.jpg',130, 102,5,'photo_2488037.html');
												thumbnails[2488184] = new thumbnail(2488184,'158276','','Zege-Icon_thumb.jpg',130, 87,5,'photo_2488184.html');
												thumbnails[2456394] = new thumbnail(2456394,'158153','','St-Anthony-Overview-w-Cloud_thumb.jpg',130, 87,5,'photo_2456394.html');
												thumbnails[2457964] = new thumbnail(2457964,'158154','','Cappadocia-Landscape-with-F_thumb.jpg',130, 87,5,'photo_2457964.html');
												thumbnails[2488042] = new thumbnail(2488042,'158027','','Skellig-Michael-FINAL----Be_thumb.jpg',130, 102,5,'photo_2488042.html');
												thumbnails[2488173] = new thumbnail(2488173,'158276','','Zege-Church-Drums-w-Martyr_thumb.jpg',130, 87,5,'photo_2488173.html');
												thumbnails[2488014] = new thumbnail(2488014,'158027','','Jerpoint-Abbey-Tomb-Carving_thumb.jpg',130, 93,5,'photo_2488014.html');
												thumbnails[2488131] = new thumbnail(2488131,'158276','','Geez-Illuminated-Manuscript_thumb.jpg',130, 87,5,'photo_2488131.html');
												thumbnails[7545183] = new thumbnail(7545183,'158153','','CLIKPIC---Detail-of-Shrine-to-Pope-Cyrillos-in-Wadi-Natrun_thumb.jpg',130, 89,5,'photo_7545183.html');
												thumbnails[2456443] = new thumbnail(2456443,'158153','','St-Paul-Overview_thumb.jpg',130, 86,5,'photo_2456443.html');
												thumbnails[2488007] = new thumbnail(2488007,'158027','','Illauntannig-Leacht-and-Cro_thumb.jpg',130, 102,5,'photo_2488007.html');
												thumbnails[2456390] = new thumbnail(2456390,'158153','','St-Anthony-Cave-w-Monks_thumb.jpg',130, 195,5,'photo_2456390.html');
												thumbnails[2456451] = new thumbnail(2456451,'158028','','Kosovo---Muslim-Cemetery-wi_thumb.jpg',130, 87,5,'photo_2456451.html');
												thumbnails[2456506] = new thumbnail(2456506,'158155','','Train-Station-Door_thumb.jpg',130, 175,5,'photo_2456506.html');
												thumbnails[2456510] = new thumbnail(2456510,'158155','','German-Church_thumb.jpg',130, 198,5,'photo_2456510.html');
												thumbnails[2488057] = new thumbnail(2488057,'158027','','CLIKPIC---Skellig-Michael-FINAL----Gr_thumb.jpg',130, 166,5,'photo_2488057.html');
												thumbnails[2488140] = new thumbnail(2488140,'158276','','CLIKPIC---Gondar-Hermit-w-Gospel_thumb.jpg',130, 195,5,'photo_2488140.html');
												thumbnails[7545191] = new thumbnail(7545191,'409099','','CLIKPIC---Portrait-of-Fr-Gregory-at-Jordanville_thumb.jpg',160, 249,5,'photo_7545191.html');
												thumbnails[2456423] = new thumbnail(2456423,'158153','','St-Paul-Baker_thumb.jpg',130, 204,5,'photo_2456423.html');
												thumbnails[2488058] = new thumbnail(2488058,'158027','','CLIKPIC---Skellig-Michael-FINAL----Le_thumb.jpg',130, 164,5,'photo_2488058.html');
												thumbnails[2488145] = new thumbnail(2488145,'158276','','CLIKPIC---Gondar-Monks-Tower_thumb.jpg',130, 195,5,'photo_2488145.html');
												thumbnails[7545186] = new thumbnail(7545186,'158155','','CLIKPIC---Monk-Waling-by-Martyrs-Tomb-at-St-Sava-Monastery-in-West-Bank_thumb.jpg',130, 195,5,'photo_7545186.html');
												thumbnails[2456439] = new thumbnail(2456439,'158153','','St-Paul-Overview-w-Palms_thumb.jpg',130, 195,5,'photo_2456439.html');
												thumbnails[2488025] = new thumbnail(2488025,'158027','','CLIKPIC---Rock-of-Cashel-Cormack-Chap_thumb.jpg',130, 166,5,'photo_2488025.html');
												thumbnails[2488177] = new thumbnail(2488177,'158276','','CLIKPIC---Zege-Church-w-Doors_thumb.jpg',130, 195,5,'photo_2488177.html');
												thumbnails[2456366] = new thumbnail(2456366,'158153','','Monk-w-Icon_thumb.jpg',130, 196,5,'photo_2456366.html');
												thumbnails[2457949] = new thumbnail(2457949,'158154','','Cappadocia-Cave-of-Simon-th_thumb.jpg',130, 86,5,'photo_2457949.html');
												thumbnails[2488018] = new thumbnail(2488018,'158027','','CLIKPIC---Kilmalkader-Church-FINAL-co_thumb.jpg',130, 165,5,'photo_2488018.html');
												thumbnails[2488020] = new thumbnail(2488020,'158027','','CLIKPIC---Monasterboice-Cross-of-Murd_thumb.jpg',130, 164,5,'photo_2488020.html');
												thumbnails[2488000] = new thumbnail(2488000,'158027','','CLIKPIC---Dunmoe-Castle-Graves-in-Chu_thumb.jpg',130, 164,5,'photo_2488000.html');
												thumbnails[2456398] = new thumbnail(2456398,'158153','','St-Catherine-Church-Interio_thumb.jpg',130, 217,5,'photo_2456398.html');
												thumbnails[2456449] = new thumbnail(2456449,'158028','','Kosovo----Sufi-Mosque-Inter_thumb.jpg',130, 88,5,'photo_2456449.html');
												thumbnails[2457927] = new thumbnail(2457927,'158154','','Armenian-Red-Monastery-Chur_thumb.jpg',130, 98,5,'photo_2457927.html');
												thumbnails[2488134] = new thumbnail(2488134,'158276','','CLIKPIC---Gondar-Church-Altar_thumb.jpg',130, 195,5,'photo_2488134.html');
												thumbnails[7545182] = new thumbnail(7545182,'409099','','CLIKPIC---Coptic-Monk-w-Manuscript-in-Window_thumb.jpg',160, 236,5,'photo_7545182.html');
												thumbnails[7545184] = new thumbnail(7545184,'158153','','CLIKPIC---Egyptian-Farm-in-Cafe-in-Upper-Egypt_thumb.jpg',130, 196,5,'photo_7545184.html');
												thumbnails[2456405] = new thumbnail(2456405,'158153','','St-Catherine-Overview_thumb.jpg',130, 190,5,'photo_2456405.html');
												thumbnails[2457924] = new thumbnail(2457924,'158154','','Akdamar-Church-Lake-Van_thumb.jpg',130, 98,5,'photo_2457924.html');
												thumbnails[2488009] = new thumbnail(2488009,'158027','','Inishurray-Cross-with-Wall-_thumb.jpg',130, 103,5,'photo_2488009.html');
												thumbnails[2488105] = new thumbnail(2488105,'158276','','CLIKPIC---Debre-Libanos-Hermit-2_thumb.jpg',130, 195,5,'photo_2488105.html');
												thumbnails[2456361] = new thumbnail(2456361,'158153','','Monk-w-Book-by-Window_thumb.jpg',130, 214,5,'photo_2456361.html');
												thumbnails[2457926] = new thumbnail(2457926,'158154','','Armenian-Church-Lake-Van_thumb.jpg',130, 98,5,'photo_2457926.html');
												thumbnails[2488008] = new thumbnail(2488008,'158027','','Inishmurray-Beehive-FINAL-c_thumb.jpg',130, 103,5,'photo_2488008.html');
												thumbnails[2488096] = new thumbnail(2488096,'158276','','CLIKPIC---Deacon-in-Hut_thumb.jpg',130, 195,5,'photo_2488096.html');
												thumbnails[2456363] = new thumbnail(2456363,'158153','','Monk-w-Cross-and-Gospel_thumb.jpg',130, 202,5,'photo_2456363.html');
												thumbnails[2488129] = new thumbnail(2488129,'158276','','Gabriel-Semantron_thumb.jpg',130, 87,5,'photo_2488129.html');
												thumbnails[2488126] = new thumbnail(2488126,'158276','','Ethiopian-Illuminated-Manus_thumb.jpg',130, 87,5,'photo_2488126.html');
												thumbnails[2456352] = new thumbnail(2456352,'158153','','Monk-on-Bench_thumb.jpg',130, 85,5,'photo_2456352.html');
												thumbnails[2456450] = new thumbnail(2456450,'158028','','Kosovo----Train-Tracks-and-_thumb.jpg',130, 87,5,'photo_2456450.html');
												thumbnails[2456489] = new thumbnail(2456489,'158154','','Cappadocia-Fairy-Chimney-Fr_thumb.jpg',130, 156,5,'photo_2456489.html');
												thumbnails[7545193] = new thumbnail(7545193,'409099','','CLIKPIC---Portrait-of-Fr-Sava-on-Mount-Athos_thumb.jpg',160, 267,5,'photo_7545193.html');
												thumbnails[2456358] = new thumbnail(2456358,'158153','','Monk-Portrait_thumb.jpg',130, 87,5,'photo_2456358.html');
												thumbnails[2457958] = new thumbnail(2457958,'158154','','CLIKPIC---Cappadocia-Hospital-Monaste_thumb.jpg',130, 197,5,'photo_2457958.html');
												thumbnails[2488109] = new thumbnail(2488109,'158276','','Debre-Libanos-Holy-Place_thumb.jpg',130, 87,5,'photo_2488109.html');
												thumbnails[2456350] = new thumbnail(2456350,'158153','','Monk-in-Red-Monastery_thumb.jpg',130, 86,5,'photo_2456350.html');
												thumbnails[2457954] = new thumbnail(2457954,'158154','','CLIKPIC---Cappadocia-Durmas-Church-Wa_thumb.jpg',130, 182,5,'photo_2457954.html');
												thumbnails[2457999] = new thumbnail(2457999,'158154','','CLIKPIC---Sumela-Monastery_thumb.jpg',130, 217,5,'photo_2457999.html');
												thumbnails[2488125] = new thumbnail(2488125,'158276','','Debre-Libanos-Monk_thumb.jpg',130, 87,5,'photo_2488125.html');
												thumbnails[2456369] = new thumbnail(2456369,'158153','','Monk-with-Candles_thumb.jpg',130, 87,5,'photo_2456369.html');
												thumbnails[2488123] = new thumbnail(2488123,'158276','','Debre-Libanos-Monk-Portrait_thumb.jpg',130, 87,5,'photo_2488123.html');
												thumbnails[2456372] = new thumbnail(2456372,'158153','','Sinai-Mountain-Face_thumb.jpg',130, 91,5,'photo_2456372.html');
												thumbnails[2456454] = new thumbnail(2456454,'158028','','Prizren-Hammam-Rear-Exterio_thumb.jpg',130, 195,5,'photo_2456454.html');
												thumbnails[2488005] = new thumbnail(2488005,'158027','','CLIKPIC---Glendalough-Church-and-Tower1_thumb.jpg',130, 102,5,'photo_2488005.html');
												thumbnails[2456385] = new thumbnail(2456385,'158153','','St-Anthony-Cave-Above_thumb.jpg',130, 92,5,'photo_2456385.html');
												thumbnails[2488001] = new thumbnail(2488001,'158027','','CLIKPIC---Gallarus-Oratory1_thumb.jpg',130, 102,5,'photo_2488001.html');
												thumbnails[2488100] = new thumbnail(2488100,'158276','','Deacon-Reading-by-Hut_thumb.jpg',130, 87,5,'photo_2488100.html');
												thumbnails[2456383] = new thumbnail(2456383,'158153','','Sohag-Dome_thumb.jpg',130, 87,5,'photo_2456383.html');
												thumbnails[2488002] = new thumbnail(2488002,'158027','','Giants-Causeway-Wood-and-St_thumb.jpg',130, 102,5,'photo_2488002.html');
												thumbnails[2488095] = new thumbnail(2488095,'158276','','CLIKPIC---Deacon-Drying-Bread_thumb.jpg',130, 195,5,'photo_2488095.html');
												thumbnails[2456417] = new thumbnail(2456417,'158153','','St-Paul-Baker-and-Boy1_thumb.jpg',130, 84,5,'photo_2456417.html');
												thumbnails[2488073] = new thumbnail(2488073,'158027','','Slievemore-Wall-and-House-F_thumb.jpg',130, 102,5,'photo_2488073.html');
												thumbnails[2456445] = new thumbnail(2456445,'158153','','Stairway_thumb.jpg',130, 86,5,'photo_2456445.html');
												thumbnails[2488152] = new thumbnail(2488152,'158276','','CLIKPIC---Lalibela-Bridge_thumb.jpg',130, 195,5,'photo_2488152.html');
												thumbnails[7573189] = new thumbnail(7573189,'158028','','CLIKPIC---Decani-Monastery-Tower-w-Crosses_thumb.jpg',130, 193,5,'photo_7573189.html');
												thumbnails[2456355] = new thumbnail(2456355,'158153','','Monk-Portrait-by-Door_thumb.jpg',130, 195,5,'photo_2456355.html');
												thumbnails[2488084] = new thumbnail(2488084,'158276','','CLIKPIC---Alphabet-Study-Lalibela_thumb.jpg',130, 195,5,'photo_2488084.html');
												thumbnails[7545187] = new thumbnail(7545187,'158153','','CLIKPIC---Old-Synagogue-in-Cairo_thumb.jpg',130, 189,5,'photo_7545187.html');
												thumbnails[2456379] = new thumbnail(2456379,'158153','','Sohag-Church-Interior_thumb.jpg',130, 205,5,'photo_2456379.html');
												thumbnails[2488091] = new thumbnail(2488091,'158276','','Deacon-Calligraphy-Lalibela_thumb.jpg',130, 87,5,'photo_2488091.html');
												thumbnails[2456310] = new thumbnail(2456310,'158153','','Church-Door-and-Shoes_thumb.jpg',130, 195,5,'photo_2456310.html');
												thumbnails[2488103] = new thumbnail(2488103,'158276','','Deacons-Huts-w-Bread-Drying_thumb.jpg',130, 87,5,'photo_2488103.html');
												thumbnails[2456313] = new thumbnail(2456313,'158153','','Coptic-Bishop-and-Monk_thumb.jpg',130, 204,5,'photo_2456313.html');
												thumbnails[2488146] = new thumbnail(2488146,'158276','','King-Lalibela-Cross-Staff-B_thumb.jpg',130, 87,5,'photo_2488146.html');
												thumbnails[7545194] = new thumbnail(7545194,'158153','','CLIKPIC---Sufi-Cemetery-in-Egyptian-Delta_thumb.jpg',130, 197,5,'photo_7545194.html');
												thumbnails[2456409] = new thumbnail(2456409,'158153','','St-Macarius-Hermitage_thumb.jpg',130, 86,5,'photo_2456409.html');
												thumbnails[2488107] = new thumbnail(2488107,'158276','','CLIKPIC---Debre-Libanos-Hermit-II_thumb.jpg',130, 195,5,'photo_2488107.html');
												thumbnails[7545188] = new thumbnail(7545188,'409099','','CLIKPIC---Portrait-Coptic-Monk-w-Cross-and-Icon_thumb.jpg',160, 235,5,'photo_7545188.html');
												thumbnails[7573190] = new thumbnail(7573190,'158027','','CLIKPIC---Clonmacnoise-Church-and-Cross_thumb.jpg',130, 165,5,'photo_7573190.html');
												thumbnails[2488088] = new thumbnail(2488088,'158276','','CLIKPIC---Cross-and-Fire_thumb.jpg',130, 195,5,'photo_2488088.html');
												thumbnails[2456307] = new thumbnail(2456307,'158153','','Carpentry-Shop_thumb.jpg',130, 78,5,'photo_2456307.html');
												thumbnails[7573191] = new thumbnail(7573191,'158027','','CLIKPIC---Burrisboore-Abbey-Doorway_thumb.jpg',130, 164,5,'photo_7573191.html');
												thumbnails[2456308] = new thumbnail(2456308,'158153','','Cave-Church_thumb.jpg',130, 83,5,'photo_2456308.html');
												thumbnails[2488023] = new thumbnail(2488023,'158027','','CLIKPIC---Rock-of-Cashel-Church-and-G_thumb.jpg',130, 141,5,'photo_2488023.html');
												thumbnails[2488148] = new thumbnail(2488148,'158276','','CLIKPIC---Lake-Tana-Blind-Monk_thumb.jpg',130, 195,5,'photo_2488148.html');
												thumbnails[2456325] = new thumbnail(2456325,'158153','','Monk-at-Prayer_thumb.jpg',130, 86,5,'photo_2456325.html');
												thumbnails[2488021] = new thumbnail(2488021,'158027','','Pulnabronne-Dolmen-FINAL-co_thumb.jpg',130, 102,5,'photo_2488021.html');
												thumbnails[7545189] = new thumbnail(7545189,'409099','','CLIKPIC---Portrait-of-Coptic-Bishop-and-Monk_thumb.jpg',160, 238,5,'photo_7545189.html');
												thumbnails[2456315] = new thumbnail(2456315,'158153','','Hand-and-Manuscript_thumb.jpg',130, 87,5,'photo_2456315.html');
												thumbnails[2488158] = new thumbnail(2488158,'158276','','Stone-Church-1_thumb.jpg',130, 87,5,'photo_2488158.html');
												thumbnails[2456312] = new thumbnail(2456312,'158153','','Church-on-Mt-Sinai_thumb.jpg',130, 87,5,'photo_2456312.html');
												thumbnails[2488164] = new thumbnail(2488164,'158276','','Stone-Church-Steps_thumb.jpg',130, 87,5,'photo_2488164.html');
												thumbnails[2488155] = new thumbnail(2488155,'158276','','Lalibela-Hermit-Relics_thumb.jpg',130, 87,5,'photo_2488155.html');
												thumbnails[2458008] = new thumbnail(2458008,'158027','','County-Meath-Farmhouse-Door_thumb.jpg',130, 102,5,'photo_2458008.html');
												thumbnails[2488142] = new thumbnail(2488142,'158276','','CLIKPIC---Gondar-Monk-by-Door_thumb.jpg',130, 195,5,'photo_2488142.html');
												thumbnails[2456319] = new thumbnail(2456319,'158153','','Hermit-Portrait_thumb.jpg',130, 86,5,'photo_2456319.html');
												thumbnails[2456597] = new thumbnail(2456597,'158276','','Debre-Libanos-Portrait_thumb.jpg',130, 195,5,'photo_2456597.html');
												thumbnails[2456317] = new thumbnail(2456317,'158153','','Hermit-by-Door_thumb.jpg',130, 87,5,'photo_2456317.html');
												thumbnails[2491168] = new thumbnail(2491168,'158276','','Acolyte-w-Cross_thumb.jpg',130, 195,5,'photo_2491168.html');
												thumbnails[2456322] = new thumbnail(2456322,'158153','','Karnak-Statues_thumb.jpg',130, 97,5,'photo_2456322.html');
												thumbnails[2456320] = new thumbnail(2456320,'158153','','Karnak-Pillars_thumb.jpg',130, 93,5,'photo_2456320.html');
												thumbnails[2491169] = new thumbnail(2491169,'158276','','Deacons-Dancing-Epiphany_thumb.jpg',130, 87,5,'photo_2491169.html');
												thumbnails[2491175] = new thumbnail(2491175,'158276','','Epiphany-Statue_thumb.jpg',130, 87,5,'photo_2491175.html');
												thumbnails[2491177] = new thumbnail(2491177,'158276','','Priest-Sprays-Faithful_thumb.jpg',130, 87,5,'photo_2491177.html');
												thumbnails[2491170] = new thumbnail(2491170,'158276','','Epiphany-Celebration-w-Prie_thumb.jpg',130, 87,5,'photo_2491170.html');
												thumbnails[2491171] = new thumbnail(2491171,'158276','','Epiphany-Liturgical-Dancing_thumb.jpg',130, 87,5,'photo_2491171.html');
												thumbnails[2488183] = new thumbnail(2488183,'158276','','Zege-Frescoes_thumb.jpg',130, 87,5,'photo_2488183.html');
												thumbnails[7545192] = new thumbnail(7545192,'409099','','CLIKPIC---Portrait-of-Fr-Innokenty-on-Mount-Athos_thumb.jpg',160, 238,5,'photo_7545192.html');
												thumbnails[2488138] = new thumbnail(2488138,'158276','','Gondar-Deacons-Huts_thumb.jpg',130, 87,5,'photo_2488138.html');
												thumbnails[2456514] = new thumbnail(2456514,'158155','','Rope-on-Beach_thumb.jpg',130, 102,5,'photo_2456514.html');
												thumbnails[2491172] = new thumbnail(2491172,'158276','','Epiphany-Portrait_thumb.jpg',130, 195,5,'photo_2491172.html');
												thumbnails[7576266] = new thumbnail(7576266,'409099','','CLIKPIC---Gondar-Hermit-w-Gospel1_thumb.jpg',160, 240,5,'photo_7576266.html');
												thumbnails[7545185] = new thumbnail(7545185,'158155','','CLIKPIC---House-and-Villagers-in-South-Africa_thumb.jpg',130, 90,5,'photo_7545185.html');
												thumbnails[7576267] = new thumbnail(7576267,'409099','','CLIKPIC---Lake-Tana-Blind-Monk1_thumb.jpg',160, 240,5,'photo_7576267.html');
												thumbnails[7545195] = new thumbnail(7545195,'158155','','CLIKPIC---Water-Falls-on-Creek-in-South-Africa_thumb.jpg',130, 88,5,'photo_7545195.html');
												thumbnails[7576265] = new thumbnail(7576265,'409099','','CLIKPIC---Debre-Libanos-Hermit-II1_thumb.jpg',160, 240,5,'photo_7576265.html');
												thumbnails[7545190] = new thumbnail(7545190,'409099','','CLIKPIC---Portrait-of-Coptic-Father-at-Anba-Samweel-Monastery_thumb.jpg',130, 87,5,'photo_7545190.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[409099] = new gallery(409099,'7545193','Monastic Portraits','gallery',[7545191,7545182,7545193,7545188,7545189,7545192,7576266,7576267,7576265,7545190],0, 0, '', 'gallery_409099.html',0,0);
				  					galleries[158276] = new gallery(158276,'2456597','Ethiopia','gallery',[2488168,2488150,2488186,2488184,2488173,2488131,2488140,2488145,2488177,2488134,2488105,2488096,2488129,2488126,2488109,2488125,2488123,2488100,2488095,2488152,2488084,2488091,2488103,2488146,2488107,2488088,2488148,2488158,2488164,2488155,2488142,2456597,2491168,2491169,2491175,2491177,2491170,2491171,2488183,2488138,2491172],0, 0, '', 'gallery_158276.html',0,0);
				  					galleries[158153] = new gallery(158153,'2456363','Egypt','gallery',[2456448,2456314,2456435,2456394,7545183,2456443,2456390,2456423,2456439,2456366,2456398,7545184,2456405,2456361,2456363,2456352,2456358,2456350,2456369,2456372,2456385,2456383,2456417,2456445,2456355,7545187,2456379,2456310,2456313,7545194,2456409,2456307,2456308,2456325,2456315,2456312,2456319,2456317,2456322,2456320],0, 0, '', 'gallery_158153.html',0,0);
				  					galleries[158028] = new gallery(158028,'2456454','Kosovo','gallery',[2456451,2456449,2456450,2456454,7573189],0, 0, '', 'gallery_158028.html',0,0);
				  					galleries[158154] = new gallery(158154,'2456489','Turkey','gallery',[2457975,2457972,2457969,2457964,2457949,2457927,2457924,2457926,2456489,2457958,2457954,2457999],0, 0, '', 'gallery_158154.html',0,0);
				  					galleries[158027] = new gallery(158027,'7573191','Ireland','gallery',[2488060,2488067,2488037,2488042,2488014,2488007,2488057,2488058,2488025,2488018,2488020,2488000,2488009,2488008,2488005,2488001,2488002,2488073,7573190,7573191,2488023,2488021,2458008],0, 0, '', 'gallery_158027.html',0,0);
				  					galleries[158155] = new gallery(158155,'2456506','Miscellaneous','gallery',[2456506,2456510,7545186,2456514,7545185,7545195],0, 0, '', 'gallery_158155.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '7545193,2488184,2488131,2488123,2488060,2488014,2488005,2488001,2457975,2457969,2457924,2456514,2456448,2456394,2456315,2456314';
imageSets[2] = '7573191,7545193,2456597,2456506,2456489,2456454,2456363';
imageSets[3] = '7576267,7576266,7576265,7573191,7573190,7573189,7545195,7545194,7545193,7545192,7545191,7545190,7545189,7545188,7545187,7545186,7545185,7545184,7545183,7545182,2491177,2491175,2491172,2491171,2491170,2491169,2491168,2488186,2488184,2488183,2488177,2488173,2488168,2488164,2488158,2488155,2488152,2488150,2488148,2488146,2488145,2488142,2488140,2488138,2488134,2488131,2488129,2488126,2488125,2488123';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/mmcclellan/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/mmcclellan/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {

	imageID = randomListVal('');
		if (!basic) {
	img.src = photos[imageID].src;
	img.width = photos[imageID].width;
	img.height = photos[imageID].height;
  img.parentNode.title = img.alt = photos[imageID].caption;
	}
	else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
				
	}
			}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}
/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
  var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
		if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
    
  updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
  var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
      op = $.extend({},defaults,options),
      html = '', temp = '',
      photoId = op.nextPhoto.id,
      photoCaption = op.nextPhoto.caption,
      photoSrc = op.nextPhoto.src;
		
		if (!basic) {
    if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
    }
				
    if (op.$photo.length > 0) {
      html = $('<img/>',{
        'class': 'mainphoto photo',
        src: photoSrc,
        id: 'mainPic',
        name: 'mainPic',
        width: op.nextPhoto.width,
        height: op.nextPhoto.height,
        alt: photoCaption,
        css: op.css || {}
      });
      if (op.href) {
      	if (op.href.match(/<a/)) {
      	  html = $(op.href).append(html);
      	} else {
		  html = $('<a/>', {
			href: op.href,
			title: photoCaption
		  }).append(html);
	    }
      } else {
      	html = $('<a/>', {
			title: photoCaption
		  }).append(html);
      }
      if (op.speed == 0) {        op.$photo.html(html);        if (op.onBefore) {          op.onBefore.apply(op.$photo);        }        if (op.onAfter) {          op.onAfter.apply(op.$photo);        }      } else {        op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){            if (op.onAfter) {		    op.onAfter.apply(this);          }		  clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));		  $('body').trigger('clikUpdate');		}, op.onBefore);
      }    }
    	if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Michael McClellan Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {photoinfominwidth:200};	    		options.photoinfoadjacent = true;			      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));      $('body').trigger('clikUpdate');    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object') {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Michael McClellan </strong>' + this.photographer + '</p>';
	}
					
				if (temp != '') {
		temp = temp + '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp = temp + '<p>Order this print:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
				
		temp = temp + getPaymentOptions(this.payment_groups_id);
		temp = temp + '</select>';
		temp = temp + '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
				
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
			temp = temp + '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
		
	if(img){
	      if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
        imageID = imageID[1];
      } else {
			  imageID = randomListVal(galleries[gallery_id].featured_images);
      }
							
			if (imageID != 0) {
				img.src = thumbnails[imageID].src;
				img.width = thumbnails[imageID].width;
				img.height = thumbnails[imageID].height;
				img.alt = galleries[gallery_id].title;
        if (updateLink) {
          $(img).parent().attr({            href: thumbnails[imageID].fnGalleryLink(gallery_id),            title: galleries[gallery_id].title          });
        }
							}
										}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp = temp + ' | ';
				}
				temp = temp + '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

